generated-configure.sh revision 2124:9aa7d40f3a45
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_GENERATE_CLASSLIST
654BUILD_FAILURE_HANDLER
655ENABLE_INTREE_EC
656STLPORT_LIB
657LIBZIP_CAN_USE_MMAP
658LIBDL
659LIBM
660USE_EXTERNAL_LCMS
661LCMS_LIBS
662LCMS_CFLAGS
663USE_EXTERNAL_LIBZ
664USE_EXTERNAL_LIBPNG
665PNG_LIBS
666PNG_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669LLVM_LIBS
670LLVM_LDFLAGS
671LLVM_CFLAGS
672LLVM_CONFIG
673LIBFFI_LIBS
674LIBFFI_CFLAGS
675ALSA_LIBS
676ALSA_CFLAGS
677FREETYPE_BUNDLE_LIB_PATH
678FREETYPE_LIBS
679FREETYPE_CFLAGS
680CUPS_CFLAGS
681X_EXTRA_LIBS
682X_LIBS
683X_PRE_LIBS
684X_CFLAGS
685XMKMF
686MSVCP_DLL
687MSVCR_DLL
688LIBCXX
689STATIC_CXX_SETTING
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
751NO_LIFETIME_DSE_CFLAG
752NO_NULL_POINTER_CHECK_CFLAG
753CXXSTD_CXXFLAG
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796USE_CLANG
797HOTSPOT_LD
798HOTSPOT_CXX
799HOTSPOT_RC
800HOTSPOT_MT
801BUILD_AS
802BUILD_LDCXX
803BUILD_LD
804BUILD_STRIP
805BUILD_OBJCOPY
806BUILD_AR
807BUILD_NM
808BUILD_CXX
809BUILD_CC
810BUILD_SYSROOT_LDFLAGS
811BUILD_SYSROOT_CFLAGS
812ac_ct_OBJDUMP
813OBJDUMP
814ac_ct_OBJCOPY
815OBJCOPY
816ac_ct_NM
817ac_ct_STRIP
818GNM
819NM
820STRIP
821MSBUILD
822DUMPBIN
823RC
824MT
825LIPO
826ac_ct_AR
827AR
828AS
829LDCXX
830LD
831CXXCPP
832CPP
833CXX_VERSION_NUMBER
834CC_VERSION_NUMBER
835ac_ct_CXX
836CXXFLAGS
837CXX
838TOOLCHAIN_PATH_CXX
839POTENTIAL_CXX
840OBJEXT
841EXEEXT
842ac_ct_CC
843CPPFLAGS
844LDFLAGS
845CFLAGS
846CC
847TOOLCHAIN_PATH_CC
848POTENTIAL_CC
849TOOLCHAIN_VERSION
850VS_LIB
851VS_INCLUDE
852VS_PATH
853CYGWIN_LINK
854SYSROOT_LDFLAGS
855SYSROOT_CFLAGS
856EXTRA_LDFLAGS
857EXTRA_CXXFLAGS
858EXTRA_CFLAGS
859LEGACY_EXTRA_LDFLAGS
860LEGACY_EXTRA_CXXFLAGS
861LEGACY_EXTRA_CFLAGS
862EXE_SUFFIX
863OBJ_SUFFIX
864STATIC_LIBRARY
865SHARED_LIBRARY
866STATIC_LIBRARY_SUFFIX
867SHARED_LIBRARY_SUFFIX
868LIBRARY_PREFIX
869TOOLCHAIN_TYPE
870STATIC_BUILD
871IMPORT_MODULES_MAKE
872IMPORT_MODULES_SRC
873IMPORT_MODULES_CONF
874IMPORT_MODULES_LIBS
875IMPORT_MODULES_CMDS
876IMPORT_MODULES_CLASSES
877BUILD_HOTSPOT
878HOTSPOT_DIST
879BUILD_OUTPUT
880JDK_TOPDIR
881NASHORN_TOPDIR
882HOTSPOT_TOPDIR
883JAXWS_TOPDIR
884JAXP_TOPDIR
885CORBA_TOPDIR
886LANGTOOLS_TOPDIR
887EXTERNAL_BUILDJDK
888BUILD_JDK
889CREATE_BUILDJDK
890JLINK
891JMOD
892BOOT_JDK_BITS
893JAVAC_FLAGS
894BOOT_JDK_MODULAR
895BOOT_JDK_SOURCETARGET
896JARSIGNER
897JAR
898JAVAH
899JAVAC
900JAVA
901BOOT_JDK
902JAVA_CHECK
903JAVAC_CHECK
904VERSION_IS_GA
905VERSION_SHORT
906VERSION_STRING
907VERSION_NUMBER_FOUR_POSITIONS
908VERSION_NUMBER
909VERSION_OPT
910VERSION_BUILD
911VERSION_PRE
912VERSION_PATCH
913VERSION_SECURITY
914VERSION_MINOR
915VERSION_MAJOR
916MACOSX_BUNDLE_ID_BASE
917MACOSX_BUNDLE_NAME_BASE
918HOTSPOT_VM_DISTRO
919COMPANY_NAME
920JDK_RC_PLATFORM_NAME
921PRODUCT_SUFFIX
922PRODUCT_NAME
923LAUNCHER_NAME
924JLINK_KEEP_PACKAGED_MODULES
925COPYRIGHT_YEAR
926COMPRESS_JARS
927INCLUDE_SA
928UNLIMITED_CRYPTO
929CACERTS_FILE
930BUILD_HEADLESS
931SUPPORT_HEADFUL
932SUPPORT_HEADLESS
933DEFAULT_MAKE_TARGET
934OS_VERSION_MICRO
935OS_VERSION_MINOR
936OS_VERSION_MAJOR
937PKG_CONFIG
938BASH_ARGS
939SETFILE
940CODESIGN
941XATTR
942DSYMUTIL
943IS_GNU_TIME
944PATCH
945DTRACE
946TIME
947STAT
948HG
949READELF
950OTOOL
951LDD
952ZIP
953UNZIP
954TAR_SUPPORTS_TRANSFORM
955TAR_INCLUDE_PARAM
956TAR_CREATE_EXTRA_PARAM
957TAR_TYPE
958FIND_DELETE
959OUTPUT_SYNC
960OUTPUT_SYNC_SUPPORTED
961CHECK_TOOLSDIR_MAKE
962CHECK_TOOLSDIR_GMAKE
963CHECK_MAKE
964CHECK_GMAKE
965MAKE
966PKGHANDLER
967CONFIGURESUPPORT_OUTPUTDIR
968OUTPUT_ROOT
969CONF_NAME
970SPEC
971SDKROOT
972XCODEBUILD
973VALID_JVM_VARIANTS
974JVM_VARIANTS
975DEBUG_LEVEL
976HOTSPOT_DEBUG_LEVEL
977JDK_VARIANT
978SET_OPENJDK
979USERNAME
980CANONICAL_TOPDIR
981ORIGINAL_TOPDIR
982TOPDIR
983PATH_SEP
984ZERO_ARCHDEF
985HOTSPOT_BUILD_CPU_DEFINE
986HOTSPOT_BUILD_CPU_ARCH
987HOTSPOT_BUILD_CPU
988HOTSPOT_BUILD_OS_TYPE
989HOTSPOT_BUILD_OS
990OPENJDK_BUILD_BUNDLE_PLATFORM
991OPENJDK_BUILD_CPU_BUNDLE
992OPENJDK_BUILD_OS_BUNDLE
993OPENJDK_BUILD_OS_EXPORT_DIR
994OPENJDK_BUILD_CPU_JLI_CFLAGS
995OPENJDK_BUILD_CPU_OSARCH
996OPENJDK_BUILD_CPU_ISADIR
997OPENJDK_BUILD_CPU_LIBDIR
998OPENJDK_BUILD_CPU_LEGACY_LIB
999OPENJDK_BUILD_CPU_LEGACY
1000HOTSPOT_TARGET_CPU_DEFINE
1001HOTSPOT_TARGET_CPU_ARCH
1002HOTSPOT_TARGET_CPU
1003HOTSPOT_TARGET_OS_TYPE
1004HOTSPOT_TARGET_OS
1005DEFINE_CROSS_COMPILE_ARCH
1006LP64
1007OPENJDK_TARGET_BUNDLE_PLATFORM
1008OPENJDK_TARGET_CPU_BUNDLE
1009OPENJDK_TARGET_OS_BUNDLE
1010OPENJDK_TARGET_OS_EXPORT_DIR
1011OPENJDK_TARGET_CPU_JLI_CFLAGS
1012OPENJDK_TARGET_CPU_OSARCH
1013OPENJDK_TARGET_CPU_ISADIR
1014OPENJDK_TARGET_CPU_LIBDIR
1015OPENJDK_TARGET_CPU_LEGACY_LIB
1016OPENJDK_TARGET_CPU_LEGACY
1017REQUIRED_OS_VERSION
1018REQUIRED_OS_NAME
1019COMPILE_TYPE
1020OPENJDK_TARGET_CPU_ENDIAN
1021OPENJDK_TARGET_CPU_BITS
1022OPENJDK_TARGET_CPU_ARCH
1023OPENJDK_TARGET_CPU
1024OPENJDK_TARGET_OS_ENV
1025OPENJDK_TARGET_OS_TYPE
1026OPENJDK_TARGET_OS
1027OPENJDK_BUILD_CPU_ENDIAN
1028OPENJDK_BUILD_CPU_BITS
1029OPENJDK_BUILD_CPU_ARCH
1030OPENJDK_BUILD_CPU
1031OPENJDK_BUILD_OS_ENV
1032OPENJDK_BUILD_OS_TYPE
1033OPENJDK_BUILD_OS
1034OPENJDK_BUILD_AUTOCONF_NAME
1035OPENJDK_TARGET_AUTOCONF_NAME
1036target_os
1037target_vendor
1038target_cpu
1039target
1040host_os
1041host_vendor
1042host_cpu
1043host
1044build_os
1045build_vendor
1046build_cpu
1047build
1048NICE
1049CPIO
1050DF
1051READLINK
1052CYGPATH
1053SED
1054FGREP
1055EGREP
1056GREP
1057AWK
1058XARGS
1059WHICH
1060WC
1061UNIQ
1062UNAME
1063TR
1064TOUCH
1065TEE
1066TAR
1067TAIL
1068SORT
1069SH
1070RMDIR
1071RM
1072PRINTF
1073NAWK
1074MV
1075MKTEMP
1076MKDIR
1077LS
1078LN
1079GZIP
1080GUNZIP
1081HEAD
1082FIND
1083FILE
1084EXPR
1085ECHO
1086DIRNAME
1087DIFF
1088DATE
1089CUT
1090CP
1091COMM
1092CMP
1093CHMOD
1094CAT
1095BASH
1096BASENAME
1097DATE_WHEN_CONFIGURED
1098ORIGINAL_PATH
1099CONFIGURE_COMMAND_LINE
1100target_alias
1101host_alias
1102build_alias
1103LIBS
1104ECHO_T
1105ECHO_N
1106ECHO_C
1107DEFS
1108mandir
1109localedir
1110libdir
1111psdir
1112pdfdir
1113dvidir
1114htmldir
1115infodir
1116docdir
1117oldincludedir
1118includedir
1119localstatedir
1120sharedstatedir
1121sysconfdir
1122datadir
1123datarootdir
1124libexecdir
1125sbindir
1126bindir
1127program_transform_name
1128prefix
1129exec_prefix
1130PACKAGE_URL
1131PACKAGE_BUGREPORT
1132PACKAGE_STRING
1133PACKAGE_VERSION
1134PACKAGE_TARNAME
1135PACKAGE_NAME
1136PATH_SEPARATOR
1137SHELL'
1138ac_subst_files=''
1139ac_user_opts='
1140enable_option_checking
1141with_target_bits
1142enable_openjdk_only
1143with_custom_make_dir
1144with_jdk_variant
1145enable_debug
1146with_debug_level
1147with_jvm_variants
1148with_devkit
1149with_sys_root
1150with_sysroot
1151with_tools_dir
1152with_toolchain_path
1153with_extra_path
1154with_sdk_name
1155with_conf_name
1156with_output_sync
1157with_default_make_target
1158enable_headful
1159with_cacerts_file
1160enable_unlimited_crypto
1161with_copyright_year
1162enable_keep_packaged_modules
1163with_milestone
1164with_update_version
1165with_user_release_suffix
1166with_build_number
1167with_version_string
1168with_version_pre
1169with_version_opt
1170with_version_build
1171with_version_major
1172with_version_minor
1173with_version_security
1174with_version_patch
1175with_boot_jdk
1176with_build_jdk
1177with_add_source_root
1178with_override_source_root
1179with_adds_and_overrides
1180with_override_langtools
1181with_override_corba
1182with_override_jaxp
1183with_override_jaxws
1184with_override_hotspot
1185with_override_nashorn
1186with_override_jdk
1187with_import_hotspot
1188with_import_modules
1189enable_static_build
1190with_toolchain_type
1191with_extra_cflags
1192with_extra_cxxflags
1193with_extra_ldflags
1194with_toolchain_version
1195with_build_devkit
1196with_jtreg
1197enable_warnings_as_errors
1198with_native_debug_symbols
1199enable_debug_symbols
1200enable_zip_debug_info
1201enable_native_coverage
1202enable_dtrace
1203with_jvm_features
1204with_jvm_interpreter
1205enable_hotspot_gtest
1206with_stdc__lib
1207with_msvcr_dll
1208with_msvcp_dll
1209with_x
1210with_cups
1211with_cups_include
1212with_freetype
1213with_freetype_include
1214with_freetype_lib
1215with_freetype_src
1216enable_freetype_bundling
1217with_alsa
1218with_alsa_include
1219with_alsa_lib
1220with_libffi
1221with_libffi_include
1222with_libffi_lib
1223with_libjpeg
1224with_giflib
1225with_libpng
1226with_zlib
1227with_lcms
1228with_dxsdk
1229with_dxsdk_lib
1230with_dxsdk_include
1231enable_jtreg_failure_handler
1232enable_generate_classlist
1233with_num_cores
1234with_memory_size
1235with_jobs
1236with_test_jobs
1237with_boot_jdk_jvmargs
1238with_sjavac_server_java
1239enable_sjavac
1240enable_javac_server
1241enable_icecc
1242enable_precompiled_headers
1243enable_ccache
1244with_ccache_dir
1245'
1246      ac_precious_vars='build_alias
1247host_alias
1248target_alias
1249BASENAME
1250BASH
1251CAT
1252CHMOD
1253CMP
1254COMM
1255CP
1256CUT
1257DATE
1258DIFF
1259DIRNAME
1260ECHO
1261EXPR
1262FILE
1263FIND
1264HEAD
1265GUNZIP
1266GZIP
1267LN
1268LS
1269MKDIR
1270MKTEMP
1271MV
1272NAWK
1273PRINTF
1274RM
1275RMDIR
1276SH
1277SORT
1278TAIL
1279TAR
1280TEE
1281TOUCH
1282TR
1283UNAME
1284UNIQ
1285WC
1286WHICH
1287XARGS
1288AWK
1289GREP
1290EGREP
1291FGREP
1292SED
1293CYGPATH
1294READLINK
1295DF
1296CPIO
1297NICE
1298MAKE
1299UNZIP
1300ZIP
1301LDD
1302OTOOL
1303READELF
1304HG
1305STAT
1306TIME
1307DTRACE
1308PATCH
1309DSYMUTIL
1310XATTR
1311CODESIGN
1312SETFILE
1313PKG_CONFIG
1314JAVA
1315JAVAC
1316JAVAH
1317JAR
1318JARSIGNER
1319CC
1320CFLAGS
1321LDFLAGS
1322LIBS
1323CPPFLAGS
1324CXX
1325CXXFLAGS
1326CCC
1327CPP
1328CXXCPP
1329AS
1330AR
1331LIPO
1332STRIP
1333NM
1334GNM
1335OBJCOPY
1336OBJDUMP
1337BUILD_CC
1338BUILD_CXX
1339BUILD_NM
1340BUILD_AR
1341BUILD_OBJCOPY
1342BUILD_STRIP
1343JTREGEXE
1344XMKMF
1345FREETYPE_CFLAGS
1346FREETYPE_LIBS
1347ALSA_CFLAGS
1348ALSA_LIBS
1349LIBFFI_CFLAGS
1350LIBFFI_LIBS
1351PNG_CFLAGS
1352PNG_LIBS
1353LCMS_CFLAGS
1354LCMS_LIBS
1355ICECC_CMD
1356ICECC_CREATE_ENV
1357ICECC_WRAPPER
1358CCACHE'
1359
1360
1361# Initialize some variables set by options.
1362ac_init_help=
1363ac_init_version=false
1364ac_unrecognized_opts=
1365ac_unrecognized_sep=
1366# The variables have the same names as the options, with
1367# dashes changed to underlines.
1368cache_file=/dev/null
1369exec_prefix=NONE
1370no_create=
1371no_recursion=
1372prefix=NONE
1373program_prefix=NONE
1374program_suffix=NONE
1375program_transform_name=s,x,x,
1376silent=
1377site=
1378srcdir=
1379verbose=
1380x_includes=NONE
1381x_libraries=NONE
1382
1383# Installation directory options.
1384# These are left unexpanded so users can "make install exec_prefix=/foo"
1385# and all the variables that are supposed to be based on exec_prefix
1386# by default will actually change.
1387# Use braces instead of parens because sh, perl, etc. also accept them.
1388# (The list follows the same order as the GNU Coding Standards.)
1389bindir='${exec_prefix}/bin'
1390sbindir='${exec_prefix}/sbin'
1391libexecdir='${exec_prefix}/libexec'
1392datarootdir='${prefix}/share'
1393datadir='${datarootdir}'
1394sysconfdir='${prefix}/etc'
1395sharedstatedir='${prefix}/com'
1396localstatedir='${prefix}/var'
1397includedir='${prefix}/include'
1398oldincludedir='/usr/include'
1399docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1400infodir='${datarootdir}/info'
1401htmldir='${docdir}'
1402dvidir='${docdir}'
1403pdfdir='${docdir}'
1404psdir='${docdir}'
1405libdir='${exec_prefix}/lib'
1406localedir='${datarootdir}/locale'
1407mandir='${datarootdir}/man'
1408
1409ac_prev=
1410ac_dashdash=
1411for ac_option
1412do
1413  # If the previous option needs an argument, assign it.
1414  if test -n "$ac_prev"; then
1415    eval $ac_prev=\$ac_option
1416    ac_prev=
1417    continue
1418  fi
1419
1420  case $ac_option in
1421  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1422  *=)   ac_optarg= ;;
1423  *)    ac_optarg=yes ;;
1424  esac
1425
1426  # Accept the important Cygnus configure options, so we can diagnose typos.
1427
1428  case $ac_dashdash$ac_option in
1429  --)
1430    ac_dashdash=yes ;;
1431
1432  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1433    ac_prev=bindir ;;
1434  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1435    bindir=$ac_optarg ;;
1436
1437  -build | --build | --buil | --bui | --bu)
1438    ac_prev=build_alias ;;
1439  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1440    build_alias=$ac_optarg ;;
1441
1442  -cache-file | --cache-file | --cache-fil | --cache-fi \
1443  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1444    ac_prev=cache_file ;;
1445  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1446  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1447    cache_file=$ac_optarg ;;
1448
1449  --config-cache | -C)
1450    cache_file=config.cache ;;
1451
1452  -datadir | --datadir | --datadi | --datad)
1453    ac_prev=datadir ;;
1454  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1455    datadir=$ac_optarg ;;
1456
1457  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1458  | --dataroo | --dataro | --datar)
1459    ac_prev=datarootdir ;;
1460  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1461  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1462    datarootdir=$ac_optarg ;;
1463
1464  -disable-* | --disable-*)
1465    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1466    # Reject names that are not valid shell variable names.
1467    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1468      as_fn_error $? "invalid feature name: $ac_useropt"
1469    ac_useropt_orig=$ac_useropt
1470    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1471    case $ac_user_opts in
1472      *"
1473"enable_$ac_useropt"
1474"*) ;;
1475      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1476	 ac_unrecognized_sep=', ';;
1477    esac
1478    eval enable_$ac_useropt=no ;;
1479
1480  -docdir | --docdir | --docdi | --doc | --do)
1481    ac_prev=docdir ;;
1482  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1483    docdir=$ac_optarg ;;
1484
1485  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1486    ac_prev=dvidir ;;
1487  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1488    dvidir=$ac_optarg ;;
1489
1490  -enable-* | --enable-*)
1491    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1492    # Reject names that are not valid shell variable names.
1493    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1494      as_fn_error $? "invalid feature name: $ac_useropt"
1495    ac_useropt_orig=$ac_useropt
1496    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1497    case $ac_user_opts in
1498      *"
1499"enable_$ac_useropt"
1500"*) ;;
1501      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1502	 ac_unrecognized_sep=', ';;
1503    esac
1504    eval enable_$ac_useropt=\$ac_optarg ;;
1505
1506  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1507  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1508  | --exec | --exe | --ex)
1509    ac_prev=exec_prefix ;;
1510  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1511  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1512  | --exec=* | --exe=* | --ex=*)
1513    exec_prefix=$ac_optarg ;;
1514
1515  -gas | --gas | --ga | --g)
1516    # Obsolete; use --with-gas.
1517    with_gas=yes ;;
1518
1519  -help | --help | --hel | --he | -h)
1520    ac_init_help=long ;;
1521  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1522    ac_init_help=recursive ;;
1523  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1524    ac_init_help=short ;;
1525
1526  -host | --host | --hos | --ho)
1527    ac_prev=host_alias ;;
1528  -host=* | --host=* | --hos=* | --ho=*)
1529    host_alias=$ac_optarg ;;
1530
1531  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1532    ac_prev=htmldir ;;
1533  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1534  | --ht=*)
1535    htmldir=$ac_optarg ;;
1536
1537  -includedir | --includedir | --includedi | --included | --include \
1538  | --includ | --inclu | --incl | --inc)
1539    ac_prev=includedir ;;
1540  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1541  | --includ=* | --inclu=* | --incl=* | --inc=*)
1542    includedir=$ac_optarg ;;
1543
1544  -infodir | --infodir | --infodi | --infod | --info | --inf)
1545    ac_prev=infodir ;;
1546  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1547    infodir=$ac_optarg ;;
1548
1549  -libdir | --libdir | --libdi | --libd)
1550    ac_prev=libdir ;;
1551  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1552    libdir=$ac_optarg ;;
1553
1554  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1555  | --libexe | --libex | --libe)
1556    ac_prev=libexecdir ;;
1557  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1558  | --libexe=* | --libex=* | --libe=*)
1559    libexecdir=$ac_optarg ;;
1560
1561  -localedir | --localedir | --localedi | --localed | --locale)
1562    ac_prev=localedir ;;
1563  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1564    localedir=$ac_optarg ;;
1565
1566  -localstatedir | --localstatedir | --localstatedi | --localstated \
1567  | --localstate | --localstat | --localsta | --localst | --locals)
1568    ac_prev=localstatedir ;;
1569  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1570  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1571    localstatedir=$ac_optarg ;;
1572
1573  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1574    ac_prev=mandir ;;
1575  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1576    mandir=$ac_optarg ;;
1577
1578  -nfp | --nfp | --nf)
1579    # Obsolete; use --without-fp.
1580    with_fp=no ;;
1581
1582  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1583  | --no-cr | --no-c | -n)
1584    no_create=yes ;;
1585
1586  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1587  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1588    no_recursion=yes ;;
1589
1590  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1591  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1592  | --oldin | --oldi | --old | --ol | --o)
1593    ac_prev=oldincludedir ;;
1594  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1595  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1596  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1597    oldincludedir=$ac_optarg ;;
1598
1599  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1600    ac_prev=prefix ;;
1601  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1602    prefix=$ac_optarg ;;
1603
1604  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1605  | --program-pre | --program-pr | --program-p)
1606    ac_prev=program_prefix ;;
1607  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1608  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1609    program_prefix=$ac_optarg ;;
1610
1611  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1612  | --program-suf | --program-su | --program-s)
1613    ac_prev=program_suffix ;;
1614  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1615  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1616    program_suffix=$ac_optarg ;;
1617
1618  -program-transform-name | --program-transform-name \
1619  | --program-transform-nam | --program-transform-na \
1620  | --program-transform-n | --program-transform- \
1621  | --program-transform | --program-transfor \
1622  | --program-transfo | --program-transf \
1623  | --program-trans | --program-tran \
1624  | --progr-tra | --program-tr | --program-t)
1625    ac_prev=program_transform_name ;;
1626  -program-transform-name=* | --program-transform-name=* \
1627  | --program-transform-nam=* | --program-transform-na=* \
1628  | --program-transform-n=* | --program-transform-=* \
1629  | --program-transform=* | --program-transfor=* \
1630  | --program-transfo=* | --program-transf=* \
1631  | --program-trans=* | --program-tran=* \
1632  | --progr-tra=* | --program-tr=* | --program-t=*)
1633    program_transform_name=$ac_optarg ;;
1634
1635  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1636    ac_prev=pdfdir ;;
1637  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1638    pdfdir=$ac_optarg ;;
1639
1640  -psdir | --psdir | --psdi | --psd | --ps)
1641    ac_prev=psdir ;;
1642  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1643    psdir=$ac_optarg ;;
1644
1645  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1646  | -silent | --silent | --silen | --sile | --sil)
1647    silent=yes ;;
1648
1649  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1650    ac_prev=sbindir ;;
1651  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1652  | --sbi=* | --sb=*)
1653    sbindir=$ac_optarg ;;
1654
1655  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1656  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1657  | --sharedst | --shareds | --shared | --share | --shar \
1658  | --sha | --sh)
1659    ac_prev=sharedstatedir ;;
1660  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1661  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1662  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1663  | --sha=* | --sh=*)
1664    sharedstatedir=$ac_optarg ;;
1665
1666  -site | --site | --sit)
1667    ac_prev=site ;;
1668  -site=* | --site=* | --sit=*)
1669    site=$ac_optarg ;;
1670
1671  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1672    ac_prev=srcdir ;;
1673  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1674    srcdir=$ac_optarg ;;
1675
1676  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1677  | --syscon | --sysco | --sysc | --sys | --sy)
1678    ac_prev=sysconfdir ;;
1679  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1680  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1681    sysconfdir=$ac_optarg ;;
1682
1683  -target | --target | --targe | --targ | --tar | --ta | --t)
1684    ac_prev=target_alias ;;
1685  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1686    target_alias=$ac_optarg ;;
1687
1688  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1689    verbose=yes ;;
1690
1691  -version | --version | --versio | --versi | --vers | -V)
1692    ac_init_version=: ;;
1693
1694  -with-* | --with-*)
1695    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1696    # Reject names that are not valid shell variable names.
1697    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1698      as_fn_error $? "invalid package name: $ac_useropt"
1699    ac_useropt_orig=$ac_useropt
1700    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1701    case $ac_user_opts in
1702      *"
1703"with_$ac_useropt"
1704"*) ;;
1705      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1706	 ac_unrecognized_sep=', ';;
1707    esac
1708    eval with_$ac_useropt=\$ac_optarg ;;
1709
1710  -without-* | --without-*)
1711    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1712    # Reject names that are not valid shell variable names.
1713    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1714      as_fn_error $? "invalid package name: $ac_useropt"
1715    ac_useropt_orig=$ac_useropt
1716    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1717    case $ac_user_opts in
1718      *"
1719"with_$ac_useropt"
1720"*) ;;
1721      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1722	 ac_unrecognized_sep=', ';;
1723    esac
1724    eval with_$ac_useropt=no ;;
1725
1726  --x)
1727    # Obsolete; use --with-x.
1728    with_x=yes ;;
1729
1730  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1731  | --x-incl | --x-inc | --x-in | --x-i)
1732    ac_prev=x_includes ;;
1733  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1734  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1735    x_includes=$ac_optarg ;;
1736
1737  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1738  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1739    ac_prev=x_libraries ;;
1740  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1741  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1742    x_libraries=$ac_optarg ;;
1743
1744  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1745Try \`$0 --help' for more information"
1746    ;;
1747
1748  *=*)
1749    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1750    # Reject names that are not valid shell variable names.
1751    case $ac_envvar in #(
1752      '' | [0-9]* | *[!_$as_cr_alnum]* )
1753      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1754    esac
1755    eval $ac_envvar=\$ac_optarg
1756    export $ac_envvar ;;
1757
1758  *)
1759    # FIXME: should be removed in autoconf 3.0.
1760    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1761    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1762      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1763    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1764    ;;
1765
1766  esac
1767done
1768
1769if test -n "$ac_prev"; then
1770  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1771  as_fn_error $? "missing argument to $ac_option"
1772fi
1773
1774if test -n "$ac_unrecognized_opts"; then
1775  case $enable_option_checking in
1776    no) ;;
1777    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1778    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1779  esac
1780fi
1781
1782# Check all directory arguments for consistency.
1783for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1784		datadir sysconfdir sharedstatedir localstatedir includedir \
1785		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1786		libdir localedir mandir
1787do
1788  eval ac_val=\$$ac_var
1789  # Remove trailing slashes.
1790  case $ac_val in
1791    */ )
1792      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1793      eval $ac_var=\$ac_val;;
1794  esac
1795  # Be sure to have absolute directory names.
1796  case $ac_val in
1797    [\\/$]* | ?:[\\/]* )  continue;;
1798    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1799  esac
1800  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1801done
1802
1803# There might be people who depend on the old broken behavior: `$host'
1804# used to hold the argument of --host etc.
1805# FIXME: To remove some day.
1806build=$build_alias
1807host=$host_alias
1808target=$target_alias
1809
1810# FIXME: To remove some day.
1811if test "x$host_alias" != x; then
1812  if test "x$build_alias" = x; then
1813    cross_compiling=maybe
1814  elif test "x$build_alias" != "x$host_alias"; then
1815    cross_compiling=yes
1816  fi
1817fi
1818
1819ac_tool_prefix=
1820test -n "$host_alias" && ac_tool_prefix=$host_alias-
1821
1822test "$silent" = yes && exec 6>/dev/null
1823
1824
1825ac_pwd=`pwd` && test -n "$ac_pwd" &&
1826ac_ls_di=`ls -di .` &&
1827ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1828  as_fn_error $? "working directory cannot be determined"
1829test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1830  as_fn_error $? "pwd does not report name of working directory"
1831
1832
1833# Find the source files, if location was not specified.
1834if test -z "$srcdir"; then
1835  ac_srcdir_defaulted=yes
1836  # Try the directory containing this script, then the parent directory.
1837  ac_confdir=`$as_dirname -- "$as_myself" ||
1838$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1839	 X"$as_myself" : 'X\(//\)[^/]' \| \
1840	 X"$as_myself" : 'X\(//\)$' \| \
1841	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1842$as_echo X"$as_myself" |
1843    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)[^/].*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\/\)$/{
1852	    s//\1/
1853	    q
1854	  }
1855	  /^X\(\/\).*/{
1856	    s//\1/
1857	    q
1858	  }
1859	  s/.*/./; q'`
1860  srcdir=$ac_confdir
1861  if test ! -r "$srcdir/$ac_unique_file"; then
1862    srcdir=..
1863  fi
1864else
1865  ac_srcdir_defaulted=no
1866fi
1867if test ! -r "$srcdir/$ac_unique_file"; then
1868  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1869  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1870fi
1871ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1872ac_abs_confdir=`(
1873	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1874	pwd)`
1875# When building in place, set srcdir=.
1876if test "$ac_abs_confdir" = "$ac_pwd"; then
1877  srcdir=.
1878fi
1879# Remove unnecessary trailing slashes from srcdir.
1880# Double slashes in file names in object file debugging info
1881# mess up M-x gdb in Emacs.
1882case $srcdir in
1883*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1884esac
1885for ac_var in $ac_precious_vars; do
1886  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_env_${ac_var}_value=\$${ac_var}
1888  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1889  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1890done
1891
1892#
1893# Report the --help message.
1894#
1895if test "$ac_init_help" = "long"; then
1896  # Omit some internal or obsolete options to make the list less imposing.
1897  # This message is too long to be a string in the A/UX 3.1 sh.
1898  cat <<_ACEOF
1899\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1900
1901Usage: $0 [OPTION]... [VAR=VALUE]...
1902
1903To assign environment variables (e.g., CC, CFLAGS...), specify them as
1904VAR=VALUE.  See below for descriptions of some of the useful variables.
1905
1906Defaults for the options are specified in brackets.
1907
1908Configuration:
1909  -h, --help              display this help and exit
1910      --help=short        display options specific to this package
1911      --help=recursive    display the short help of all the included packages
1912  -V, --version           display version information and exit
1913  -q, --quiet, --silent   do not print \`checking ...' messages
1914      --cache-file=FILE   cache test results in FILE [disabled]
1915  -C, --config-cache      alias for \`--cache-file=config.cache'
1916  -n, --no-create         do not create output files
1917      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1918
1919Installation directories:
1920  --prefix=PREFIX         install architecture-independent files in PREFIX
1921                          [$ac_default_prefix]
1922  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1923                          [PREFIX]
1924
1925By default, \`make install' will install all the files in
1926\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1927an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1928for instance \`--prefix=\$HOME'.
1929
1930For better control, use the options below.
1931
1932Fine tuning of the installation directories:
1933  --bindir=DIR            user executables [EPREFIX/bin]
1934  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1935  --libexecdir=DIR        program executables [EPREFIX/libexec]
1936  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1937  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1938  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1939  --libdir=DIR            object code libraries [EPREFIX/lib]
1940  --includedir=DIR        C header files [PREFIX/include]
1941  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1942  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1943  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1944  --infodir=DIR           info documentation [DATAROOTDIR/info]
1945  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1946  --mandir=DIR            man documentation [DATAROOTDIR/man]
1947  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1948  --htmldir=DIR           html documentation [DOCDIR]
1949  --dvidir=DIR            dvi documentation [DOCDIR]
1950  --pdfdir=DIR            pdf documentation [DOCDIR]
1951  --psdir=DIR             ps documentation [DOCDIR]
1952_ACEOF
1953
1954  cat <<\_ACEOF
1955
1956X features:
1957  --x-includes=DIR    X include files are in DIR
1958  --x-libraries=DIR   X library files are in DIR
1959
1960System types:
1961  --build=BUILD     configure for building on BUILD [guessed]
1962  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1963  --target=TARGET   configure for building compilers for TARGET [HOST]
1964_ACEOF
1965fi
1966
1967if test -n "$ac_init_help"; then
1968  case $ac_init_help in
1969     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1970   esac
1971  cat <<\_ACEOF
1972
1973Optional Features:
1974  --disable-option-checking  ignore unrecognized --enable/--with options
1975  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1976  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1977  --enable-openjdk-only   suppress building custom source even if present
1978                          [disabled]
1979  --enable-debug          set the debug level to fastdebug (shorthand for
1980                          --with-debug-level=fastdebug) [disabled]
1981  --disable-headful       disable building headful support (graphical UI
1982                          support) [enabled]
1983  --enable-unlimited-crypto
1984                          Enable unlimited crypto policy [disabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-devkit           use this devkit for compilers, tools and resources
2041  --with-sys-root         alias for --with-sysroot for backwards compatability
2042  --with-sysroot          use this directory as sysroot
2043  --with-tools-dir        alias for --with-toolchain-path for backwards
2044                          compatibility
2045  --with-toolchain-path   prepend these directories when searching for
2046                          toolchain binaries (compilers etc)
2047  --with-extra-path       prepend these directories to the default path
2048  --with-sdk-name         use the platform SDK of the given name. [macosx]
2049  --with-conf-name        use this as the name of the configuration [generated
2050                          from important configuration options]
2051  --with-output-sync      set make output sync type if supported by make.
2052                          [recurse]
2053  --with-default-make-target
2054                          set the default make target [exploded-image]
2055  --with-cacerts-file     specify alternative cacerts file
2056  --with-copyright-year   Set copyright year value for build [current year]
2057  --with-milestone        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-update-version   Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-user-release-suffix
2062                          Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-build-number     Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-version-string   Set version string [calculated]
2067  --with-version-pre      Set the base part of the version 'PRE' field
2068                          (pre-release identifier) ['internal']
2069  --with-version-opt      Set version 'OPT' field (build metadata)
2070                          [<timestamp>.<user>.<dirname>]
2071  --with-version-build    Set version 'BUILD' field (build number) [not
2072                          specified]
2073  --with-version-major    Set version 'MAJOR' field (first number) [current
2074                          source value]
2075  --with-version-minor    Set version 'MINOR' field (second number) [current
2076                          source value]
2077  --with-version-security Set version 'SECURITY' field (third number) [current
2078                          source value]
2079  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2080                          specified]
2081  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2082  --with-build-jdk        path to JDK of same version as is being built[the
2083                          newly built JDK]
2084  --with-add-source-root  Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-source-root
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-adds-and-overrides
2090                          Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-langtools
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-corba   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxp    Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxws   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-hotspot Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-nashorn Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jdk     Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-import-hotspot   import hotspot binaries from this jdk image or
2108                          hotspot build dist dir instead of building from
2109                          source
2110  --with-import-modules   import a set of prebuilt modules either as a zip
2111                          file or an exploded directory
2112  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2113                          to show possible values [platform dependent]
2114  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2115  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2116  --with-extra-ldflags    extra flags to be used when linking jdk
2117  --with-toolchain-version
2118                          the version of the toolchain to look for, use
2119                          '--help' to show possible values [platform
2120                          dependent]
2121  --with-build-devkit     Devkit to use for the build platform toolchain
2122  --with-jtreg            Regression Test Harness [probed]
2123  --with-native-debug-symbols
2124                          set the native debug symbol configuration (none,
2125                          internal, external, zipped) [varying]
2126  --with-jvm-features     additional JVM features to enable (separated by
2127                          comma), use '--help' to show possible values [none]
2128  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2129                          compatibility and is ignored
2130  --with-stdc++lib=<static>,<dynamic>,<default>
2131                          force linking of the C++ runtime on Linux to either
2132                          static or dynamic, default is static with dynamic as
2133                          fallback
2134  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2135                          (Windows only) [probed]
2136  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2137                          (Windows only) [probed]
2138  --with-x                use the X Window System
2139  --with-cups             specify prefix directory for the cups package
2140                          (expecting the headers under PATH/include)
2141  --with-cups-include     specify directory for the cups include files
2142  --with-freetype         specify prefix directory for the freetype package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-freetype-include specify directory for the freetype include files
2146  --with-freetype-lib     specify directory for the freetype library
2147  --with-freetype-src     specify directory with freetype sources to
2148                          automatically build the library (experimental,
2149                          Windows-only)
2150  --with-alsa             specify prefix directory for the alsa package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-alsa-include     specify directory for the alsa include files
2154  --with-alsa-lib         specify directory for the alsa library
2155  --with-libffi           specify prefix directory for the libffi package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-libffi-include   specify directory for the libffi include files
2159  --with-libffi-lib       specify directory for the libffi library
2160  --with-libjpeg          use libjpeg from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-giflib           use giflib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-libpng           use libpng from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-zlib             use zlib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-lcms             use lcms2 from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-dxsdk            Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-include    Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-num-cores        number of cores in the build system, e.g.
2177                          --with-num-cores=8 [probed]
2178  --with-memory-size      memory (in MB) available in the build system, e.g.
2179                          --with-memory-size=1024 [probed]
2180  --with-jobs             number of parallel jobs to let make run [calculated
2181                          based on cores and memory]
2182  --with-test-jobs        number of parallel tests jobs to run [based on build
2183                          jobs]
2184  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2185                          invocations of boot JDK, overriding the default
2186                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2187                          -enableassertions"
2188  --with-sjavac-server-java
2189                          use this java binary for running the sjavac
2190                          background server [Boot JDK java]
2191  --with-ccache-dir       where to store ccache files [~/.ccache]
2192
2193Some influential environment variables:
2194  BASENAME    Override default value for BASENAME
2195  BASH        Override default value for BASH
2196  CAT         Override default value for CAT
2197  CHMOD       Override default value for CHMOD
2198  CMP         Override default value for CMP
2199  COMM        Override default value for COMM
2200  CP          Override default value for CP
2201  CUT         Override default value for CUT
2202  DATE        Override default value for DATE
2203  DIFF        Override default value for DIFF
2204  DIRNAME     Override default value for DIRNAME
2205  ECHO        Override default value for ECHO
2206  EXPR        Override default value for EXPR
2207  FILE        Override default value for FILE
2208  FIND        Override default value for FIND
2209  HEAD        Override default value for HEAD
2210  GUNZIP      Override default value for GUNZIP
2211  GZIP        Override default value for GZIP
2212  LN          Override default value for LN
2213  LS          Override default value for LS
2214  MKDIR       Override default value for MKDIR
2215  MKTEMP      Override default value for MKTEMP
2216  MV          Override default value for MV
2217  NAWK        Override default value for NAWK
2218  PRINTF      Override default value for PRINTF
2219  RM          Override default value for RM
2220  RMDIR       Override default value for RMDIR
2221  SH          Override default value for SH
2222  SORT        Override default value for SORT
2223  TAIL        Override default value for TAIL
2224  TAR         Override default value for TAR
2225  TEE         Override default value for TEE
2226  TOUCH       Override default value for TOUCH
2227  TR          Override default value for TR
2228  UNAME       Override default value for UNAME
2229  UNIQ        Override default value for UNIQ
2230  WC          Override default value for WC
2231  WHICH       Override default value for WHICH
2232  XARGS       Override default value for XARGS
2233  AWK         Override default value for AWK
2234  GREP        Override default value for GREP
2235  EGREP       Override default value for EGREP
2236  FGREP       Override default value for FGREP
2237  SED         Override default value for SED
2238  CYGPATH     Override default value for CYGPATH
2239  READLINK    Override default value for READLINK
2240  DF          Override default value for DF
2241  CPIO        Override default value for CPIO
2242  NICE        Override default value for NICE
2243  MAKE        Override default value for MAKE
2244  UNZIP       Override default value for UNZIP
2245  ZIP         Override default value for ZIP
2246  LDD         Override default value for LDD
2247  OTOOL       Override default value for OTOOL
2248  READELF     Override default value for READELF
2249  HG          Override default value for HG
2250  STAT        Override default value for STAT
2251  TIME        Override default value for TIME
2252  DTRACE      Override default value for DTRACE
2253  PATCH       Override default value for PATCH
2254  DSYMUTIL    Override default value for DSYMUTIL
2255  XATTR       Override default value for XATTR
2256  CODESIGN    Override default value for CODESIGN
2257  SETFILE     Override default value for SETFILE
2258  PKG_CONFIG  path to pkg-config utility
2259  JAVA        Override default value for JAVA
2260  JAVAC       Override default value for JAVAC
2261  JAVAH       Override default value for JAVAH
2262  JAR         Override default value for JAR
2263  JARSIGNER   Override default value for JARSIGNER
2264  CC          C compiler command
2265  CFLAGS      C compiler flags
2266  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2267              nonstandard directory <lib dir>
2268  LIBS        libraries to pass to the linker, e.g. -l<library>
2269  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2270              you have headers in a nonstandard directory <include dir>
2271  CXX         C++ compiler command
2272  CXXFLAGS    C++ compiler flags
2273  CPP         C preprocessor
2274  CXXCPP      C++ preprocessor
2275  AS          Override default value for AS
2276  AR          Override default value for AR
2277  LIPO        Override default value for LIPO
2278  STRIP       Override default value for STRIP
2279  NM          Override default value for NM
2280  GNM         Override default value for GNM
2281  OBJCOPY     Override default value for OBJCOPY
2282  OBJDUMP     Override default value for OBJDUMP
2283  BUILD_CC    Override default value for BUILD_CC
2284  BUILD_CXX   Override default value for BUILD_CXX
2285  BUILD_NM    Override default value for BUILD_NM
2286  BUILD_AR    Override default value for BUILD_AR
2287  BUILD_OBJCOPY
2288              Override default value for BUILD_OBJCOPY
2289  BUILD_STRIP Override default value for BUILD_STRIP
2290  JTREGEXE    Override default value for JTREGEXE
2291  XMKMF       Path to xmkmf, Makefile generator for X Window System
2292  FREETYPE_CFLAGS
2293              C compiler flags for FREETYPE, overriding pkg-config
2294  FREETYPE_LIBS
2295              linker flags for FREETYPE, overriding pkg-config
2296  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2297  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2298  LIBFFI_CFLAGS
2299              C compiler flags for LIBFFI, overriding pkg-config
2300  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2301  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2302  PNG_LIBS    linker flags for PNG, overriding pkg-config
2303  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2304  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2305  ICECC_CMD   Override default value for ICECC_CMD
2306  ICECC_CREATE_ENV
2307              Override default value for ICECC_CREATE_ENV
2308  ICECC_WRAPPER
2309              Override default value for ICECC_WRAPPER
2310  CCACHE      Override default value for CCACHE
2311
2312Use these variables to override the choices made by `configure' or to help
2313it to find libraries and programs with nonstandard names/locations.
2314
2315Report bugs to <build-dev@openjdk.java.net>.
2316OpenJDK home page: <http://openjdk.java.net>.
2317_ACEOF
2318ac_status=$?
2319fi
2320
2321if test "$ac_init_help" = "recursive"; then
2322  # If there are subdirs, report their specific --help.
2323  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2324    test -d "$ac_dir" ||
2325      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2326      continue
2327    ac_builddir=.
2328
2329case "$ac_dir" in
2330.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331*)
2332  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2333  # A ".." for each directory in $ac_dir_suffix.
2334  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2335  case $ac_top_builddir_sub in
2336  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2338  esac ;;
2339esac
2340ac_abs_top_builddir=$ac_pwd
2341ac_abs_builddir=$ac_pwd$ac_dir_suffix
2342# for backward compatibility:
2343ac_top_builddir=$ac_top_build_prefix
2344
2345case $srcdir in
2346  .)  # We are building in place.
2347    ac_srcdir=.
2348    ac_top_srcdir=$ac_top_builddir_sub
2349    ac_abs_top_srcdir=$ac_pwd ;;
2350  [\\/]* | ?:[\\/]* )  # Absolute name.
2351    ac_srcdir=$srcdir$ac_dir_suffix;
2352    ac_top_srcdir=$srcdir
2353    ac_abs_top_srcdir=$srcdir ;;
2354  *) # Relative name.
2355    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2356    ac_top_srcdir=$ac_top_build_prefix$srcdir
2357    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2358esac
2359ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2360
2361    cd "$ac_dir" || { ac_status=$?; continue; }
2362    # Check for guested configure.
2363    if test -f "$ac_srcdir/configure.gnu"; then
2364      echo &&
2365      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2366    elif test -f "$ac_srcdir/configure"; then
2367      echo &&
2368      $SHELL "$ac_srcdir/configure" --help=recursive
2369    else
2370      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2371    fi || ac_status=$?
2372    cd "$ac_pwd" || { ac_status=$?; break; }
2373  done
2374fi
2375
2376test -n "$ac_init_help" && exit $ac_status
2377if $ac_init_version; then
2378  cat <<\_ACEOF
2379OpenJDK configure jdk9
2380generated by GNU Autoconf 2.69
2381
2382Copyright (C) 2012 Free Software Foundation, Inc.
2383This configure script is free software; the Free Software Foundation
2384gives unlimited permission to copy, distribute and modify it.
2385_ACEOF
2386  exit
2387fi
2388
2389## ------------------------ ##
2390## Autoconf initialization. ##
2391## ------------------------ ##
2392
2393# ac_fn_c_try_compile LINENO
2394# --------------------------
2395# Try to compile conftest.$ac_ext, and return whether this succeeded.
2396ac_fn_c_try_compile ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  rm -f conftest.$ac_objext
2400  if { { ac_try="$ac_compile"
2401case "(($ac_try" in
2402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2403  *) ac_try_echo=$ac_try;;
2404esac
2405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2406$as_echo "$ac_try_echo"; } >&5
2407  (eval "$ac_compile") 2>conftest.err
2408  ac_status=$?
2409  if test -s conftest.err; then
2410    grep -v '^ *+' conftest.err >conftest.er1
2411    cat conftest.er1 >&5
2412    mv -f conftest.er1 conftest.err
2413  fi
2414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2415  test $ac_status = 0; } && {
2416	 test -z "$ac_c_werror_flag" ||
2417	 test ! -s conftest.err
2418       } && test -s conftest.$ac_objext; then :
2419  ac_retval=0
2420else
2421  $as_echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424	ac_retval=1
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427  as_fn_set_status $ac_retval
2428
2429} # ac_fn_c_try_compile
2430
2431# ac_fn_cxx_try_compile LINENO
2432# ----------------------------
2433# Try to compile conftest.$ac_ext, and return whether this succeeded.
2434ac_fn_cxx_try_compile ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  rm -f conftest.$ac_objext
2438  if { { ac_try="$ac_compile"
2439case "(($ac_try" in
2440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441  *) ac_try_echo=$ac_try;;
2442esac
2443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2444$as_echo "$ac_try_echo"; } >&5
2445  (eval "$ac_compile") 2>conftest.err
2446  ac_status=$?
2447  if test -s conftest.err; then
2448    grep -v '^ *+' conftest.err >conftest.er1
2449    cat conftest.er1 >&5
2450    mv -f conftest.er1 conftest.err
2451  fi
2452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2453  test $ac_status = 0; } && {
2454	 test -z "$ac_cxx_werror_flag" ||
2455	 test ! -s conftest.err
2456       } && test -s conftest.$ac_objext; then :
2457  ac_retval=0
2458else
2459  $as_echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
2462	ac_retval=1
2463fi
2464  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2465  as_fn_set_status $ac_retval
2466
2467} # ac_fn_cxx_try_compile
2468
2469# ac_fn_c_try_cpp LINENO
2470# ----------------------
2471# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2472ac_fn_c_try_cpp ()
2473{
2474  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2475  if { { ac_try="$ac_cpp conftest.$ac_ext"
2476case "(($ac_try" in
2477  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2478  *) ac_try_echo=$ac_try;;
2479esac
2480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2481$as_echo "$ac_try_echo"; } >&5
2482  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2483  ac_status=$?
2484  if test -s conftest.err; then
2485    grep -v '^ *+' conftest.err >conftest.er1
2486    cat conftest.er1 >&5
2487    mv -f conftest.er1 conftest.err
2488  fi
2489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490  test $ac_status = 0; } > conftest.i && {
2491	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2492	 test ! -s conftest.err
2493       }; then :
2494  ac_retval=0
2495else
2496  $as_echo "$as_me: failed program was:" >&5
2497sed 's/^/| /' conftest.$ac_ext >&5
2498
2499    ac_retval=1
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_cpp
2505
2506# ac_fn_cxx_try_cpp LINENO
2507# ------------------------
2508# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2509ac_fn_cxx_try_cpp ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_cpp conftest.$ac_ext"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2520  ac_status=$?
2521  if test -s conftest.err; then
2522    grep -v '^ *+' conftest.err >conftest.er1
2523    cat conftest.er1 >&5
2524    mv -f conftest.er1 conftest.err
2525  fi
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } > conftest.i && {
2528	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2529	 test ! -s conftest.err
2530       }; then :
2531  ac_retval=0
2532else
2533  $as_echo "$as_me: failed program was:" >&5
2534sed 's/^/| /' conftest.$ac_ext >&5
2535
2536    ac_retval=1
2537fi
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_cpp
2542
2543# ac_fn_c_try_link LINENO
2544# -----------------------
2545# Try to link conftest.$ac_ext, and return whether this succeeded.
2546ac_fn_c_try_link ()
2547{
2548  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549  rm -f conftest.$ac_objext conftest$ac_exeext
2550  if { { ac_try="$ac_link"
2551case "(($ac_try" in
2552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2553  *) ac_try_echo=$ac_try;;
2554esac
2555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2556$as_echo "$ac_try_echo"; } >&5
2557  (eval "$ac_link") 2>conftest.err
2558  ac_status=$?
2559  if test -s conftest.err; then
2560    grep -v '^ *+' conftest.err >conftest.er1
2561    cat conftest.er1 >&5
2562    mv -f conftest.er1 conftest.err
2563  fi
2564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2565  test $ac_status = 0; } && {
2566	 test -z "$ac_c_werror_flag" ||
2567	 test ! -s conftest.err
2568       } && test -s conftest$ac_exeext && {
2569	 test "$cross_compiling" = yes ||
2570	 test -x conftest$ac_exeext
2571       }; then :
2572  ac_retval=0
2573else
2574  $as_echo "$as_me: failed program was:" >&5
2575sed 's/^/| /' conftest.$ac_ext >&5
2576
2577	ac_retval=1
2578fi
2579  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2580  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2581  # interfere with the next link command; also delete a directory that is
2582  # left behind by Apple's compiler.  We do this before executing the actions.
2583  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585  as_fn_set_status $ac_retval
2586
2587} # ac_fn_c_try_link
2588
2589# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2590# ---------------------------------------------------------
2591# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2592# the include files in INCLUDES and setting the cache variable VAR
2593# accordingly.
2594ac_fn_cxx_check_header_mongrel ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  if eval \${$3+:} false; then :
2598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2599$as_echo_n "checking for $2... " >&6; }
2600if eval \${$3+:} false; then :
2601  $as_echo_n "(cached) " >&6
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606else
2607  # Is the header compilable?
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2609$as_echo_n "checking $2 usability... " >&6; }
2610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_header_compiler=yes
2617else
2618  ac_header_compiler=no
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2622$as_echo "$ac_header_compiler" >&6; }
2623
2624# Is the header present?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2626$as_echo_n "checking $2 presence... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_cpp "$LINENO"; then :
2632  ac_header_preproc=yes
2633else
2634  ac_header_preproc=no
2635fi
2636rm -f conftest.err conftest.i conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2638$as_echo "$ac_header_preproc" >&6; }
2639
2640# So?  What about this header?
2641case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2642  yes:no: )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2644$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2646$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2647    ;;
2648  no:yes:* )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2650$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2652$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2654$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2656$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659( $as_echo "## ----------------------------------------- ##
2660## Report this to build-dev@openjdk.java.net ##
2661## ----------------------------------------- ##"
2662     ) | sed "s/^/$as_me: WARNING:     /" >&2
2663    ;;
2664esac
2665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666$as_echo_n "checking for $2... " >&6; }
2667if eval \${$3+:} false; then :
2668  $as_echo_n "(cached) " >&6
2669else
2670  eval "$3=\$ac_header_compiler"
2671fi
2672eval ac_res=\$$3
2673	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677
2678} # ac_fn_cxx_check_header_mongrel
2679
2680# ac_fn_cxx_try_run LINENO
2681# ------------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2683# that executables *can* be run.
2684ac_fn_cxx_try_run ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690  *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694  (eval "$ac_link") 2>&5
2695  ac_status=$?
2696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2698  { { case "(($ac_try" in
2699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700  *) ac_try_echo=$ac_try;;
2701esac
2702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2703$as_echo "$ac_try_echo"; } >&5
2704  (eval "$ac_try") 2>&5
2705  ac_status=$?
2706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2707  test $ac_status = 0; }; }; then :
2708  ac_retval=0
2709else
2710  $as_echo "$as_me: program exited with status $ac_status" >&5
2711       $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714       ac_retval=$ac_status
2715fi
2716  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2717  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2718  as_fn_set_status $ac_retval
2719
2720} # ac_fn_cxx_try_run
2721
2722# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2723# ---------------------------------------------------------
2724# Tests whether HEADER exists and can be compiled using the include files in
2725# INCLUDES, setting the cache variable VAR accordingly.
2726ac_fn_cxx_check_header_compile ()
2727{
2728  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2730$as_echo_n "checking for $2... " >&6; }
2731if eval \${$3+:} false; then :
2732  $as_echo_n "(cached) " >&6
2733else
2734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737#include <$2>
2738_ACEOF
2739if ac_fn_cxx_try_compile "$LINENO"; then :
2740  eval "$3=yes"
2741else
2742  eval "$3=no"
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$3
2747	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
2749  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2750
2751} # ac_fn_cxx_check_header_compile
2752
2753# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2754# ----------------------------------------------
2755# Tries to find the compile-time value of EXPR in a program that includes
2756# INCLUDES, setting VAR accordingly. Returns whether the value could be
2757# computed
2758ac_fn_cxx_compute_int ()
2759{
2760  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2761  if test "$cross_compiling" = yes; then
2762    # Depending upon the size, compute the lo and hi bounds.
2763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h.  */
2765$4
2766int
2767main ()
2768{
2769static int test_array [1 - 2 * !(($2) >= 0)];
2770test_array [0] = 0;
2771return test_array [0];
2772
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777if ac_fn_cxx_try_compile "$LINENO"; then :
2778  ac_lo=0 ac_mid=0
2779  while :; do
2780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_hi=$ac_mid; break
2796else
2797  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2798			if test $ac_lo -le $ac_mid; then
2799			  ac_lo= ac_hi=
2800			  break
2801			fi
2802			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805  done
2806else
2807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808/* end confdefs.h.  */
2809$4
2810int
2811main ()
2812{
2813static int test_array [1 - 2 * !(($2) < 0)];
2814test_array [0] = 0;
2815return test_array [0];
2816
2817  ;
2818  return 0;
2819}
2820_ACEOF
2821if ac_fn_cxx_try_compile "$LINENO"; then :
2822  ac_hi=-1 ac_mid=-1
2823  while :; do
2824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_lo=$ac_mid; break
2840else
2841  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2842			if test $ac_mid -le $ac_hi; then
2843			  ac_lo= ac_hi=
2844			  break
2845			fi
2846			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849  done
2850else
2851  ac_lo= ac_hi=
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856# Binary search between lo and hi bounds.
2857while test "x$ac_lo" != "x$ac_hi"; do
2858  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862int
2863main ()
2864{
2865static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2866test_array [0] = 0;
2867return test_array [0];
2868
2869  ;
2870  return 0;
2871}
2872_ACEOF
2873if ac_fn_cxx_try_compile "$LINENO"; then :
2874  ac_hi=$ac_mid
2875else
2876  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879done
2880case $ac_lo in #((
2881?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2882'') ac_retval=1 ;;
2883esac
2884  else
2885    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2886/* end confdefs.h.  */
2887$4
2888static long int longval () { return $2; }
2889static unsigned long int ulongval () { return $2; }
2890#include <stdio.h>
2891#include <stdlib.h>
2892int
2893main ()
2894{
2895
2896  FILE *f = fopen ("conftest.val", "w");
2897  if (! f)
2898    return 1;
2899  if (($2) < 0)
2900    {
2901      long int i = longval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%ld", i);
2905    }
2906  else
2907    {
2908      unsigned long int i = ulongval ();
2909      if (i != ($2))
2910	return 1;
2911      fprintf (f, "%lu", i);
2912    }
2913  /* Do not output a trailing newline, as this causes \r\n confusion
2914     on some platforms.  */
2915  return ferror (f) || fclose (f) != 0;
2916
2917  ;
2918  return 0;
2919}
2920_ACEOF
2921if ac_fn_cxx_try_run "$LINENO"; then :
2922  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2923else
2924  ac_retval=1
2925fi
2926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2927  conftest.$ac_objext conftest.beam conftest.$ac_ext
2928rm -f conftest.val
2929
2930  fi
2931  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2932  as_fn_set_status $ac_retval
2933
2934} # ac_fn_cxx_compute_int
2935
2936# ac_fn_cxx_try_link LINENO
2937# -------------------------
2938# Try to link conftest.$ac_ext, and return whether this succeeded.
2939ac_fn_cxx_try_link ()
2940{
2941  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2942  rm -f conftest.$ac_objext conftest$ac_exeext
2943  if { { ac_try="$ac_link"
2944case "(($ac_try" in
2945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2946  *) ac_try_echo=$ac_try;;
2947esac
2948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2949$as_echo "$ac_try_echo"; } >&5
2950  (eval "$ac_link") 2>conftest.err
2951  ac_status=$?
2952  if test -s conftest.err; then
2953    grep -v '^ *+' conftest.err >conftest.er1
2954    cat conftest.er1 >&5
2955    mv -f conftest.er1 conftest.err
2956  fi
2957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2958  test $ac_status = 0; } && {
2959	 test -z "$ac_cxx_werror_flag" ||
2960	 test ! -s conftest.err
2961       } && test -s conftest$ac_exeext && {
2962	 test "$cross_compiling" = yes ||
2963	 test -x conftest$ac_exeext
2964       }; then :
2965  ac_retval=0
2966else
2967  $as_echo "$as_me: failed program was:" >&5
2968sed 's/^/| /' conftest.$ac_ext >&5
2969
2970	ac_retval=1
2971fi
2972  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2973  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2974  # interfere with the next link command; also delete a directory that is
2975  # left behind by Apple's compiler.  We do this before executing the actions.
2976  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2977  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2978  as_fn_set_status $ac_retval
2979
2980} # ac_fn_cxx_try_link
2981
2982# ac_fn_cxx_check_func LINENO FUNC VAR
2983# ------------------------------------
2984# Tests whether FUNC exists, setting the cache variable VAR accordingly
2985ac_fn_cxx_check_func ()
2986{
2987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2989$as_echo_n "checking for $2... " >&6; }
2990if eval \${$3+:} false; then :
2991  $as_echo_n "(cached) " >&6
2992else
2993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h.  */
2995/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2996   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2997#define $2 innocuous_$2
2998
2999/* System header to define __stub macros and hopefully few prototypes,
3000    which can conflict with char $2 (); below.
3001    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002    <limits.h> exists even on freestanding compilers.  */
3003
3004#ifdef __STDC__
3005# include <limits.h>
3006#else
3007# include <assert.h>
3008#endif
3009
3010#undef $2
3011
3012/* Override any GCC internal prototype to avoid an error.
3013   Use char because int might match the return type of a GCC
3014   builtin and then its argument prototype would still apply.  */
3015#ifdef __cplusplus
3016extern "C"
3017#endif
3018char $2 ();
3019/* The GNU C library defines this for functions which it implements
3020    to always fail with ENOSYS.  Some functions are actually named
3021    something starting with __ and the normal name is an alias.  */
3022#if defined __stub_$2 || defined __stub___$2
3023choke me
3024#endif
3025
3026int
3027main ()
3028{
3029return $2 ();
3030  ;
3031  return 0;
3032}
3033_ACEOF
3034if ac_fn_cxx_try_link "$LINENO"; then :
3035  eval "$3=yes"
3036else
3037  eval "$3=no"
3038fi
3039rm -f core conftest.err conftest.$ac_objext \
3040    conftest$ac_exeext conftest.$ac_ext
3041fi
3042eval ac_res=\$$3
3043	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3044$as_echo "$ac_res" >&6; }
3045  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3046
3047} # ac_fn_cxx_check_func
3048
3049# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3050# -------------------------------------------------------
3051# Tests whether HEADER exists and can be compiled using the include files in
3052# INCLUDES, setting the cache variable VAR accordingly.
3053ac_fn_c_check_header_compile ()
3054{
3055  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3057$as_echo_n "checking for $2... " >&6; }
3058if eval \${$3+:} false; then :
3059  $as_echo_n "(cached) " >&6
3060else
3061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3062/* end confdefs.h.  */
3063$4
3064#include <$2>
3065_ACEOF
3066if ac_fn_c_try_compile "$LINENO"; then :
3067  eval "$3=yes"
3068else
3069  eval "$3=no"
3070fi
3071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3072fi
3073eval ac_res=\$$3
3074	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3075$as_echo "$ac_res" >&6; }
3076  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3077
3078} # ac_fn_c_check_header_compile
3079cat >config.log <<_ACEOF
3080This file contains any messages produced by compilers while
3081running configure, to aid debugging if configure makes a mistake.
3082
3083It was created by OpenJDK $as_me jdk9, which was
3084generated by GNU Autoconf 2.69.  Invocation command line was
3085
3086  $ $0 $@
3087
3088_ACEOF
3089exec 5>>config.log
3090{
3091cat <<_ASUNAME
3092## --------- ##
3093## Platform. ##
3094## --------- ##
3095
3096hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3097uname -m = `(uname -m) 2>/dev/null || echo unknown`
3098uname -r = `(uname -r) 2>/dev/null || echo unknown`
3099uname -s = `(uname -s) 2>/dev/null || echo unknown`
3100uname -v = `(uname -v) 2>/dev/null || echo unknown`
3101
3102/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3103/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3104
3105/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3106/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3107/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3108/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3109/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3110/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3111/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3112
3113_ASUNAME
3114
3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116for as_dir in $PATH
3117do
3118  IFS=$as_save_IFS
3119  test -z "$as_dir" && as_dir=.
3120    $as_echo "PATH: $as_dir"
3121  done
3122IFS=$as_save_IFS
3123
3124} >&5
3125
3126cat >&5 <<_ACEOF
3127
3128
3129## ----------- ##
3130## Core tests. ##
3131## ----------- ##
3132
3133_ACEOF
3134
3135
3136# Keep a trace of the command line.
3137# Strip out --no-create and --no-recursion so they do not pile up.
3138# Strip out --silent because we don't want to record it for future runs.
3139# Also quote any args containing shell meta-characters.
3140# Make two passes to allow for proper duplicate-argument suppression.
3141ac_configure_args=
3142ac_configure_args0=
3143ac_configure_args1=
3144ac_must_keep_next=false
3145for ac_pass in 1 2
3146do
3147  for ac_arg
3148  do
3149    case $ac_arg in
3150    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3151    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3152    | -silent | --silent | --silen | --sile | --sil)
3153      continue ;;
3154    *\'*)
3155      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3156    esac
3157    case $ac_pass in
3158    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3159    2)
3160      as_fn_append ac_configure_args1 " '$ac_arg'"
3161      if test $ac_must_keep_next = true; then
3162	ac_must_keep_next=false # Got value, back to normal.
3163      else
3164	case $ac_arg in
3165	  *=* | --config-cache | -C | -disable-* | --disable-* \
3166	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3167	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3168	  | -with-* | --with-* | -without-* | --without-* | --x)
3169	    case "$ac_configure_args0 " in
3170	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3171	    esac
3172	    ;;
3173	  -* ) ac_must_keep_next=true ;;
3174	esac
3175      fi
3176      as_fn_append ac_configure_args " '$ac_arg'"
3177      ;;
3178    esac
3179  done
3180done
3181{ ac_configure_args0=; unset ac_configure_args0;}
3182{ ac_configure_args1=; unset ac_configure_args1;}
3183
3184# When interrupted or exit'd, cleanup temporary files, and complete
3185# config.log.  We remove comments because anyway the quotes in there
3186# would cause problems or look ugly.
3187# WARNING: Use '\'' to represent an apostrophe within the trap.
3188# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3189trap 'exit_status=$?
3190  # Save into config.log some information that might help in debugging.
3191  {
3192    echo
3193
3194    $as_echo "## ---------------- ##
3195## Cache variables. ##
3196## ---------------- ##"
3197    echo
3198    # The following way of writing the cache mishandles newlines in values,
3199(
3200  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3201    eval ac_val=\$$ac_var
3202    case $ac_val in #(
3203    *${as_nl}*)
3204      case $ac_var in #(
3205      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3206$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3207      esac
3208      case $ac_var in #(
3209      _ | IFS | as_nl) ;; #(
3210      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3211      *) { eval $ac_var=; unset $ac_var;} ;;
3212      esac ;;
3213    esac
3214  done
3215  (set) 2>&1 |
3216    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3217    *${as_nl}ac_space=\ *)
3218      sed -n \
3219	"s/'\''/'\''\\\\'\'''\''/g;
3220	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3221      ;; #(
3222    *)
3223      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3224      ;;
3225    esac |
3226    sort
3227)
3228    echo
3229
3230    $as_echo "## ----------------- ##
3231## Output variables. ##
3232## ----------------- ##"
3233    echo
3234    for ac_var in $ac_subst_vars
3235    do
3236      eval ac_val=\$$ac_var
3237      case $ac_val in
3238      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239      esac
3240      $as_echo "$ac_var='\''$ac_val'\''"
3241    done | sort
3242    echo
3243
3244    if test -n "$ac_subst_files"; then
3245      $as_echo "## ------------------- ##
3246## File substitutions. ##
3247## ------------------- ##"
3248      echo
3249      for ac_var in $ac_subst_files
3250      do
3251	eval ac_val=\$$ac_var
3252	case $ac_val in
3253	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254	esac
3255	$as_echo "$ac_var='\''$ac_val'\''"
3256      done | sort
3257      echo
3258    fi
3259
3260    if test -s confdefs.h; then
3261      $as_echo "## ----------- ##
3262## confdefs.h. ##
3263## ----------- ##"
3264      echo
3265      cat confdefs.h
3266      echo
3267    fi
3268    test "$ac_signal" != 0 &&
3269      $as_echo "$as_me: caught signal $ac_signal"
3270    $as_echo "$as_me: exit $exit_status"
3271  } >&5
3272  rm -f core *.core core.conftest.* &&
3273    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3274    exit $exit_status
3275' 0
3276for ac_signal in 1 2 13 15; do
3277  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3278done
3279ac_signal=0
3280
3281# confdefs.h avoids OS command line length limits that DEFS can exceed.
3282rm -f -r conftest* confdefs.h
3283
3284$as_echo "/* confdefs.h */" > confdefs.h
3285
3286# Predefined preprocessor variables.
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_NAME "$PACKAGE_NAME"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_VERSION "$PACKAGE_VERSION"
3298_ACEOF
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_STRING "$PACKAGE_STRING"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_URL "$PACKAGE_URL"
3310_ACEOF
3311
3312
3313# Let the site file select an alternate cache file if it wants to.
3314# Prefer an explicitly selected file to automatically selected ones.
3315ac_site_file1=NONE
3316ac_site_file2=NONE
3317if test -n "$CONFIG_SITE"; then
3318  # We do not want a PATH search for config.site.
3319  case $CONFIG_SITE in #((
3320    -*)  ac_site_file1=./$CONFIG_SITE;;
3321    */*) ac_site_file1=$CONFIG_SITE;;
3322    *)   ac_site_file1=./$CONFIG_SITE;;
3323  esac
3324elif test "x$prefix" != xNONE; then
3325  ac_site_file1=$prefix/share/config.site
3326  ac_site_file2=$prefix/etc/config.site
3327else
3328  ac_site_file1=$ac_default_prefix/share/config.site
3329  ac_site_file2=$ac_default_prefix/etc/config.site
3330fi
3331for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3332do
3333  test "x$ac_site_file" = xNONE && continue
3334  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3336$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3337    sed 's/^/| /' "$ac_site_file" >&5
3338    . "$ac_site_file" \
3339      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error $? "failed to load site script $ac_site_file
3342See \`config.log' for more details" "$LINENO" 5; }
3343  fi
3344done
3345
3346if test -r "$cache_file"; then
3347  # Some versions of bash will fail to source /dev/null (special files
3348  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3349  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3350    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3351$as_echo "$as_me: loading cache $cache_file" >&6;}
3352    case $cache_file in
3353      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3354      *)                      . "./$cache_file";;
3355    esac
3356  fi
3357else
3358  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3359$as_echo "$as_me: creating cache $cache_file" >&6;}
3360  >$cache_file
3361fi
3362
3363# Check that the precious variables saved in the cache have kept the same
3364# value.
3365ac_cache_corrupted=false
3366for ac_var in $ac_precious_vars; do
3367  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3368  eval ac_new_set=\$ac_env_${ac_var}_set
3369  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3370  eval ac_new_val=\$ac_env_${ac_var}_value
3371  case $ac_old_set,$ac_new_set in
3372    set,)
3373      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3374$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3375      ac_cache_corrupted=: ;;
3376    ,set)
3377      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3378$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3379      ac_cache_corrupted=: ;;
3380    ,);;
3381    *)
3382      if test "x$ac_old_val" != "x$ac_new_val"; then
3383	# differences in whitespace do not lead to failure.
3384	ac_old_val_w=`echo x $ac_old_val`
3385	ac_new_val_w=`echo x $ac_new_val`
3386	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3387	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3388$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3389	  ac_cache_corrupted=:
3390	else
3391	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3392$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3393	  eval $ac_var=\$ac_old_val
3394	fi
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3396$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3398$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3399      fi;;
3400  esac
3401  # Pass precious variables to config.status.
3402  if test "$ac_new_set" = set; then
3403    case $ac_new_val in
3404    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3405    *) ac_arg=$ac_var=$ac_new_val ;;
3406    esac
3407    case " $ac_configure_args " in
3408      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3409      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3410    esac
3411  fi
3412done
3413if $ac_cache_corrupted; then
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3417$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3418  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3419fi
3420## -------------------- ##
3421## Main body of script. ##
3422## -------------------- ##
3423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
3429
3430
3431
3432ac_aux_dir=
3433for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3434  if test -f "$ac_dir/install-sh"; then
3435    ac_aux_dir=$ac_dir
3436    ac_install_sh="$ac_aux_dir/install-sh -c"
3437    break
3438  elif test -f "$ac_dir/install.sh"; then
3439    ac_aux_dir=$ac_dir
3440    ac_install_sh="$ac_aux_dir/install.sh -c"
3441    break
3442  elif test -f "$ac_dir/shtool"; then
3443    ac_aux_dir=$ac_dir
3444    ac_install_sh="$ac_aux_dir/shtool install -c"
3445    break
3446  fi
3447done
3448if test -z "$ac_aux_dir"; then
3449  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
3450fi
3451
3452# These three variables are undocumented and unsupported,
3453# and are intended to be withdrawn in a future Autoconf release.
3454# They can cause serious problems if a builder's source tree is in a directory
3455# whose full name contains unusual characters.
3456ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3458ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3459
3460
3461# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3462
3463#
3464# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3465# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3466#
3467# This code is free software; you can redistribute it and/or modify it
3468# under the terms of the GNU General Public License version 2 only, as
3469# published by the Free Software Foundation.  Oracle designates this
3470# particular file as subject to the "Classpath" exception as provided
3471# by Oracle in the LICENSE file that accompanied this code.
3472#
3473# This code is distributed in the hope that it will be useful, but WITHOUT
3474# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3475# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3476# version 2 for more details (a copy is included in the LICENSE file that
3477# accompanied this code).
3478#
3479# You should have received a copy of the GNU General Public License version
3480# 2 along with this work; if not, write to the Free Software Foundation,
3481# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3482#
3483# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3484# or visit www.oracle.com if you need additional information or have any
3485# questions.
3486#
3487
3488#
3489# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3490#
3491# This program is free software; you can redistribute it and/or modify
3492# it under the terms of the GNU General Public License as published by
3493# the Free Software Foundation; either version 2 of the License, or
3494# (at your option) any later version.
3495#
3496# This program is distributed in the hope that it will be useful, but
3497# WITHOUT ANY WARRANTY; without even the implied warranty of
3498# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3499# General Public License for more details.
3500#
3501# You should have received a copy of the GNU General Public License
3502# along with this program; if not, write to the Free Software
3503# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3504#
3505# As a special exception to the GNU General Public License, if you
3506# distribute this file as part of a program that contains a
3507# configuration script generated by Autoconf, you may include it under
3508# the same distribution terms that you use for the rest of that program.
3509
3510# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3511# ----------------------------------
3512# PKG_PROG_PKG_CONFIG
3513
3514# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3515#
3516# Check to see whether a particular set of modules exists.  Similar
3517# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3518#
3519#
3520# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3521# this or PKG_CHECK_MODULES is called, or make sure to call
3522# PKG_CHECK_EXISTS manually
3523# --------------------------------------------------------------
3524
3525
3526
3527# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3528# ---------------------------------------------
3529# _PKG_CONFIG
3530
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532# -----------------------------
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534
3535
3536# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3537# [ACTION-IF-NOT-FOUND])
3538#
3539#
3540# Note that if there is a possibility the first call to
3541# PKG_CHECK_MODULES might not happen, you should be sure to include an
3542# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3543#
3544#
3545# --------------------------------------------------------------
3546# PKG_CHECK_MODULES
3547
3548
3549# Include these first...
3550#
3551# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575# Create a function/macro that takes a series of named arguments. The call is
3576# similar to AC_DEFUN, but the setup of the function looks like this:
3577# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3578# ... do something
3579#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3580# ])
3581# A star (*) in front of a named argument means that it is required and it's
3582# presence will be verified. To pass e.g. the first value as a normal indexed
3583# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3584# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3585# "ARG_FOO".
3586#
3587# The generated function can be called like this:
3588# MYFUNC(FOO: [foo-val],
3589#     BAR: [
3590#         $ECHO hello world
3591#     ])
3592# Note that the argument value must start on the same line as the argument name.
3593#
3594# Argument 1: Name of the function to define
3595# Argument 2: List of legal named arguments, with a * prefix for required arguments
3596# Argument 3: Argument array to treat as named, typically $@
3597# Argument 4: The main function body
3598
3599
3600# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3601# If so, then append $1 to $2 \
3602# Also set JVM_ARG_OK to true/false depending on outcome.
3603
3604
3605# Appends a string to a path variable, only adding the : when needed.
3606
3607
3608# Prepends a string to a path variable, only adding the : when needed.
3609
3610
3611# This will make sure the given variable points to a full and proper
3612# path. This means:
3613# 1) There will be no spaces in the path. On unix platforms,
3614#    spaces in the path will result in an error. On Windows,
3615#    the path will be rewritten using short-style to be space-free.
3616# 2) The path will be absolute, and it will be in unix-style (on
3617#     cygwin).
3618# $1: The name of the variable to fix
3619
3620
3621# This will make sure the given variable points to a executable
3622# with a full and proper path. This means:
3623# 1) There will be no spaces in the path. On unix platforms,
3624#    spaces in the path will result in an error. On Windows,
3625#    the path will be rewritten using short-style to be space-free.
3626# 2) The path will be absolute, and it will be in unix-style (on
3627#     cygwin).
3628# Any arguments given to the executable is preserved.
3629# If the input variable does not have a directory specification, then
3630# it need to be in the PATH.
3631# $1: The name of the variable to fix
3632
3633
3634
3635
3636# Register a --with argument but mark it as deprecated
3637# $1: The name of the with argument to deprecate, not including --with-
3638
3639
3640# Register a --enable argument but mark it as deprecated
3641# $1: The name of the with argument to deprecate, not including --enable-
3642# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3643# $3: Messages to user.
3644
3645
3646
3647
3648# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3649# $1: variable to check
3650
3651
3652# Check that there are no unprocessed overridden variables left.
3653# If so, they are an incorrect argument and we will exit with an error.
3654
3655
3656# Setup a tool for the given variable. If correctly specified by the user,
3657# use that value, otherwise search for the tool using the supplied code snippet.
3658# $1: variable to set
3659# $2: code snippet to call to look for the tool
3660# $3: code snippet to call if variable was used to find tool
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671
3672
3673# Like BASIC_PATH_PROGS but fails if no tool was found.
3674# $1: variable to set
3675# $2: executable name (or list of names) to look for
3676
3677
3678# Like BASIC_SETUP_TOOL but fails if no tool was found.
3679# $1: variable to set
3680# $2: autoconf macro to call to look for the special tool
3681
3682
3683# Setup the most fundamental tools that relies on not much else to set up,
3684# but is used by much of the early bootstrap code.
3685
3686
3687# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3688
3689
3690# Evaluates platform specific overrides for devkit variables.
3691# $1: Name of variable
3692
3693
3694
3695
3696
3697
3698#%%% Simple tools %%%
3699
3700# Check if we have found a usable version of make
3701# $1: the path to a potential make binary (or empty)
3702# $2: the description on how we found this
3703
3704
3705
3706
3707# Goes looking for a usable version of GNU make.
3708
3709
3710
3711
3712
3713
3714
3715
3716# Check if build directory is on local disk. If not possible to determine,
3717# we prefer to claim it's local.
3718# Argument 1: directory to test
3719# Argument 2: what to do if it is on local disk
3720# Argument 3: what to do otherwise (remote disk or failure)
3721
3722
3723# Check that source files have basic read permissions set. This might
3724# not be the case in cygwin in certain conditions.
3725
3726
3727
3728
3729# Check for support for specific options in bash
3730
3731
3732################################################################################
3733#
3734# Default make target
3735#
3736
3737
3738# Code to run after AC_OUTPUT
3739
3740
3741#
3742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# Helper function which possibly converts a path using DOS-style short mode.
3776# If so, the updated path is stored in $new_path.
3777# $1: The path to check
3778
3779
3780# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3781# and could probably be heavily simplified. However, all changes in this
3782# area tend to need lot of testing in different scenarios, and in lack of
3783# proper unit testing, cleaning this up has not been deemed worth the effort
3784# at the moment.
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3795
3796
3797
3798
3799# ... then the rest
3800#
3801# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3802# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3803#
3804# This code is free software; you can redistribute it and/or modify it
3805# under the terms of the GNU General Public License version 2 only, as
3806# published by the Free Software Foundation.  Oracle designates this
3807# particular file as subject to the "Classpath" exception as provided
3808# by Oracle in the LICENSE file that accompanied this code.
3809#
3810# This code is distributed in the hope that it will be useful, but WITHOUT
3811# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3812# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3813# version 2 for more details (a copy is included in the LICENSE file that
3814# accompanied this code).
3815#
3816# You should have received a copy of the GNU General Public License version
3817# 2 along with this work; if not, write to the Free Software Foundation,
3818# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3819#
3820# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3821# or visit www.oracle.com if you need additional information or have any
3822# questions.
3823#
3824
3825########################################################################
3826# This file handles detection of the Boot JDK. The Boot JDK detection
3827# process has been developed as a response to solve a complex real-world
3828# problem. Initially, it was simple, but it has grown as platform after
3829# platform, idiosyncracy after idiosyncracy has been supported.
3830#
3831# The basic idea is this:
3832# 1) You need an acceptable *) JDK to use as a Boot JDK
3833# 2) There are several ways to locate a JDK, that are mostly platform
3834#    dependent **)
3835# 3) You can have multiple JDKs installed
3836# 4) If possible, configure should try to dig out an acceptable JDK
3837#    automatically, without having to resort to command-line options
3838#
3839# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3840#     javac) and not a JRE, etc.
3841#
3842# **) On Windows we typically use a well-known path.
3843#     On MacOSX we typically use the tool java_home.
3844#     On Linux we typically find javac in the $PATH, and then follow a
3845#     chain of symlinks that often ends up in a real JDK.
3846#
3847# This leads to the code where we check in different ways to locate a
3848# JDK, and if one is found, check if it is acceptable. If not, we print
3849# our reasons for rejecting it (useful when debugging non-working
3850# configure situations) and continue checking the next one.
3851########################################################################
3852
3853# Execute the check given as argument, and verify the result
3854# If the Boot JDK was previously found, do nothing
3855# $1 A command line (typically autoconf macro) to execute
3856
3857
3858# Test: Is bootjdk explicitely set by command line arguments?
3859
3860
3861# Test: Is $JAVA_HOME set?
3862
3863
3864# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3865
3866
3867# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3868# $1: Argument to the java_home binary (optional)
3869
3870
3871# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3872
3873
3874# Look for a jdk in the given path. If there are multiple, try to select the newest.
3875# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3876# $1 = Path to directory containing jdk installations.
3877# $2 = String to append to the found JDK directory to get the proper JDK home
3878
3879
3880# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3881# environmental variable as base for where to look.
3882# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3883
3884
3885# Test: Is there a JDK installed in default, well-known locations?
3886
3887
3888# Check that a command-line tool in the Boot JDK is correct
3889# $1 = name of variable to assign
3890# $2 = name of binary
3891
3892
3893###############################################################################
3894#
3895# We need a Boot JDK to bootstrap the build.
3896#
3897
3898
3899
3900
3901
3902# BUILD_JDK: the location of the latest JDK that can run
3903#   on the host system and supports the target class file version
3904#   generated in this JDK build.  This variable should only be
3905#   used after the launchers are built.
3906#
3907
3908# Execute the check given as argument, and verify the result.
3909# If the JDK was previously found, do nothing.
3910# $1 A command line (typically autoconf macro) to execute
3911
3912
3913# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3914# is different than the host system doing the build (e.g. cross-compilation),
3915# a special BUILD_JDK is built as part of the build process.  An external
3916# prebuilt BUILD_JDK can also be supplied.
3917
3918
3919#
3920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3922#
3923# This code is free software; you can redistribute it and/or modify it
3924# under the terms of the GNU General Public License version 2 only, as
3925# published by the Free Software Foundation.  Oracle designates this
3926# particular file as subject to the "Classpath" exception as provided
3927# by Oracle in the LICENSE file that accompanied this code.
3928#
3929# This code is distributed in the hope that it will be useful, but WITHOUT
3930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3932# version 2 for more details (a copy is included in the LICENSE file that
3933# accompanied this code).
3934#
3935# You should have received a copy of the GNU General Public License version
3936# 2 along with this work; if not, write to the Free Software Foundation,
3937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3938#
3939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3940# or visit www.oracle.com if you need additional information or have any
3941# questions.
3942#
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960################################################################################
3961#
3962# Runs icecc-create-env once and prints the error if it fails
3963#
3964# $1: arguments to icecc-create-env
3965# $2: log file
3966#
3967
3968
3969################################################################################
3970#
3971# Optionally enable distributed compilation of native code using icecc/icecream
3972#
3973
3974
3975
3976
3977
3978
3979
3980#
3981# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3982# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983#
3984# This code is free software; you can redistribute it and/or modify it
3985# under the terms of the GNU General Public License version 2 only, as
3986# published by the Free Software Foundation.  Oracle designates this
3987# particular file as subject to the "Classpath" exception as provided
3988# by Oracle in the LICENSE file that accompanied this code.
3989#
3990# This code is distributed in the hope that it will be useful, but WITHOUT
3991# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993# version 2 for more details (a copy is included in the LICENSE file that
3994# accompanied this code).
3995#
3996# You should have received a copy of the GNU General Public License version
3997# 2 along with this work; if not, write to the Free Software Foundation,
3998# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999#
4000# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001# or visit www.oracle.com if you need additional information or have any
4002# questions.
4003#
4004
4005# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4006# corresponding configure arguments instead
4007
4008
4009# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4010# that configure can use them while detecting compilers.
4011# TOOLCHAIN_TYPE is available here.
4012# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4013
4014
4015
4016
4017
4018
4019# Documentation on common flags used for solstudio in HIGHEST.
4020#
4021# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4022#          done with care, there are some assumptions below that need to
4023#          be understood about the use of pointers, and IEEE behavior.
4024#
4025# -fns: Use non-standard floating point mode (not IEEE 754)
4026# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4027# -fsingle: Use single precision floating point with 'float'
4028# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4029#   (Source with excessing pointer casting and data access with mixed
4030#    pointer types are not recommended)
4031# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4034# -xrestrict: Pointer parameters to functions do not overlap
4035#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4036#    If you pass in multiple pointers to the same data, do not use this)
4037# -xlibmil: Inline some library routines
4038#   (If you expect perfect errno behavior, do not use this)
4039# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4040#   (If you expect perfect errno behavior, do not use this)
4041#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4042
4043    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4044    # Bug?
4045    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4046    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4047    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4048    #fi
4049
4050
4051
4052
4053
4054
4055################################################################################
4056# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4057#      conditionals against.
4058# $2 - Optional prefix for each variable defined.
4059
4060
4061# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4062#                                  IF_FALSE: [RUN-IF-FALSE])
4063# ------------------------------------------------------------
4064# Check that the C compiler supports an argument
4065
4066
4067
4068
4069# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                    IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C++ compiler supports an argument
4073
4074
4075
4076
4077# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C and C++ compilers support an argument
4081
4082
4083
4084
4085# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                   IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the linker support an argument
4089
4090
4091
4092
4093
4094
4095
4096
4097#
4098# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4099# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4100#
4101# This code is free software; you can redistribute it and/or modify it
4102# under the terms of the GNU General Public License version 2 only, as
4103# published by the Free Software Foundation.  Oracle designates this
4104# particular file as subject to the "Classpath" exception as provided
4105# by Oracle in the LICENSE file that accompanied this code.
4106#
4107# This code is distributed in the hope that it will be useful, but WITHOUT
4108# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4109# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4110# version 2 for more details (a copy is included in the LICENSE file that
4111# accompanied this code).
4112#
4113# You should have received a copy of the GNU General Public License version
4114# 2 along with this work; if not, write to the Free Software Foundation,
4115# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4116#
4117# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4118# or visit www.oracle.com if you need additional information or have any
4119# questions.
4120#
4121
4122
4123
4124
4125
4126cygwin_help() {
4127  case $1 in
4128    unzip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    zip)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    make)
4137      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4138      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4139      ;;
4140    freetype)
4141      HELP_MSG="
4142The freetype library can now be build during the configure process.
4143Download the freetype sources and unpack them into an arbitrary directory:
4144
4145wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4146tar -xzf freetype-2.5.3.tar.gz
4147
4148Then run configure with '--with-freetype-src=<freetype_src>'. This will
4149automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4150builds or into '<freetype_src>/lib32' for 32-bit builds.
4151Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4152and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4153
4154Alternatively you can unpack the sources like this to use the default directory:
4155
4156tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4157      ;;
4158  esac
4159}
4160
4161msys_help() {
4162  PKGHANDLER_COMMAND=""
4163}
4164
4165apt_help() {
4166  case $1 in
4167    reduced)
4168      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4169    devkit)
4170      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4171    openjdk)
4172      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4173    alsa)
4174      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4175    cups)
4176      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4177    freetype)
4178      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4179    ffi)
4180      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4181    x11)
4182      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4183    ccache)
4184      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4185    dtrace)
4186      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4187  esac
4188}
4189
4190yum_help() {
4191  case $1 in
4192    devkit)
4193      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4194    openjdk)
4195      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4196    alsa)
4197      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4198    cups)
4199      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4200    freetype)
4201      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4202    x11)
4203      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4204    ccache)
4205      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4206  esac
4207}
4208
4209port_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgutil_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217pkgadd_help() {
4218  PKGHANDLER_COMMAND=""
4219}
4220
4221# This function will check if we're called from the "configure" wrapper while
4222# printing --help. If so, we will print out additional information that can
4223# only be extracted within the autoconf script, and then exit. This must be
4224# called at the very beginning in configure.ac.
4225
4226
4227
4228
4229
4230
4231#
4232# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4233# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4234#
4235# This code is free software; you can redistribute it and/or modify it
4236# under the terms of the GNU General Public License version 2 only, as
4237# published by the Free Software Foundation.  Oracle designates this
4238# particular file as subject to the "Classpath" exception as provided
4239# by Oracle in the LICENSE file that accompanied this code.
4240#
4241# This code is distributed in the hope that it will be useful, but WITHOUT
4242# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4243# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4244# version 2 for more details (a copy is included in the LICENSE file that
4245# accompanied this code).
4246#
4247# You should have received a copy of the GNU General Public License version
4248# 2 along with this work; if not, write to the Free Software Foundation,
4249# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4250#
4251# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4252# or visit www.oracle.com if you need additional information or have any
4253# questions.
4254#
4255
4256# All valid JVM features, regardless of platform
4257VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4258    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4259
4260# All valid JVM variants
4261VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4262
4263###############################################################################
4264# Check if the specified JVM variant should be built. To be used in shell if
4265# constructs, like this:
4266# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4267#
4268# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4269
4270# Definition kept in one line to allow inlining in if statements.
4271# Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274###############################################################################
4275# Check if the specified JVM features are explicitly enabled. To be used in
4276# shell if constructs, like this:
4277# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4278#
4279# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4280
4281# Definition kept in one line to allow inlining in if statements.
4282# Additional [] needed to keep m4 from mangling shell constructs.
4283
4284
4285###############################################################################
4286# Check which variants of the JVM that we want to build. Available variants are:
4287#   server: normal interpreter, and a tiered C1/C2 compiler
4288#   client: normal interpreter, and C1 (no C2 compiler)
4289#   minimal: reduced form of client with optional features stripped out
4290#   core: normal interpreter only, no compiler
4291#   zero: C++ based interpreter only, no compiler
4292#   zeroshark: C++ based interpreter, and a llvm-based compiler
4293#   custom: baseline JVM with no default features
4294#
4295
4296
4297###############################################################################
4298# Check if dtrace should be enabled and has all prerequisites present.
4299#
4300
4301
4302###############################################################################
4303# Set up all JVM features for each JVM variant.
4304#
4305
4306
4307###############################################################################
4308# Validate JVM features once all setup is complete, including custom setup.
4309#
4310
4311
4312################################################################################
4313# Check if gtest should be built
4314#
4315
4316
4317#
4318# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4319# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4320#
4321# This code is free software; you can redistribute it and/or modify it
4322# under the terms of the GNU General Public License version 2 only, as
4323# published by the Free Software Foundation.  Oracle designates this
4324# particular file as subject to the "Classpath" exception as provided
4325# by Oracle in the LICENSE file that accompanied this code.
4326#
4327# This code is distributed in the hope that it will be useful, but WITHOUT
4328# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4329# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4330# version 2 for more details (a copy is included in the LICENSE file that
4331# accompanied this code).
4332#
4333# You should have received a copy of the GNU General Public License version
4334# 2 along with this work; if not, write to the Free Software Foundation,
4335# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4336#
4337# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4338# or visit www.oracle.com if you need additional information or have any
4339# questions.
4340#
4341
4342###############################################################################
4343# Check which variant of the JDK that we want to build.
4344# Currently we have:
4345#    normal:   standard edition
4346# but the custom make system may add other variants
4347#
4348# Effectively the JDK variant gives a name to a specific set of
4349# modules to compile into the JDK.
4350
4351
4352###############################################################################
4353# Set the debug level
4354#    release: no debug information, all optimizations, no asserts.
4355#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4356#    fastdebug: debug information (-g), all optimizations, all asserts
4357#    slowdebug: debug information (-g), no optimizations, all asserts
4358
4359
4360###############################################################################
4361#
4362# Should we build only OpenJDK even if closed sources are present?
4363#
4364
4365
4366
4367
4368###############################################################################
4369#
4370# Enable or disable the elliptic curve crypto implementation
4371#
4372
4373
4374
4375
4376################################################################################
4377#
4378# Gcov coverage data for hotspot
4379#
4380
4381
4382################################################################################
4383#
4384# Static build support.  When enabled will generate static
4385# libraries instead of shared libraries for all JDK libs.
4386#
4387
4388
4389################################################################################
4390#
4391# jlink options.
4392# We always keep packaged modules in JDK image.
4393#
4394
4395
4396################################################################################
4397#
4398# Check if building of the jtreg failure handler should be enabled.
4399#
4400
4401
4402################################################################################
4403#
4404# Enable or disable generation of the classlist at build time
4405#
4406
4407
4408#
4409# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433###############################################################################
4434#
4435# Setup version numbers
4436#
4437
4438# Verify that a given string represents a valid version number, and assign it
4439# to a variable.
4440
4441# Argument 1: the variable to assign to
4442# Argument 2: the value given by the user
4443
4444
4445
4446
4447#
4448# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472# Major library component reside in separate files.
4473#
4474# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4475# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4476#
4477# This code is free software; you can redistribute it and/or modify it
4478# under the terms of the GNU General Public License version 2 only, as
4479# published by the Free Software Foundation.  Oracle designates this
4480# particular file as subject to the "Classpath" exception as provided
4481# by Oracle in the LICENSE file that accompanied this code.
4482#
4483# This code is distributed in the hope that it will be useful, but WITHOUT
4484# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4485# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4486# version 2 for more details (a copy is included in the LICENSE file that
4487# accompanied this code).
4488#
4489# You should have received a copy of the GNU General Public License version
4490# 2 along with this work; if not, write to the Free Software Foundation,
4491# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4492#
4493# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4494# or visit www.oracle.com if you need additional information or have any
4495# questions.
4496#
4497
4498################################################################################
4499# Setup alsa (Advanced Linux Sound Architecture)
4500################################################################################
4501
4502
4503#
4504# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528################################################################################
4529# Setup bundled libraries.
4530#
4531# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4532# OpenJDK repository. Default is to use these libraries as bundled, but they
4533# might be replaced by en external version by the user.
4534################################################################################
4535
4536
4537################################################################################
4538# Setup libjpeg
4539################################################################################
4540
4541
4542################################################################################
4543# Setup giflib
4544################################################################################
4545
4546
4547################################################################################
4548# Setup libpng
4549################################################################################
4550
4551
4552################################################################################
4553# Setup zlib
4554################################################################################
4555
4556
4557################################################################################
4558# Setup lcms (Little CMS)
4559################################################################################
4560
4561
4562#
4563# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4565#
4566# This code is free software; you can redistribute it and/or modify it
4567# under the terms of the GNU General Public License version 2 only, as
4568# published by the Free Software Foundation.  Oracle designates this
4569# particular file as subject to the "Classpath" exception as provided
4570# by Oracle in the LICENSE file that accompanied this code.
4571#
4572# This code is distributed in the hope that it will be useful, but WITHOUT
4573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4575# version 2 for more details (a copy is included in the LICENSE file that
4576# accompanied this code).
4577#
4578# You should have received a copy of the GNU General Public License version
4579# 2 along with this work; if not, write to the Free Software Foundation,
4580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4581#
4582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4583# or visit www.oracle.com if you need additional information or have any
4584# questions.
4585#
4586
4587################################################################################
4588# Setup cups (Common Unix Printing System)
4589################################################################################
4590
4591
4592#
4593# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617################################################################################
4618# Setup libffi (Foreign Function Interface)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Build the freetype lib from source
4649################################################################################
4650
4651
4652################################################################################
4653# Check if a potential freeype library match is correct and usable
4654################################################################################
4655
4656
4657################################################################################
4658# Setup freetype (The FreeType2 font rendering library)
4659################################################################################
4660
4661
4662#
4663# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4664# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4665#
4666# This code is free software; you can redistribute it and/or modify it
4667# under the terms of the GNU General Public License version 2 only, as
4668# published by the Free Software Foundation.  Oracle designates this
4669# particular file as subject to the "Classpath" exception as provided
4670# by Oracle in the LICENSE file that accompanied this code.
4671#
4672# This code is distributed in the hope that it will be useful, but WITHOUT
4673# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4674# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4675# version 2 for more details (a copy is included in the LICENSE file that
4676# accompanied this code).
4677#
4678# You should have received a copy of the GNU General Public License version
4679# 2 along with this work; if not, write to the Free Software Foundation,
4680# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4681#
4682# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4683# or visit www.oracle.com if you need additional information or have any
4684# questions.
4685#
4686
4687################################################################################
4688# Setup the standard C/C++ runtime libraries.
4689#
4690# Most importantly, determine if stdc++ should be linked statically or
4691# dynamically.
4692################################################################################
4693
4694
4695#
4696# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4697# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4698#
4699# This code is free software; you can redistribute it and/or modify it
4700# under the terms of the GNU General Public License version 2 only, as
4701# published by the Free Software Foundation.  Oracle designates this
4702# particular file as subject to the "Classpath" exception as provided
4703# by Oracle in the LICENSE file that accompanied this code.
4704#
4705# This code is distributed in the hope that it will be useful, but WITHOUT
4706# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4707# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4708# version 2 for more details (a copy is included in the LICENSE file that
4709# accompanied this code).
4710#
4711# You should have received a copy of the GNU General Public License version
4712# 2 along with this work; if not, write to the Free Software Foundation,
4713# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4714#
4715# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4716# or visit www.oracle.com if you need additional information or have any
4717# questions.
4718#
4719
4720################################################################################
4721# Setup X11 Windows system
4722################################################################################
4723
4724
4725
4726################################################################################
4727# Determine which libraries are needed for this configuration
4728################################################################################
4729
4730
4731################################################################################
4732# Parse library options, and setup needed libraries
4733################################################################################
4734
4735
4736################################################################################
4737# Setup llvm (Low-Level VM)
4738################################################################################
4739
4740
4741################################################################################
4742# Setup various libraries, typically small system libraries
4743################################################################################
4744
4745
4746################################################################################
4747# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4748# redistribute it in the test image.
4749################################################################################
4750
4751
4752
4753#
4754# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4756#
4757# This code is free software; you can redistribute it and/or modify it
4758# under the terms of the GNU General Public License version 2 only, as
4759# published by the Free Software Foundation.  Oracle designates this
4760# particular file as subject to the "Classpath" exception as provided
4761# by Oracle in the LICENSE file that accompanied this code.
4762#
4763# This code is distributed in the hope that it will be useful, but WITHOUT
4764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4766# version 2 for more details (a copy is included in the LICENSE file that
4767# accompanied this code).
4768#
4769# You should have received a copy of the GNU General Public License version
4770# 2 along with this work; if not, write to the Free Software Foundation,
4771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4772#
4773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4774# or visit www.oracle.com if you need additional information or have any
4775# questions.
4776#
4777
4778# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4779# Converts autoconf style CPU name to OpenJDK style, into
4780# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4781
4782
4783# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4784# Converts autoconf style OS name to OpenJDK style, into
4785# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4786
4787
4788# Expects $host_os $host_cpu $build_os and $build_cpu
4789# and $with_target_bits to have been setup!
4790#
4791# Translate the standard triplet(quadruplet) definition
4792# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4793# OPENJDK_BUILD_OS, etc.
4794
4795
4796# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4797# accordingly. Must be done after setting up build and target system, but before
4798# doing anything else with these values.
4799
4800
4801# Setup the legacy variables, for controlling the old makefiles.
4802#
4803
4804
4805# $1 - Either TARGET or BUILD to setup the variables for.
4806
4807
4808
4809
4810#%%% Build and target systems %%%
4811
4812
4813
4814
4815# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4816# Add -mX to various FLAGS variables.
4817
4818
4819
4820
4821
4822
4823#
4824# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4826#
4827# This code is free software; you can redistribute it and/or modify it
4828# under the terms of the GNU General Public License version 2 only, as
4829# published by the Free Software Foundation.  Oracle designates this
4830# particular file as subject to the "Classpath" exception as provided
4831# by Oracle in the LICENSE file that accompanied this code.
4832#
4833# This code is distributed in the hope that it will be useful, but WITHOUT
4834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4836# version 2 for more details (a copy is included in the LICENSE file that
4837# accompanied this code).
4838#
4839# You should have received a copy of the GNU General Public License version
4840# 2 along with this work; if not, write to the Free Software Foundation,
4841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4842#
4843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4844# or visit www.oracle.com if you need additional information or have any
4845# questions.
4846#
4847
4848
4849
4850
4851
4852
4853
4854################################################################################
4855# Define a mechanism for importing extra prebuilt modules
4856#
4857
4858
4859
4860#
4861# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4862# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4863#
4864# This code is free software; you can redistribute it and/or modify it
4865# under the terms of the GNU General Public License version 2 only, as
4866# published by the Free Software Foundation.  Oracle designates this
4867# particular file as subject to the "Classpath" exception as provided
4868# by Oracle in the LICENSE file that accompanied this code.
4869#
4870# This code is distributed in the hope that it will be useful, but WITHOUT
4871# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4872# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4873# version 2 for more details (a copy is included in the LICENSE file that
4874# accompanied this code).
4875#
4876# You should have received a copy of the GNU General Public License version
4877# 2 along with this work; if not, write to the Free Software Foundation,
4878# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4879#
4880# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4881# or visit www.oracle.com if you need additional information or have any
4882# questions.
4883#
4884
4885########################################################################
4886# This file is responsible for detecting, verifying and setting up the
4887# toolchain, i.e. the compiler, linker and related utilities. It will setup
4888# proper paths to the binaries, but it will not setup any flags.
4889#
4890# The binaries used is determined by the toolchain type, which is the family of
4891# compilers and related tools that are used.
4892########################################################################
4893
4894
4895# All valid toolchains, regardless of platform (used by help.m4)
4896VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4897
4898# These toolchains are valid on different platforms
4899VALID_TOOLCHAINS_linux="gcc clang"
4900VALID_TOOLCHAINS_solaris="solstudio"
4901VALID_TOOLCHAINS_macosx="gcc clang"
4902VALID_TOOLCHAINS_aix="xlc"
4903VALID_TOOLCHAINS_windows="microsoft"
4904
4905# Toolchain descriptions
4906TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4907TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4908TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4909TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4910TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4911
4912# Minimum supported versions, empty means unspecified
4913TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4914TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4915TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4916TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4917TOOLCHAIN_MINIMUM_VERSION_xlc=""
4918
4919# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4920# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4921# $1 - optional variable prefix for compiler and version variables (BUILD_)
4922# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4923
4924
4925# Check if the configured compiler (C and C++) is of a specific version or
4926# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4927#
4928# Arguments:
4929#   VERSION:   The version string to check against the found version
4930#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4931#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4932#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4933
4934
4935
4936
4937# Setup a number of variables describing how native output files are
4938# named on this platform/toolchain.
4939
4940
4941# Determine which toolchain type to use, and make sure it is valid for this
4942# platform. Setup various information about the selected toolchain.
4943
4944
4945# Before we start detecting the toolchain executables, we might need some
4946# special setup, e.g. additional paths etc.
4947
4948
4949# Restore path, etc
4950
4951
4952# Check if a compiler is of the toolchain type we expect, and save the version
4953# information from it. If the compiler does not match the expected type,
4954# this function will abort using AC_MSG_ERROR. If it matches, the version will
4955# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4956# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4957#
4958# $1 = compiler to test (CC or CXX)
4959# $2 = human readable name of compiler (C or C++)
4960
4961
4962# Try to locate the given C or C++ compiler in the path, or otherwise.
4963#
4964# $1 = compiler to test (CC or CXX)
4965# $2 = human readable name of compiler (C or C++)
4966# $3 = list of compiler names to search for
4967
4968
4969# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4970# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4971# archiver (AR). Verify that the compilers are correct according to the
4972# toolchain type.
4973
4974
4975# Setup additional tools that is considered a part of the toolchain, but not the
4976# core part. Many of these are highly platform-specific and do not exist,
4977# and/or are not needed on all platforms.
4978
4979
4980# Setup the build tools (i.e, the compiler and linker used to build programs
4981# that should be run on the build platform, not the target platform, as a build
4982# helper). Since the non-cross-compile case uses the normal, target compilers
4983# for this, we can only do this after these have been setup.
4984
4985
4986# Setup legacy variables that are still needed as alternative ways to refer to
4987# parts of the toolchain.
4988
4989
4990# Do some additional checks on the detected tools.
4991
4992
4993# Setup the JTReg Regression Test Harness.
4994
4995
4996#
4997# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4999#
5000# This code is free software; you can redistribute it and/or modify it
5001# under the terms of the GNU General Public License version 2 only, as
5002# published by the Free Software Foundation.  Oracle designates this
5003# particular file as subject to the "Classpath" exception as provided
5004# by Oracle in the LICENSE file that accompanied this code.
5005#
5006# This code is distributed in the hope that it will be useful, but WITHOUT
5007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5009# version 2 for more details (a copy is included in the LICENSE file that
5010# accompanied this code).
5011#
5012# You should have received a copy of the GNU General Public License version
5013# 2 along with this work; if not, write to the Free Software Foundation,
5014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5015#
5016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5017# or visit www.oracle.com if you need additional information or have any
5018# questions.
5019#
5020
5021################################################################################
5022# The order of these defines the priority by which we try to find them.
5023VALID_VS_VERSIONS="2013 2012 2010"
5024
5025VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5026VS_VERSION_INTERNAL_2010=100
5027VS_MSVCR_2010=msvcr100.dll
5028# We don't use msvcp on Visual Studio 2010
5029#VS_MSVCP_2010=msvcp100.dll
5030VS_ENVVAR_2010="VS100COMNTOOLS"
5031VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5032VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5033VS_VS_PLATFORM_NAME_2010="v100"
5034VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5035
5036VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5037VS_VERSION_INTERNAL_2012=110
5038VS_MSVCR_2012=msvcr110.dll
5039VS_MSVCP_2012=msvcp110.dll
5040VS_ENVVAR_2012="VS110COMNTOOLS"
5041VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5042VS_SDK_INSTALLDIR_2012=
5043VS_VS_PLATFORM_NAME_2012="v110"
5044VS_SDK_PLATFORM_NAME_2012=
5045
5046VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5047VS_VERSION_INTERNAL_2013=120
5048VS_MSVCR_2013=msvcr120.dll
5049VS_MSVCP_2013=msvcp120.dll
5050VS_ENVVAR_2013="VS120COMNTOOLS"
5051VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5052VS_SDK_INSTALLDIR_2013=
5053VS_VS_PLATFORM_NAME_2013="v120"
5054VS_SDK_PLATFORM_NAME_2013=
5055
5056################################################################################
5057
5058
5059
5060################################################################################
5061
5062
5063
5064################################################################################
5065# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5066# build environment and assigns it to VS_ENV_CMD
5067
5068
5069################################################################################
5070
5071
5072
5073################################################################################
5074# Check if the VS env variables were setup prior to running configure.
5075# If not, then find vcvarsall.bat and run it automatically, and integrate
5076# the set env variables into the spec file.
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091# This line needs to be here, verbatim, after all includes and the dummy hook
5092# definitions. It is replaced with custom functionality when building
5093# custom sources.
5094#CUSTOM_AUTOCONF_INCLUDE
5095
5096# Do not change or remove the following line, it is needed for consistency checks:
5097DATE_WHEN_GENERATED=1467039751
5098
5099###############################################################################
5100#
5101# Initialization / Boot-strapping
5102#
5103# The bootstrapping process needs to solve the "chicken or the egg" problem,
5104# thus it jumps back and forth, each time gaining something needed later on.
5105#
5106###############################################################################
5107
5108# If we are requested to print additional help, do that and then exit.
5109# This must be the very first call.
5110
5111  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5112
5113    # Print available toolchains
5114    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5115    $PRINTF "Which are valid to use depends on the build platform.\n"
5116    for toolchain in $VALID_TOOLCHAINS_all; do
5117      # Use indirect variable referencing
5118      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5119      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5120      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5121    done
5122    $PRINTF "\n"
5123
5124    # Print available jvm features
5125    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5126    $PRINTF "Which are valid to use depends on the target platform.\n  "
5127    $PRINTF "%s " $VALID_JVM_FEATURES
5128    $PRINTF "\n"
5129
5130    # And now exit directly
5131    exit 0
5132  fi
5133
5134
5135# Basic initialization that must happen first of all in the normal process.
5136
5137  # Save the original command line. This is passed to us by the wrapper configure script.
5138
5139  # Save the path variable before it gets changed
5140  ORIGINAL_PATH="$PATH"
5141
5142  DATE_WHEN_CONFIGURED=`LANG=C date`
5143
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5145$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5147$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5148
5149
5150  # Start with tools that do not need have cross compilation support
5151  # and can be expected to be found in the default PATH. These tools are
5152  # used by configure.
5153
5154  # First are all the simple required tools.
5155
5156
5157
5158  # Publish this variable in the help.
5159
5160
5161  if [ -z "${BASENAME+x}" ]; then
5162    # The variable is not set by user, try to locate tool using the code snippet
5163    for ac_prog in basename
5164do
5165  # Extract the first word of "$ac_prog", so it can be a program name with args.
5166set dummy $ac_prog; ac_word=$2
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
5169if ${ac_cv_path_BASENAME+:} false; then :
5170  $as_echo_n "(cached) " >&6
5171else
5172  case $BASENAME in
5173  [\\/]* | ?:[\\/]*)
5174  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5175  ;;
5176  *)
5177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180  IFS=$as_save_IFS
5181  test -z "$as_dir" && as_dir=.
5182    for ac_exec_ext in '' $ac_executable_extensions; do
5183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186    break 2
5187  fi
5188done
5189  done
5190IFS=$as_save_IFS
5191
5192  ;;
5193esac
5194fi
5195BASENAME=$ac_cv_path_BASENAME
5196if test -n "$BASENAME"; then
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5198$as_echo "$BASENAME" >&6; }
5199else
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5201$as_echo "no" >&6; }
5202fi
5203
5204
5205  test -n "$BASENAME" && break
5206done
5207
5208  else
5209    # The variable is set, but is it from the command line or the environment?
5210
5211    # Try to remove the string !BASENAME! from our list.
5212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5214      # If it failed, the variable was not from the command line. Ignore it,
5215      # but warn the user (except for BASH, which is always set by the calling BASH).
5216      if test "xBASENAME" != xBASH; then
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5218$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5219      fi
5220      # Try to locate tool using the code snippet
5221      for ac_prog in basename
5222do
5223  # Extract the first word of "$ac_prog", so it can be a program name with args.
5224set dummy $ac_prog; ac_word=$2
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5226$as_echo_n "checking for $ac_word... " >&6; }
5227if ${ac_cv_path_BASENAME+:} false; then :
5228  $as_echo_n "(cached) " >&6
5229else
5230  case $BASENAME in
5231  [\\/]* | ?:[\\/]*)
5232  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5233  ;;
5234  *)
5235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236for as_dir in $PATH
5237do
5238  IFS=$as_save_IFS
5239  test -z "$as_dir" && as_dir=.
5240    for ac_exec_ext in '' $ac_executable_extensions; do
5241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5244    break 2
5245  fi
5246done
5247  done
5248IFS=$as_save_IFS
5249
5250  ;;
5251esac
5252fi
5253BASENAME=$ac_cv_path_BASENAME
5254if test -n "$BASENAME"; then
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5256$as_echo "$BASENAME" >&6; }
5257else
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5259$as_echo "no" >&6; }
5260fi
5261
5262
5263  test -n "$BASENAME" && break
5264done
5265
5266    else
5267      # If it succeeded, then it was overridden by the user. We will use it
5268      # for the tool.
5269
5270      # First remove it from the list of overridden variables, so we can test
5271      # for unknown variables in the end.
5272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5273
5274      # Check if we try to supply an empty value
5275      if test "x$BASENAME" = x; then
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5277$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5279$as_echo_n "checking for BASENAME... " >&6; }
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5281$as_echo "disabled" >&6; }
5282      else
5283        # Check if the provided tool contains a complete path.
5284        tool_specified="$BASENAME"
5285        tool_basename="${tool_specified##*/}"
5286        if test "x$tool_basename" = "x$tool_specified"; then
5287          # A command without a complete path is provided, search $PATH.
5288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5289$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5290          # Extract the first word of "$tool_basename", so it can be a program name with args.
5291set dummy $tool_basename; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330          if test "x$BASENAME" = x; then
5331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5332          fi
5333        else
5334          # Otherwise we believe it is a complete path. Use it as it is.
5335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5336$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5338$as_echo_n "checking for BASENAME... " >&6; }
5339          if test ! -x "$tool_specified"; then
5340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5341$as_echo "not found" >&6; }
5342            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5343          fi
5344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5345$as_echo "$tool_specified" >&6; }
5346        fi
5347      fi
5348    fi
5349
5350  fi
5351
5352
5353
5354  if test "x$BASENAME" = x; then
5355    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5356  fi
5357
5358
5359
5360
5361
5362  # Publish this variable in the help.
5363
5364
5365  if [ -z "${BASH+x}" ]; then
5366    # The variable is not set by user, try to locate tool using the code snippet
5367    for ac_prog in bash
5368do
5369  # Extract the first word of "$ac_prog", so it can be a program name with args.
5370set dummy $ac_prog; ac_word=$2
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5372$as_echo_n "checking for $ac_word... " >&6; }
5373if ${ac_cv_path_BASH+:} false; then :
5374  $as_echo_n "(cached) " >&6
5375else
5376  case $BASH in
5377  [\\/]* | ?:[\\/]*)
5378  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5379  ;;
5380  *)
5381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5382for as_dir in $PATH
5383do
5384  IFS=$as_save_IFS
5385  test -z "$as_dir" && as_dir=.
5386    for ac_exec_ext in '' $ac_executable_extensions; do
5387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5388    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5390    break 2
5391  fi
5392done
5393  done
5394IFS=$as_save_IFS
5395
5396  ;;
5397esac
5398fi
5399BASH=$ac_cv_path_BASH
5400if test -n "$BASH"; then
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5402$as_echo "$BASH" >&6; }
5403else
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405$as_echo "no" >&6; }
5406fi
5407
5408
5409  test -n "$BASH" && break
5410done
5411
5412  else
5413    # The variable is set, but is it from the command line or the environment?
5414
5415    # Try to remove the string !BASH! from our list.
5416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5418      # If it failed, the variable was not from the command line. Ignore it,
5419      # but warn the user (except for BASH, which is always set by the calling BASH).
5420      if test "xBASH" != xBASH; then
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5422$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5423      fi
5424      # Try to locate tool using the code snippet
5425      for ac_prog in bash
5426do
5427  # Extract the first word of "$ac_prog", so it can be a program name with args.
5428set dummy $ac_prog; ac_word=$2
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430$as_echo_n "checking for $ac_word... " >&6; }
5431if ${ac_cv_path_BASH+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  case $BASH in
5435  [\\/]* | ?:[\\/]*)
5436  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5437  ;;
5438  *)
5439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442  IFS=$as_save_IFS
5443  test -z "$as_dir" && as_dir=.
5444    for ac_exec_ext in '' $ac_executable_extensions; do
5445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5446    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448    break 2
5449  fi
5450done
5451  done
5452IFS=$as_save_IFS
5453
5454  ;;
5455esac
5456fi
5457BASH=$ac_cv_path_BASH
5458if test -n "$BASH"; then
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5460$as_echo "$BASH" >&6; }
5461else
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
5464fi
5465
5466
5467  test -n "$BASH" && break
5468done
5469
5470    else
5471      # If it succeeded, then it was overridden by the user. We will use it
5472      # for the tool.
5473
5474      # First remove it from the list of overridden variables, so we can test
5475      # for unknown variables in the end.
5476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5477
5478      # Check if we try to supply an empty value
5479      if test "x$BASH" = x; then
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5481$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5483$as_echo_n "checking for BASH... " >&6; }
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5485$as_echo "disabled" >&6; }
5486      else
5487        # Check if the provided tool contains a complete path.
5488        tool_specified="$BASH"
5489        tool_basename="${tool_specified##*/}"
5490        if test "x$tool_basename" = "x$tool_specified"; then
5491          # A command without a complete path is provided, search $PATH.
5492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5493$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5494          # Extract the first word of "$tool_basename", so it can be a program name with args.
5495set dummy $tool_basename; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534          if test "x$BASH" = x; then
5535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5536          fi
5537        else
5538          # Otherwise we believe it is a complete path. Use it as it is.
5539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5540$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5542$as_echo_n "checking for BASH... " >&6; }
5543          if test ! -x "$tool_specified"; then
5544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5545$as_echo "not found" >&6; }
5546            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5547          fi
5548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5549$as_echo "$tool_specified" >&6; }
5550        fi
5551      fi
5552    fi
5553
5554  fi
5555
5556
5557
5558  if test "x$BASH" = x; then
5559    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5560  fi
5561
5562
5563
5564
5565
5566  # Publish this variable in the help.
5567
5568
5569  if [ -z "${CAT+x}" ]; then
5570    # The variable is not set by user, try to locate tool using the code snippet
5571    for ac_prog in cat
5572do
5573  # Extract the first word of "$ac_prog", so it can be a program name with args.
5574set dummy $ac_prog; ac_word=$2
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5576$as_echo_n "checking for $ac_word... " >&6; }
5577if ${ac_cv_path_CAT+:} false; then :
5578  $as_echo_n "(cached) " >&6
5579else
5580  case $CAT in
5581  [\\/]* | ?:[\\/]*)
5582  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5583  ;;
5584  *)
5585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586for as_dir in $PATH
5587do
5588  IFS=$as_save_IFS
5589  test -z "$as_dir" && as_dir=.
5590    for ac_exec_ext in '' $ac_executable_extensions; do
5591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594    break 2
5595  fi
5596done
5597  done
5598IFS=$as_save_IFS
5599
5600  ;;
5601esac
5602fi
5603CAT=$ac_cv_path_CAT
5604if test -n "$CAT"; then
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5606$as_echo "$CAT" >&6; }
5607else
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609$as_echo "no" >&6; }
5610fi
5611
5612
5613  test -n "$CAT" && break
5614done
5615
5616  else
5617    # The variable is set, but is it from the command line or the environment?
5618
5619    # Try to remove the string !CAT! from our list.
5620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5622      # If it failed, the variable was not from the command line. Ignore it,
5623      # but warn the user (except for BASH, which is always set by the calling BASH).
5624      if test "xCAT" != xBASH; then
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5626$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5627      fi
5628      # Try to locate tool using the code snippet
5629      for ac_prog in cat
5630do
5631  # Extract the first word of "$ac_prog", so it can be a program name with args.
5632set dummy $ac_prog; ac_word=$2
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5634$as_echo_n "checking for $ac_word... " >&6; }
5635if ${ac_cv_path_CAT+:} false; then :
5636  $as_echo_n "(cached) " >&6
5637else
5638  case $CAT in
5639  [\\/]* | ?:[\\/]*)
5640  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5641  ;;
5642  *)
5643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646  IFS=$as_save_IFS
5647  test -z "$as_dir" && as_dir=.
5648    for ac_exec_ext in '' $ac_executable_extensions; do
5649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652    break 2
5653  fi
5654done
5655  done
5656IFS=$as_save_IFS
5657
5658  ;;
5659esac
5660fi
5661CAT=$ac_cv_path_CAT
5662if test -n "$CAT"; then
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5664$as_echo "$CAT" >&6; }
5665else
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667$as_echo "no" >&6; }
5668fi
5669
5670
5671  test -n "$CAT" && break
5672done
5673
5674    else
5675      # If it succeeded, then it was overridden by the user. We will use it
5676      # for the tool.
5677
5678      # First remove it from the list of overridden variables, so we can test
5679      # for unknown variables in the end.
5680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5681
5682      # Check if we try to supply an empty value
5683      if test "x$CAT" = x; then
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5685$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5687$as_echo_n "checking for CAT... " >&6; }
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5689$as_echo "disabled" >&6; }
5690      else
5691        # Check if the provided tool contains a complete path.
5692        tool_specified="$CAT"
5693        tool_basename="${tool_specified##*/}"
5694        if test "x$tool_basename" = "x$tool_specified"; then
5695          # A command without a complete path is provided, search $PATH.
5696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5697$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5698          # Extract the first word of "$tool_basename", so it can be a program name with args.
5699set dummy $tool_basename; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738          if test "x$CAT" = x; then
5739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5740          fi
5741        else
5742          # Otherwise we believe it is a complete path. Use it as it is.
5743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5744$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5746$as_echo_n "checking for CAT... " >&6; }
5747          if test ! -x "$tool_specified"; then
5748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5749$as_echo "not found" >&6; }
5750            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5751          fi
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5753$as_echo "$tool_specified" >&6; }
5754        fi
5755      fi
5756    fi
5757
5758  fi
5759
5760
5761
5762  if test "x$CAT" = x; then
5763    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if [ -z "${CHMOD+x}" ]; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in chmod
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CHMOD+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CHMOD in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CHMOD=$ac_cv_path_CHMOD
5808if test -n "$CHMOD"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5810$as_echo "$CHMOD" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CHMOD" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CHMOD! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCHMOD" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in chmod
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CHMOD+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CHMOD in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CHMOD=$ac_cv_path_CHMOD
5866if test -n "$CHMOD"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5868$as_echo "$CHMOD" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CHMOD" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if we try to supply an empty value
5887      if test "x$CHMOD" = x; then
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5889$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5891$as_echo_n "checking for CHMOD... " >&6; }
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5893$as_echo "disabled" >&6; }
5894      else
5895        # Check if the provided tool contains a complete path.
5896        tool_specified="$CHMOD"
5897        tool_basename="${tool_specified##*/}"
5898        if test "x$tool_basename" = "x$tool_specified"; then
5899          # A command without a complete path is provided, search $PATH.
5900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5901$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5902          # Extract the first word of "$tool_basename", so it can be a program name with args.
5903set dummy $tool_basename; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942          if test "x$CHMOD" = x; then
5943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5944          fi
5945        else
5946          # Otherwise we believe it is a complete path. Use it as it is.
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5948$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5950$as_echo_n "checking for CHMOD... " >&6; }
5951          if test ! -x "$tool_specified"; then
5952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5953$as_echo "not found" >&6; }
5954            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5955          fi
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5957$as_echo "$tool_specified" >&6; }
5958        fi
5959      fi
5960    fi
5961
5962  fi
5963
5964
5965
5966  if test "x$CHMOD" = x; then
5967    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5968  fi
5969
5970
5971
5972
5973
5974  # Publish this variable in the help.
5975
5976
5977  if [ -z "${CMP+x}" ]; then
5978    # The variable is not set by user, try to locate tool using the code snippet
5979    for ac_prog in cmp
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_path_CMP+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  case $CMP in
5989  [\\/]* | ?:[\\/]*)
5990  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5991  ;;
5992  *)
5993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996  IFS=$as_save_IFS
5997  test -z "$as_dir" && as_dir=.
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6000    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002    break 2
6003  fi
6004done
6005  done
6006IFS=$as_save_IFS
6007
6008  ;;
6009esac
6010fi
6011CMP=$ac_cv_path_CMP
6012if test -n "$CMP"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6014$as_echo "$CMP" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$CMP" && break
6022done
6023
6024  else
6025    # The variable is set, but is it from the command line or the environment?
6026
6027    # Try to remove the string !CMP! from our list.
6028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6030      # If it failed, the variable was not from the command line. Ignore it,
6031      # but warn the user (except for BASH, which is always set by the calling BASH).
6032      if test "xCMP" != xBASH; then
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6034$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6035      fi
6036      # Try to locate tool using the code snippet
6037      for ac_prog in cmp
6038do
6039  # Extract the first word of "$ac_prog", so it can be a program name with args.
6040set dummy $ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_path_CMP+:} false; then :
6044  $as_echo_n "(cached) " >&6
6045else
6046  case $CMP in
6047  [\\/]* | ?:[\\/]*)
6048  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6049  ;;
6050  *)
6051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066  ;;
6067esac
6068fi
6069CMP=$ac_cv_path_CMP
6070if test -n "$CMP"; then
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6072$as_echo "$CMP" >&6; }
6073else
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075$as_echo "no" >&6; }
6076fi
6077
6078
6079  test -n "$CMP" && break
6080done
6081
6082    else
6083      # If it succeeded, then it was overridden by the user. We will use it
6084      # for the tool.
6085
6086      # First remove it from the list of overridden variables, so we can test
6087      # for unknown variables in the end.
6088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6089
6090      # Check if we try to supply an empty value
6091      if test "x$CMP" = x; then
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6093$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6095$as_echo_n "checking for CMP... " >&6; }
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6097$as_echo "disabled" >&6; }
6098      else
6099        # Check if the provided tool contains a complete path.
6100        tool_specified="$CMP"
6101        tool_basename="${tool_specified##*/}"
6102        if test "x$tool_basename" = "x$tool_specified"; then
6103          # A command without a complete path is provided, search $PATH.
6104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6105$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6106          # Extract the first word of "$tool_basename", so it can be a program name with args.
6107set dummy $tool_basename; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146          if test "x$CMP" = x; then
6147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6148          fi
6149        else
6150          # Otherwise we believe it is a complete path. Use it as it is.
6151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6152$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6154$as_echo_n "checking for CMP... " >&6; }
6155          if test ! -x "$tool_specified"; then
6156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6157$as_echo "not found" >&6; }
6158            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6159          fi
6160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6161$as_echo "$tool_specified" >&6; }
6162        fi
6163      fi
6164    fi
6165
6166  fi
6167
6168
6169
6170  if test "x$CMP" = x; then
6171    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6172  fi
6173
6174
6175
6176
6177
6178  # Publish this variable in the help.
6179
6180
6181  if [ -z "${COMM+x}" ]; then
6182    # The variable is not set by user, try to locate tool using the code snippet
6183    for ac_prog in comm
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_COMM+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $COMM in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215COMM=$ac_cv_path_COMM
6216if test -n "$COMM"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6218$as_echo "$COMM" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$COMM" && break
6226done
6227
6228  else
6229    # The variable is set, but is it from the command line or the environment?
6230
6231    # Try to remove the string !COMM! from our list.
6232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234      # If it failed, the variable was not from the command line. Ignore it,
6235      # but warn the user (except for BASH, which is always set by the calling BASH).
6236      if test "xCOMM" != xBASH; then
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6238$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6239      fi
6240      # Try to locate tool using the code snippet
6241      for ac_prog in comm
6242do
6243  # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_COMM+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $COMM in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273COMM=$ac_cv_path_COMM
6274if test -n "$COMM"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6276$as_echo "$COMM" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283  test -n "$COMM" && break
6284done
6285
6286    else
6287      # If it succeeded, then it was overridden by the user. We will use it
6288      # for the tool.
6289
6290      # First remove it from the list of overridden variables, so we can test
6291      # for unknown variables in the end.
6292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293
6294      # Check if we try to supply an empty value
6295      if test "x$COMM" = x; then
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6297$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6299$as_echo_n "checking for COMM... " >&6; }
6300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6301$as_echo "disabled" >&6; }
6302      else
6303        # Check if the provided tool contains a complete path.
6304        tool_specified="$COMM"
6305        tool_basename="${tool_specified##*/}"
6306        if test "x$tool_basename" = "x$tool_specified"; then
6307          # A command without a complete path is provided, search $PATH.
6308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6309$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6310          # Extract the first word of "$tool_basename", so it can be a program name with args.
6311set dummy $tool_basename; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350          if test "x$COMM" = x; then
6351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352          fi
6353        else
6354          # Otherwise we believe it is a complete path. Use it as it is.
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6356$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6358$as_echo_n "checking for COMM... " >&6; }
6359          if test ! -x "$tool_specified"; then
6360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361$as_echo "not found" >&6; }
6362            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6363          fi
6364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365$as_echo "$tool_specified" >&6; }
6366        fi
6367      fi
6368    fi
6369
6370  fi
6371
6372
6373
6374  if test "x$COMM" = x; then
6375    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6376  fi
6377
6378
6379
6380
6381
6382  # Publish this variable in the help.
6383
6384
6385  if [ -z "${CP+x}" ]; then
6386    # The variable is not set by user, try to locate tool using the code snippet
6387    for ac_prog in cp
6388do
6389  # Extract the first word of "$ac_prog", so it can be a program name with args.
6390set dummy $ac_prog; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if ${ac_cv_path_CP+:} false; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CP in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6408    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CP=$ac_cv_path_CP
6420if test -n "$CP"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6422$as_echo "$CP" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429  test -n "$CP" && break
6430done
6431
6432  else
6433    # The variable is set, but is it from the command line or the environment?
6434
6435    # Try to remove the string !CP! from our list.
6436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6438      # If it failed, the variable was not from the command line. Ignore it,
6439      # but warn the user (except for BASH, which is always set by the calling BASH).
6440      if test "xCP" != xBASH; then
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6442$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6443      fi
6444      # Try to locate tool using the code snippet
6445      for ac_prog in cp
6446do
6447  # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if ${ac_cv_path_CP+:} false; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  case $CP in
6455  [\\/]* | ?:[\\/]*)
6456  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6457  ;;
6458  *)
6459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462  IFS=$as_save_IFS
6463  test -z "$as_dir" && as_dir=.
6464    for ac_exec_ext in '' $ac_executable_extensions; do
6465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6466    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6468    break 2
6469  fi
6470done
6471  done
6472IFS=$as_save_IFS
6473
6474  ;;
6475esac
6476fi
6477CP=$ac_cv_path_CP
6478if test -n "$CP"; then
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6480$as_echo "$CP" >&6; }
6481else
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6483$as_echo "no" >&6; }
6484fi
6485
6486
6487  test -n "$CP" && break
6488done
6489
6490    else
6491      # If it succeeded, then it was overridden by the user. We will use it
6492      # for the tool.
6493
6494      # First remove it from the list of overridden variables, so we can test
6495      # for unknown variables in the end.
6496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6497
6498      # Check if we try to supply an empty value
6499      if test "x$CP" = x; then
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6501$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6503$as_echo_n "checking for CP... " >&6; }
6504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6505$as_echo "disabled" >&6; }
6506      else
6507        # Check if the provided tool contains a complete path.
6508        tool_specified="$CP"
6509        tool_basename="${tool_specified##*/}"
6510        if test "x$tool_basename" = "x$tool_specified"; then
6511          # A command without a complete path is provided, search $PATH.
6512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6513$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6514          # Extract the first word of "$tool_basename", so it can be a program name with args.
6515set dummy $tool_basename; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554          if test "x$CP" = x; then
6555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6556          fi
6557        else
6558          # Otherwise we believe it is a complete path. Use it as it is.
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6560$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6562$as_echo_n "checking for CP... " >&6; }
6563          if test ! -x "$tool_specified"; then
6564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6565$as_echo "not found" >&6; }
6566            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6567          fi
6568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6569$as_echo "$tool_specified" >&6; }
6570        fi
6571      fi
6572    fi
6573
6574  fi
6575
6576
6577
6578  if test "x$CP" = x; then
6579    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6580  fi
6581
6582
6583
6584
6585
6586  # Publish this variable in the help.
6587
6588
6589  if [ -z "${CUT+x}" ]; then
6590    # The variable is not set by user, try to locate tool using the code snippet
6591    for ac_prog in cut
6592do
6593  # Extract the first word of "$ac_prog", so it can be a program name with args.
6594set dummy $ac_prog; ac_word=$2
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596$as_echo_n "checking for $ac_word... " >&6; }
6597if ${ac_cv_path_CUT+:} false; then :
6598  $as_echo_n "(cached) " >&6
6599else
6600  case $CUT in
6601  [\\/]* | ?:[\\/]*)
6602  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6603  ;;
6604  *)
6605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in $PATH
6607do
6608  IFS=$as_save_IFS
6609  test -z "$as_dir" && as_dir=.
6610    for ac_exec_ext in '' $ac_executable_extensions; do
6611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614    break 2
6615  fi
6616done
6617  done
6618IFS=$as_save_IFS
6619
6620  ;;
6621esac
6622fi
6623CUT=$ac_cv_path_CUT
6624if test -n "$CUT"; then
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6626$as_echo "$CUT" >&6; }
6627else
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629$as_echo "no" >&6; }
6630fi
6631
6632
6633  test -n "$CUT" && break
6634done
6635
6636  else
6637    # The variable is set, but is it from the command line or the environment?
6638
6639    # Try to remove the string !CUT! from our list.
6640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6642      # If it failed, the variable was not from the command line. Ignore it,
6643      # but warn the user (except for BASH, which is always set by the calling BASH).
6644      if test "xCUT" != xBASH; then
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6646$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6647      fi
6648      # Try to locate tool using the code snippet
6649      for ac_prog in cut
6650do
6651  # Extract the first word of "$ac_prog", so it can be a program name with args.
6652set dummy $ac_prog; ac_word=$2
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6654$as_echo_n "checking for $ac_word... " >&6; }
6655if ${ac_cv_path_CUT+:} false; then :
6656  $as_echo_n "(cached) " >&6
6657else
6658  case $CUT in
6659  [\\/]* | ?:[\\/]*)
6660  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6661  ;;
6662  *)
6663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in $PATH
6665do
6666  IFS=$as_save_IFS
6667  test -z "$as_dir" && as_dir=.
6668    for ac_exec_ext in '' $ac_executable_extensions; do
6669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6672    break 2
6673  fi
6674done
6675  done
6676IFS=$as_save_IFS
6677
6678  ;;
6679esac
6680fi
6681CUT=$ac_cv_path_CUT
6682if test -n "$CUT"; then
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6684$as_echo "$CUT" >&6; }
6685else
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
6688fi
6689
6690
6691  test -n "$CUT" && break
6692done
6693
6694    else
6695      # If it succeeded, then it was overridden by the user. We will use it
6696      # for the tool.
6697
6698      # First remove it from the list of overridden variables, so we can test
6699      # for unknown variables in the end.
6700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6701
6702      # Check if we try to supply an empty value
6703      if test "x$CUT" = x; then
6704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6705$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6707$as_echo_n "checking for CUT... " >&6; }
6708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6709$as_echo "disabled" >&6; }
6710      else
6711        # Check if the provided tool contains a complete path.
6712        tool_specified="$CUT"
6713        tool_basename="${tool_specified##*/}"
6714        if test "x$tool_basename" = "x$tool_specified"; then
6715          # A command without a complete path is provided, search $PATH.
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6717$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6718          # Extract the first word of "$tool_basename", so it can be a program name with args.
6719set dummy $tool_basename; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758          if test "x$CUT" = x; then
6759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6760          fi
6761        else
6762          # Otherwise we believe it is a complete path. Use it as it is.
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6764$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6766$as_echo_n "checking for CUT... " >&6; }
6767          if test ! -x "$tool_specified"; then
6768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6769$as_echo "not found" >&6; }
6770            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6771          fi
6772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6773$as_echo "$tool_specified" >&6; }
6774        fi
6775      fi
6776    fi
6777
6778  fi
6779
6780
6781
6782  if test "x$CUT" = x; then
6783    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6784  fi
6785
6786
6787
6788
6789
6790  # Publish this variable in the help.
6791
6792
6793  if [ -z "${DATE+x}" ]; then
6794    # The variable is not set by user, try to locate tool using the code snippet
6795    for ac_prog in date
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_DATE+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $DATE in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827DATE=$ac_cv_path_DATE
6828if test -n "$DATE"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6830$as_echo "$DATE" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$DATE" && break
6838done
6839
6840  else
6841    # The variable is set, but is it from the command line or the environment?
6842
6843    # Try to remove the string !DATE! from our list.
6844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6846      # If it failed, the variable was not from the command line. Ignore it,
6847      # but warn the user (except for BASH, which is always set by the calling BASH).
6848      if test "xDATE" != xBASH; then
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6850$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6851      fi
6852      # Try to locate tool using the code snippet
6853      for ac_prog in date
6854do
6855  # Extract the first word of "$ac_prog", so it can be a program name with args.
6856set dummy $ac_prog; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_DATE+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $DATE in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885DATE=$ac_cv_path_DATE
6886if test -n "$DATE"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6888$as_echo "$DATE" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895  test -n "$DATE" && break
6896done
6897
6898    else
6899      # If it succeeded, then it was overridden by the user. We will use it
6900      # for the tool.
6901
6902      # First remove it from the list of overridden variables, so we can test
6903      # for unknown variables in the end.
6904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6905
6906      # Check if we try to supply an empty value
6907      if test "x$DATE" = x; then
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6909$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6911$as_echo_n "checking for DATE... " >&6; }
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6913$as_echo "disabled" >&6; }
6914      else
6915        # Check if the provided tool contains a complete path.
6916        tool_specified="$DATE"
6917        tool_basename="${tool_specified##*/}"
6918        if test "x$tool_basename" = "x$tool_specified"; then
6919          # A command without a complete path is provided, search $PATH.
6920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6921$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6922          # Extract the first word of "$tool_basename", so it can be a program name with args.
6923set dummy $tool_basename; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962          if test "x$DATE" = x; then
6963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6964          fi
6965        else
6966          # Otherwise we believe it is a complete path. Use it as it is.
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6968$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6970$as_echo_n "checking for DATE... " >&6; }
6971          if test ! -x "$tool_specified"; then
6972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6973$as_echo "not found" >&6; }
6974            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6975          fi
6976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6977$as_echo "$tool_specified" >&6; }
6978        fi
6979      fi
6980    fi
6981
6982  fi
6983
6984
6985
6986  if test "x$DATE" = x; then
6987    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6988  fi
6989
6990
6991
6992
6993
6994  # Publish this variable in the help.
6995
6996
6997  if [ -z "${DIFF+x}" ]; then
6998    # The variable is not set by user, try to locate tool using the code snippet
6999    for ac_prog in gdiff diff
7000do
7001  # Extract the first word of "$ac_prog", so it can be a program name with args.
7002set dummy $ac_prog; ac_word=$2
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7004$as_echo_n "checking for $ac_word... " >&6; }
7005if ${ac_cv_path_DIFF+:} false; then :
7006  $as_echo_n "(cached) " >&6
7007else
7008  case $DIFF in
7009  [\\/]* | ?:[\\/]*)
7010  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7011  ;;
7012  *)
7013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7014for as_dir in $PATH
7015do
7016  IFS=$as_save_IFS
7017  test -z "$as_dir" && as_dir=.
7018    for ac_exec_ext in '' $ac_executable_extensions; do
7019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7020    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7022    break 2
7023  fi
7024done
7025  done
7026IFS=$as_save_IFS
7027
7028  ;;
7029esac
7030fi
7031DIFF=$ac_cv_path_DIFF
7032if test -n "$DIFF"; then
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7034$as_echo "$DIFF" >&6; }
7035else
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
7038fi
7039
7040
7041  test -n "$DIFF" && break
7042done
7043
7044  else
7045    # The variable is set, but is it from the command line or the environment?
7046
7047    # Try to remove the string !DIFF! from our list.
7048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7050      # If it failed, the variable was not from the command line. Ignore it,
7051      # but warn the user (except for BASH, which is always set by the calling BASH).
7052      if test "xDIFF" != xBASH; then
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7054$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7055      fi
7056      # Try to locate tool using the code snippet
7057      for ac_prog in gdiff diff
7058do
7059  # Extract the first word of "$ac_prog", so it can be a program name with args.
7060set dummy $ac_prog; ac_word=$2
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7062$as_echo_n "checking for $ac_word... " >&6; }
7063if ${ac_cv_path_DIFF+:} false; then :
7064  $as_echo_n "(cached) " >&6
7065else
7066  case $DIFF in
7067  [\\/]* | ?:[\\/]*)
7068  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7069  ;;
7070  *)
7071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072for as_dir in $PATH
7073do
7074  IFS=$as_save_IFS
7075  test -z "$as_dir" && as_dir=.
7076    for ac_exec_ext in '' $ac_executable_extensions; do
7077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7078    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7080    break 2
7081  fi
7082done
7083  done
7084IFS=$as_save_IFS
7085
7086  ;;
7087esac
7088fi
7089DIFF=$ac_cv_path_DIFF
7090if test -n "$DIFF"; then
7091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7092$as_echo "$DIFF" >&6; }
7093else
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7095$as_echo "no" >&6; }
7096fi
7097
7098
7099  test -n "$DIFF" && break
7100done
7101
7102    else
7103      # If it succeeded, then it was overridden by the user. We will use it
7104      # for the tool.
7105
7106      # First remove it from the list of overridden variables, so we can test
7107      # for unknown variables in the end.
7108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7109
7110      # Check if we try to supply an empty value
7111      if test "x$DIFF" = x; then
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7113$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7115$as_echo_n "checking for DIFF... " >&6; }
7116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7117$as_echo "disabled" >&6; }
7118      else
7119        # Check if the provided tool contains a complete path.
7120        tool_specified="$DIFF"
7121        tool_basename="${tool_specified##*/}"
7122        if test "x$tool_basename" = "x$tool_specified"; then
7123          # A command without a complete path is provided, search $PATH.
7124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7125$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7126          # Extract the first word of "$tool_basename", so it can be a program name with args.
7127set dummy $tool_basename; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166          if test "x$DIFF" = x; then
7167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7168          fi
7169        else
7170          # Otherwise we believe it is a complete path. Use it as it is.
7171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7172$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7174$as_echo_n "checking for DIFF... " >&6; }
7175          if test ! -x "$tool_specified"; then
7176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7177$as_echo "not found" >&6; }
7178            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7179          fi
7180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7181$as_echo "$tool_specified" >&6; }
7182        fi
7183      fi
7184    fi
7185
7186  fi
7187
7188
7189
7190  if test "x$DIFF" = x; then
7191    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7192  fi
7193
7194
7195
7196
7197
7198  # Publish this variable in the help.
7199
7200
7201  if [ -z "${DIRNAME+x}" ]; then
7202    # The variable is not set by user, try to locate tool using the code snippet
7203    for ac_prog in dirname
7204do
7205  # Extract the first word of "$ac_prog", so it can be a program name with args.
7206set dummy $ac_prog; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_DIRNAME+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $DIRNAME in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235DIRNAME=$ac_cv_path_DIRNAME
7236if test -n "$DIRNAME"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7238$as_echo "$DIRNAME" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245  test -n "$DIRNAME" && break
7246done
7247
7248  else
7249    # The variable is set, but is it from the command line or the environment?
7250
7251    # Try to remove the string !DIRNAME! from our list.
7252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7254      # If it failed, the variable was not from the command line. Ignore it,
7255      # but warn the user (except for BASH, which is always set by the calling BASH).
7256      if test "xDIRNAME" != xBASH; then
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7258$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7259      fi
7260      # Try to locate tool using the code snippet
7261      for ac_prog in dirname
7262do
7263  # Extract the first word of "$ac_prog", so it can be a program name with args.
7264set dummy $ac_prog; ac_word=$2
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266$as_echo_n "checking for $ac_word... " >&6; }
7267if ${ac_cv_path_DIRNAME+:} false; then :
7268  $as_echo_n "(cached) " >&6
7269else
7270  case $DIRNAME in
7271  [\\/]* | ?:[\\/]*)
7272  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7273  ;;
7274  *)
7275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276for as_dir in $PATH
7277do
7278  IFS=$as_save_IFS
7279  test -z "$as_dir" && as_dir=.
7280    for ac_exec_ext in '' $ac_executable_extensions; do
7281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7282    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284    break 2
7285  fi
7286done
7287  done
7288IFS=$as_save_IFS
7289
7290  ;;
7291esac
7292fi
7293DIRNAME=$ac_cv_path_DIRNAME
7294if test -n "$DIRNAME"; then
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7296$as_echo "$DIRNAME" >&6; }
7297else
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
7300fi
7301
7302
7303  test -n "$DIRNAME" && break
7304done
7305
7306    else
7307      # If it succeeded, then it was overridden by the user. We will use it
7308      # for the tool.
7309
7310      # First remove it from the list of overridden variables, so we can test
7311      # for unknown variables in the end.
7312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7313
7314      # Check if we try to supply an empty value
7315      if test "x$DIRNAME" = x; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7317$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7319$as_echo_n "checking for DIRNAME... " >&6; }
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7321$as_echo "disabled" >&6; }
7322      else
7323        # Check if the provided tool contains a complete path.
7324        tool_specified="$DIRNAME"
7325        tool_basename="${tool_specified##*/}"
7326        if test "x$tool_basename" = "x$tool_specified"; then
7327          # A command without a complete path is provided, search $PATH.
7328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7329$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7330          # Extract the first word of "$tool_basename", so it can be a program name with args.
7331set dummy $tool_basename; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370          if test "x$DIRNAME" = x; then
7371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7372          fi
7373        else
7374          # Otherwise we believe it is a complete path. Use it as it is.
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7376$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7378$as_echo_n "checking for DIRNAME... " >&6; }
7379          if test ! -x "$tool_specified"; then
7380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7381$as_echo "not found" >&6; }
7382            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7383          fi
7384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7385$as_echo "$tool_specified" >&6; }
7386        fi
7387      fi
7388    fi
7389
7390  fi
7391
7392
7393
7394  if test "x$DIRNAME" = x; then
7395    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7396  fi
7397
7398
7399
7400
7401
7402  # Publish this variable in the help.
7403
7404
7405  if [ -z "${ECHO+x}" ]; then
7406    # The variable is not set by user, try to locate tool using the code snippet
7407    for ac_prog in echo
7408do
7409  # Extract the first word of "$ac_prog", so it can be a program name with args.
7410set dummy $ac_prog; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_ECHO+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $ECHO in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439ECHO=$ac_cv_path_ECHO
7440if test -n "$ECHO"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7442$as_echo "$ECHO" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449  test -n "$ECHO" && break
7450done
7451
7452  else
7453    # The variable is set, but is it from the command line or the environment?
7454
7455    # Try to remove the string !ECHO! from our list.
7456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7458      # If it failed, the variable was not from the command line. Ignore it,
7459      # but warn the user (except for BASH, which is always set by the calling BASH).
7460      if test "xECHO" != xBASH; then
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7462$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7463      fi
7464      # Try to locate tool using the code snippet
7465      for ac_prog in echo
7466do
7467  # Extract the first word of "$ac_prog", so it can be a program name with args.
7468set dummy $ac_prog; ac_word=$2
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
7471if ${ac_cv_path_ECHO+:} false; then :
7472  $as_echo_n "(cached) " >&6
7473else
7474  case $ECHO in
7475  [\\/]* | ?:[\\/]*)
7476  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7477  ;;
7478  *)
7479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482  IFS=$as_save_IFS
7483  test -z "$as_dir" && as_dir=.
7484    for ac_exec_ext in '' $ac_executable_extensions; do
7485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488    break 2
7489  fi
7490done
7491  done
7492IFS=$as_save_IFS
7493
7494  ;;
7495esac
7496fi
7497ECHO=$ac_cv_path_ECHO
7498if test -n "$ECHO"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7500$as_echo "$ECHO" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506
7507  test -n "$ECHO" && break
7508done
7509
7510    else
7511      # If it succeeded, then it was overridden by the user. We will use it
7512      # for the tool.
7513
7514      # First remove it from the list of overridden variables, so we can test
7515      # for unknown variables in the end.
7516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7517
7518      # Check if we try to supply an empty value
7519      if test "x$ECHO" = x; then
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7521$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7523$as_echo_n "checking for ECHO... " >&6; }
7524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7525$as_echo "disabled" >&6; }
7526      else
7527        # Check if the provided tool contains a complete path.
7528        tool_specified="$ECHO"
7529        tool_basename="${tool_specified##*/}"
7530        if test "x$tool_basename" = "x$tool_specified"; then
7531          # A command without a complete path is provided, search $PATH.
7532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7533$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7534          # Extract the first word of "$tool_basename", so it can be a program name with args.
7535set dummy $tool_basename; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574          if test "x$ECHO" = x; then
7575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7576          fi
7577        else
7578          # Otherwise we believe it is a complete path. Use it as it is.
7579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7580$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7582$as_echo_n "checking for ECHO... " >&6; }
7583          if test ! -x "$tool_specified"; then
7584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7585$as_echo "not found" >&6; }
7586            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7587          fi
7588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7589$as_echo "$tool_specified" >&6; }
7590        fi
7591      fi
7592    fi
7593
7594  fi
7595
7596
7597
7598  if test "x$ECHO" = x; then
7599    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7600  fi
7601
7602
7603
7604
7605
7606  # Publish this variable in the help.
7607
7608
7609  if [ -z "${EXPR+x}" ]; then
7610    # The variable is not set by user, try to locate tool using the code snippet
7611    for ac_prog in expr
7612do
7613  # Extract the first word of "$ac_prog", so it can be a program name with args.
7614set dummy $ac_prog; ac_word=$2
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
7617if ${ac_cv_path_EXPR+:} false; then :
7618  $as_echo_n "(cached) " >&6
7619else
7620  case $EXPR in
7621  [\\/]* | ?:[\\/]*)
7622  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7623  ;;
7624  *)
7625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628  IFS=$as_save_IFS
7629  test -z "$as_dir" && as_dir=.
7630    for ac_exec_ext in '' $ac_executable_extensions; do
7631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634    break 2
7635  fi
7636done
7637  done
7638IFS=$as_save_IFS
7639
7640  ;;
7641esac
7642fi
7643EXPR=$ac_cv_path_EXPR
7644if test -n "$EXPR"; then
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7646$as_echo "$EXPR" >&6; }
7647else
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
7650fi
7651
7652
7653  test -n "$EXPR" && break
7654done
7655
7656  else
7657    # The variable is set, but is it from the command line or the environment?
7658
7659    # Try to remove the string !EXPR! from our list.
7660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7662      # If it failed, the variable was not from the command line. Ignore it,
7663      # but warn the user (except for BASH, which is always set by the calling BASH).
7664      if test "xEXPR" != xBASH; then
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7666$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7667      fi
7668      # Try to locate tool using the code snippet
7669      for ac_prog in expr
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_EXPR+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $EXPR in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701EXPR=$ac_cv_path_EXPR
7702if test -n "$EXPR"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7704$as_echo "$EXPR" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$EXPR" && break
7712done
7713
7714    else
7715      # If it succeeded, then it was overridden by the user. We will use it
7716      # for the tool.
7717
7718      # First remove it from the list of overridden variables, so we can test
7719      # for unknown variables in the end.
7720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7721
7722      # Check if we try to supply an empty value
7723      if test "x$EXPR" = x; then
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7725$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7727$as_echo_n "checking for EXPR... " >&6; }
7728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7729$as_echo "disabled" >&6; }
7730      else
7731        # Check if the provided tool contains a complete path.
7732        tool_specified="$EXPR"
7733        tool_basename="${tool_specified##*/}"
7734        if test "x$tool_basename" = "x$tool_specified"; then
7735          # A command without a complete path is provided, search $PATH.
7736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7737$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7738          # Extract the first word of "$tool_basename", so it can be a program name with args.
7739set dummy $tool_basename; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778          if test "x$EXPR" = x; then
7779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7780          fi
7781        else
7782          # Otherwise we believe it is a complete path. Use it as it is.
7783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7784$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7786$as_echo_n "checking for EXPR... " >&6; }
7787          if test ! -x "$tool_specified"; then
7788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7789$as_echo "not found" >&6; }
7790            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7791          fi
7792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7793$as_echo "$tool_specified" >&6; }
7794        fi
7795      fi
7796    fi
7797
7798  fi
7799
7800
7801
7802  if test "x$EXPR" = x; then
7803    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7804  fi
7805
7806
7807
7808
7809
7810  # Publish this variable in the help.
7811
7812
7813  if [ -z "${FILE+x}" ]; then
7814    # The variable is not set by user, try to locate tool using the code snippet
7815    for ac_prog in file
7816do
7817  # Extract the first word of "$ac_prog", so it can be a program name with args.
7818set dummy $ac_prog; ac_word=$2
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7820$as_echo_n "checking for $ac_word... " >&6; }
7821if ${ac_cv_path_FILE+:} false; then :
7822  $as_echo_n "(cached) " >&6
7823else
7824  case $FILE in
7825  [\\/]* | ?:[\\/]*)
7826  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7827  ;;
7828  *)
7829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7830for as_dir in $PATH
7831do
7832  IFS=$as_save_IFS
7833  test -z "$as_dir" && as_dir=.
7834    for ac_exec_ext in '' $ac_executable_extensions; do
7835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7836    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7838    break 2
7839  fi
7840done
7841  done
7842IFS=$as_save_IFS
7843
7844  ;;
7845esac
7846fi
7847FILE=$ac_cv_path_FILE
7848if test -n "$FILE"; then
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7850$as_echo "$FILE" >&6; }
7851else
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7853$as_echo "no" >&6; }
7854fi
7855
7856
7857  test -n "$FILE" && break
7858done
7859
7860  else
7861    # The variable is set, but is it from the command line or the environment?
7862
7863    # Try to remove the string !FILE! from our list.
7864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7866      # If it failed, the variable was not from the command line. Ignore it,
7867      # but warn the user (except for BASH, which is always set by the calling BASH).
7868      if test "xFILE" != xBASH; then
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7870$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7871      fi
7872      # Try to locate tool using the code snippet
7873      for ac_prog in file
7874do
7875  # Extract the first word of "$ac_prog", so it can be a program name with args.
7876set dummy $ac_prog; ac_word=$2
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7878$as_echo_n "checking for $ac_word... " >&6; }
7879if ${ac_cv_path_FILE+:} false; then :
7880  $as_echo_n "(cached) " >&6
7881else
7882  case $FILE in
7883  [\\/]* | ?:[\\/]*)
7884  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7885  ;;
7886  *)
7887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888for as_dir in $PATH
7889do
7890  IFS=$as_save_IFS
7891  test -z "$as_dir" && as_dir=.
7892    for ac_exec_ext in '' $ac_executable_extensions; do
7893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7894    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7896    break 2
7897  fi
7898done
7899  done
7900IFS=$as_save_IFS
7901
7902  ;;
7903esac
7904fi
7905FILE=$ac_cv_path_FILE
7906if test -n "$FILE"; then
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7908$as_echo "$FILE" >&6; }
7909else
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911$as_echo "no" >&6; }
7912fi
7913
7914
7915  test -n "$FILE" && break
7916done
7917
7918    else
7919      # If it succeeded, then it was overridden by the user. We will use it
7920      # for the tool.
7921
7922      # First remove it from the list of overridden variables, so we can test
7923      # for unknown variables in the end.
7924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7925
7926      # Check if we try to supply an empty value
7927      if test "x$FILE" = x; then
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7929$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7931$as_echo_n "checking for FILE... " >&6; }
7932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7933$as_echo "disabled" >&6; }
7934      else
7935        # Check if the provided tool contains a complete path.
7936        tool_specified="$FILE"
7937        tool_basename="${tool_specified##*/}"
7938        if test "x$tool_basename" = "x$tool_specified"; then
7939          # A command without a complete path is provided, search $PATH.
7940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7941$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7942          # Extract the first word of "$tool_basename", so it can be a program name with args.
7943set dummy $tool_basename; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982          if test "x$FILE" = x; then
7983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7984          fi
7985        else
7986          # Otherwise we believe it is a complete path. Use it as it is.
7987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7988$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7990$as_echo_n "checking for FILE... " >&6; }
7991          if test ! -x "$tool_specified"; then
7992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7993$as_echo "not found" >&6; }
7994            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7995          fi
7996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7997$as_echo "$tool_specified" >&6; }
7998        fi
7999      fi
8000    fi
8001
8002  fi
8003
8004
8005
8006  if test "x$FILE" = x; then
8007    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8008  fi
8009
8010
8011
8012
8013
8014  # Publish this variable in the help.
8015
8016
8017  if [ -z "${FIND+x}" ]; then
8018    # The variable is not set by user, try to locate tool using the code snippet
8019    for ac_prog in find
8020do
8021  # Extract the first word of "$ac_prog", so it can be a program name with args.
8022set dummy $ac_prog; ac_word=$2
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
8025if ${ac_cv_path_FIND+:} false; then :
8026  $as_echo_n "(cached) " >&6
8027else
8028  case $FIND in
8029  [\\/]* | ?:[\\/]*)
8030  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8031  ;;
8032  *)
8033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036  IFS=$as_save_IFS
8037  test -z "$as_dir" && as_dir=.
8038    for ac_exec_ext in '' $ac_executable_extensions; do
8039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042    break 2
8043  fi
8044done
8045  done
8046IFS=$as_save_IFS
8047
8048  ;;
8049esac
8050fi
8051FIND=$ac_cv_path_FIND
8052if test -n "$FIND"; then
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8054$as_echo "$FIND" >&6; }
8055else
8056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
8058fi
8059
8060
8061  test -n "$FIND" && break
8062done
8063
8064  else
8065    # The variable is set, but is it from the command line or the environment?
8066
8067    # Try to remove the string !FIND! from our list.
8068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8070      # If it failed, the variable was not from the command line. Ignore it,
8071      # but warn the user (except for BASH, which is always set by the calling BASH).
8072      if test "xFIND" != xBASH; then
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8074$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8075      fi
8076      # Try to locate tool using the code snippet
8077      for ac_prog in find
8078do
8079  # Extract the first word of "$ac_prog", so it can be a program name with args.
8080set dummy $ac_prog; ac_word=$2
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if ${ac_cv_path_FIND+:} false; then :
8084  $as_echo_n "(cached) " >&6
8085else
8086  case $FIND in
8087  [\\/]* | ?:[\\/]*)
8088  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8089  ;;
8090  *)
8091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094  IFS=$as_save_IFS
8095  test -z "$as_dir" && as_dir=.
8096    for ac_exec_ext in '' $ac_executable_extensions; do
8097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8098    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100    break 2
8101  fi
8102done
8103  done
8104IFS=$as_save_IFS
8105
8106  ;;
8107esac
8108fi
8109FIND=$ac_cv_path_FIND
8110if test -n "$FIND"; then
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8112$as_echo "$FIND" >&6; }
8113else
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116fi
8117
8118
8119  test -n "$FIND" && break
8120done
8121
8122    else
8123      # If it succeeded, then it was overridden by the user. We will use it
8124      # for the tool.
8125
8126      # First remove it from the list of overridden variables, so we can test
8127      # for unknown variables in the end.
8128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8129
8130      # Check if we try to supply an empty value
8131      if test "x$FIND" = x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8133$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8135$as_echo_n "checking for FIND... " >&6; }
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8137$as_echo "disabled" >&6; }
8138      else
8139        # Check if the provided tool contains a complete path.
8140        tool_specified="$FIND"
8141        tool_basename="${tool_specified##*/}"
8142        if test "x$tool_basename" = "x$tool_specified"; then
8143          # A command without a complete path is provided, search $PATH.
8144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8145$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8146          # Extract the first word of "$tool_basename", so it can be a program name with args.
8147set dummy $tool_basename; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186          if test "x$FIND" = x; then
8187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8188          fi
8189        else
8190          # Otherwise we believe it is a complete path. Use it as it is.
8191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8192$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8194$as_echo_n "checking for FIND... " >&6; }
8195          if test ! -x "$tool_specified"; then
8196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8197$as_echo "not found" >&6; }
8198            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8199          fi
8200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8201$as_echo "$tool_specified" >&6; }
8202        fi
8203      fi
8204    fi
8205
8206  fi
8207
8208
8209
8210  if test "x$FIND" = x; then
8211    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8212  fi
8213
8214
8215
8216
8217
8218  # Publish this variable in the help.
8219
8220
8221  if [ -z "${HEAD+x}" ]; then
8222    # The variable is not set by user, try to locate tool using the code snippet
8223    for ac_prog in head
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_HEAD+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $HEAD in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255HEAD=$ac_cv_path_HEAD
8256if test -n "$HEAD"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8258$as_echo "$HEAD" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$HEAD" && break
8266done
8267
8268  else
8269    # The variable is set, but is it from the command line or the environment?
8270
8271    # Try to remove the string !HEAD! from our list.
8272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8274      # If it failed, the variable was not from the command line. Ignore it,
8275      # but warn the user (except for BASH, which is always set by the calling BASH).
8276      if test "xHEAD" != xBASH; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8278$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8279      fi
8280      # Try to locate tool using the code snippet
8281      for ac_prog in head
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_HEAD+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $HEAD in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313HEAD=$ac_cv_path_HEAD
8314if test -n "$HEAD"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8316$as_echo "$HEAD" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$HEAD" && break
8324done
8325
8326    else
8327      # If it succeeded, then it was overridden by the user. We will use it
8328      # for the tool.
8329
8330      # First remove it from the list of overridden variables, so we can test
8331      # for unknown variables in the end.
8332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8333
8334      # Check if we try to supply an empty value
8335      if test "x$HEAD" = x; then
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8337$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8339$as_echo_n "checking for HEAD... " >&6; }
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8341$as_echo "disabled" >&6; }
8342      else
8343        # Check if the provided tool contains a complete path.
8344        tool_specified="$HEAD"
8345        tool_basename="${tool_specified##*/}"
8346        if test "x$tool_basename" = "x$tool_specified"; then
8347          # A command without a complete path is provided, search $PATH.
8348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8349$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8350          # Extract the first word of "$tool_basename", so it can be a program name with args.
8351set dummy $tool_basename; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390          if test "x$HEAD" = x; then
8391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8392          fi
8393        else
8394          # Otherwise we believe it is a complete path. Use it as it is.
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8396$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8398$as_echo_n "checking for HEAD... " >&6; }
8399          if test ! -x "$tool_specified"; then
8400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8401$as_echo "not found" >&6; }
8402            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8403          fi
8404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8405$as_echo "$tool_specified" >&6; }
8406        fi
8407      fi
8408    fi
8409
8410  fi
8411
8412
8413
8414  if test "x$HEAD" = x; then
8415    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8416  fi
8417
8418
8419
8420
8421
8422  # Publish this variable in the help.
8423
8424
8425  if [ -z "${GUNZIP+x}" ]; then
8426    # The variable is not set by user, try to locate tool using the code snippet
8427    for ac_prog in gunzip
8428do
8429  # Extract the first word of "$ac_prog", so it can be a program name with args.
8430set dummy $ac_prog; ac_word=$2
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8432$as_echo_n "checking for $ac_word... " >&6; }
8433if ${ac_cv_path_GUNZIP+:} false; then :
8434  $as_echo_n "(cached) " >&6
8435else
8436  case $GUNZIP in
8437  [\\/]* | ?:[\\/]*)
8438  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8439  ;;
8440  *)
8441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8442for as_dir in $PATH
8443do
8444  IFS=$as_save_IFS
8445  test -z "$as_dir" && as_dir=.
8446    for ac_exec_ext in '' $ac_executable_extensions; do
8447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8448    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8450    break 2
8451  fi
8452done
8453  done
8454IFS=$as_save_IFS
8455
8456  ;;
8457esac
8458fi
8459GUNZIP=$ac_cv_path_GUNZIP
8460if test -n "$GUNZIP"; then
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8462$as_echo "$GUNZIP" >&6; }
8463else
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
8466fi
8467
8468
8469  test -n "$GUNZIP" && break
8470done
8471
8472  else
8473    # The variable is set, but is it from the command line or the environment?
8474
8475    # Try to remove the string !GUNZIP! from our list.
8476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8478      # If it failed, the variable was not from the command line. Ignore it,
8479      # but warn the user (except for BASH, which is always set by the calling BASH).
8480      if test "xGUNZIP" != xBASH; then
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8482$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8483      fi
8484      # Try to locate tool using the code snippet
8485      for ac_prog in gunzip
8486do
8487  # Extract the first word of "$ac_prog", so it can be a program name with args.
8488set dummy $ac_prog; ac_word=$2
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if ${ac_cv_path_GUNZIP+:} false; then :
8492  $as_echo_n "(cached) " >&6
8493else
8494  case $GUNZIP in
8495  [\\/]* | ?:[\\/]*)
8496  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8497  ;;
8498  *)
8499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8500for as_dir in $PATH
8501do
8502  IFS=$as_save_IFS
8503  test -z "$as_dir" && as_dir=.
8504    for ac_exec_ext in '' $ac_executable_extensions; do
8505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8506    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8508    break 2
8509  fi
8510done
8511  done
8512IFS=$as_save_IFS
8513
8514  ;;
8515esac
8516fi
8517GUNZIP=$ac_cv_path_GUNZIP
8518if test -n "$GUNZIP"; then
8519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8520$as_echo "$GUNZIP" >&6; }
8521else
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8523$as_echo "no" >&6; }
8524fi
8525
8526
8527  test -n "$GUNZIP" && break
8528done
8529
8530    else
8531      # If it succeeded, then it was overridden by the user. We will use it
8532      # for the tool.
8533
8534      # First remove it from the list of overridden variables, so we can test
8535      # for unknown variables in the end.
8536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8537
8538      # Check if we try to supply an empty value
8539      if test "x$GUNZIP" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8541$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8543$as_echo_n "checking for GUNZIP... " >&6; }
8544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8545$as_echo "disabled" >&6; }
8546      else
8547        # Check if the provided tool contains a complete path.
8548        tool_specified="$GUNZIP"
8549        tool_basename="${tool_specified##*/}"
8550        if test "x$tool_basename" = "x$tool_specified"; then
8551          # A command without a complete path is provided, search $PATH.
8552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8553$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8554          # Extract the first word of "$tool_basename", so it can be a program name with args.
8555set dummy $tool_basename; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594          if test "x$GUNZIP" = x; then
8595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8596          fi
8597        else
8598          # Otherwise we believe it is a complete path. Use it as it is.
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8600$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8602$as_echo_n "checking for GUNZIP... " >&6; }
8603          if test ! -x "$tool_specified"; then
8604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8605$as_echo "not found" >&6; }
8606            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8607          fi
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8609$as_echo "$tool_specified" >&6; }
8610        fi
8611      fi
8612    fi
8613
8614  fi
8615
8616
8617
8618  if test "x$GUNZIP" = x; then
8619    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8620  fi
8621
8622
8623
8624
8625
8626  # Publish this variable in the help.
8627
8628
8629  if [ -z "${GZIP+x}" ]; then
8630    # The variable is not set by user, try to locate tool using the code snippet
8631    for ac_prog in pigz gzip
8632do
8633  # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if ${ac_cv_path_GZIP+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  case $GZIP in
8641  [\\/]* | ?:[\\/]*)
8642  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8643  ;;
8644  *)
8645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646for as_dir in $PATH
8647do
8648  IFS=$as_save_IFS
8649  test -z "$as_dir" && as_dir=.
8650    for ac_exec_ext in '' $ac_executable_extensions; do
8651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654    break 2
8655  fi
8656done
8657  done
8658IFS=$as_save_IFS
8659
8660  ;;
8661esac
8662fi
8663GZIP=$ac_cv_path_GZIP
8664if test -n "$GZIP"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8666$as_echo "$GZIP" >&6; }
8667else
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
8670fi
8671
8672
8673  test -n "$GZIP" && break
8674done
8675
8676  else
8677    # The variable is set, but is it from the command line or the environment?
8678
8679    # Try to remove the string !GZIP! from our list.
8680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8682      # If it failed, the variable was not from the command line. Ignore it,
8683      # but warn the user (except for BASH, which is always set by the calling BASH).
8684      if test "xGZIP" != xBASH; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8686$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8687      fi
8688      # Try to locate tool using the code snippet
8689      for ac_prog in pigz gzip
8690do
8691  # Extract the first word of "$ac_prog", so it can be a program name with args.
8692set dummy $ac_prog; ac_word=$2
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if ${ac_cv_path_GZIP+:} false; then :
8696  $as_echo_n "(cached) " >&6
8697else
8698  case $GZIP in
8699  [\\/]* | ?:[\\/]*)
8700  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8701  ;;
8702  *)
8703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706  IFS=$as_save_IFS
8707  test -z "$as_dir" && as_dir=.
8708    for ac_exec_ext in '' $ac_executable_extensions; do
8709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712    break 2
8713  fi
8714done
8715  done
8716IFS=$as_save_IFS
8717
8718  ;;
8719esac
8720fi
8721GZIP=$ac_cv_path_GZIP
8722if test -n "$GZIP"; then
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8724$as_echo "$GZIP" >&6; }
8725else
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
8728fi
8729
8730
8731  test -n "$GZIP" && break
8732done
8733
8734    else
8735      # If it succeeded, then it was overridden by the user. We will use it
8736      # for the tool.
8737
8738      # First remove it from the list of overridden variables, so we can test
8739      # for unknown variables in the end.
8740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8741
8742      # Check if we try to supply an empty value
8743      if test "x$GZIP" = x; then
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8745$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8747$as_echo_n "checking for GZIP... " >&6; }
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8749$as_echo "disabled" >&6; }
8750      else
8751        # Check if the provided tool contains a complete path.
8752        tool_specified="$GZIP"
8753        tool_basename="${tool_specified##*/}"
8754        if test "x$tool_basename" = "x$tool_specified"; then
8755          # A command without a complete path is provided, search $PATH.
8756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8757$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8758          # Extract the first word of "$tool_basename", so it can be a program name with args.
8759set dummy $tool_basename; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798          if test "x$GZIP" = x; then
8799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8800          fi
8801        else
8802          # Otherwise we believe it is a complete path. Use it as it is.
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8804$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8806$as_echo_n "checking for GZIP... " >&6; }
8807          if test ! -x "$tool_specified"; then
8808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8809$as_echo "not found" >&6; }
8810            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8811          fi
8812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8813$as_echo "$tool_specified" >&6; }
8814        fi
8815      fi
8816    fi
8817
8818  fi
8819
8820
8821
8822  if test "x$GZIP" = x; then
8823    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8824  fi
8825
8826
8827
8828
8829
8830  # Publish this variable in the help.
8831
8832
8833  if [ -z "${LN+x}" ]; then
8834    # The variable is not set by user, try to locate tool using the code snippet
8835    for ac_prog in ln
8836do
8837  # Extract the first word of "$ac_prog", so it can be a program name with args.
8838set dummy $ac_prog; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_LN+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $LN in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867LN=$ac_cv_path_LN
8868if test -n "$LN"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8870$as_echo "$LN" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877  test -n "$LN" && break
8878done
8879
8880  else
8881    # The variable is set, but is it from the command line or the environment?
8882
8883    # Try to remove the string !LN! from our list.
8884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8886      # If it failed, the variable was not from the command line. Ignore it,
8887      # but warn the user (except for BASH, which is always set by the calling BASH).
8888      if test "xLN" != xBASH; then
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8890$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8891      fi
8892      # Try to locate tool using the code snippet
8893      for ac_prog in ln
8894do
8895  # Extract the first word of "$ac_prog", so it can be a program name with args.
8896set dummy $ac_prog; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if ${ac_cv_path_LN+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  case $LN in
8903  [\\/]* | ?:[\\/]*)
8904  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8905  ;;
8906  *)
8907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910  IFS=$as_save_IFS
8911  test -z "$as_dir" && as_dir=.
8912    for ac_exec_ext in '' $ac_executable_extensions; do
8913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916    break 2
8917  fi
8918done
8919  done
8920IFS=$as_save_IFS
8921
8922  ;;
8923esac
8924fi
8925LN=$ac_cv_path_LN
8926if test -n "$LN"; then
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8928$as_echo "$LN" >&6; }
8929else
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935  test -n "$LN" && break
8936done
8937
8938    else
8939      # If it succeeded, then it was overridden by the user. We will use it
8940      # for the tool.
8941
8942      # First remove it from the list of overridden variables, so we can test
8943      # for unknown variables in the end.
8944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8945
8946      # Check if we try to supply an empty value
8947      if test "x$LN" = x; then
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8949$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8951$as_echo_n "checking for LN... " >&6; }
8952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8953$as_echo "disabled" >&6; }
8954      else
8955        # Check if the provided tool contains a complete path.
8956        tool_specified="$LN"
8957        tool_basename="${tool_specified##*/}"
8958        if test "x$tool_basename" = "x$tool_specified"; then
8959          # A command without a complete path is provided, search $PATH.
8960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8961$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8962          # Extract the first word of "$tool_basename", so it can be a program name with args.
8963set dummy $tool_basename; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002          if test "x$LN" = x; then
9003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9004          fi
9005        else
9006          # Otherwise we believe it is a complete path. Use it as it is.
9007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9008$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9010$as_echo_n "checking for LN... " >&6; }
9011          if test ! -x "$tool_specified"; then
9012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9013$as_echo "not found" >&6; }
9014            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9015          fi
9016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9017$as_echo "$tool_specified" >&6; }
9018        fi
9019      fi
9020    fi
9021
9022  fi
9023
9024
9025
9026  if test "x$LN" = x; then
9027    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9028  fi
9029
9030
9031
9032
9033
9034  # Publish this variable in the help.
9035
9036
9037  if [ -z "${LS+x}" ]; then
9038    # The variable is not set by user, try to locate tool using the code snippet
9039    for ac_prog in ls
9040do
9041  # Extract the first word of "$ac_prog", so it can be a program name with args.
9042set dummy $ac_prog; ac_word=$2
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
9045if ${ac_cv_path_LS+:} false; then :
9046  $as_echo_n "(cached) " >&6
9047else
9048  case $LS in
9049  [\\/]* | ?:[\\/]*)
9050  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9051  ;;
9052  *)
9053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056  IFS=$as_save_IFS
9057  test -z "$as_dir" && as_dir=.
9058    for ac_exec_ext in '' $ac_executable_extensions; do
9059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9060    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062    break 2
9063  fi
9064done
9065  done
9066IFS=$as_save_IFS
9067
9068  ;;
9069esac
9070fi
9071LS=$ac_cv_path_LS
9072if test -n "$LS"; then
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9074$as_echo "$LS" >&6; }
9075else
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
9078fi
9079
9080
9081  test -n "$LS" && break
9082done
9083
9084  else
9085    # The variable is set, but is it from the command line or the environment?
9086
9087    # Try to remove the string !LS! from our list.
9088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9090      # If it failed, the variable was not from the command line. Ignore it,
9091      # but warn the user (except for BASH, which is always set by the calling BASH).
9092      if test "xLS" != xBASH; then
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9094$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9095      fi
9096      # Try to locate tool using the code snippet
9097      for ac_prog in ls
9098do
9099  # Extract the first word of "$ac_prog", so it can be a program name with args.
9100set dummy $ac_prog; ac_word=$2
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9102$as_echo_n "checking for $ac_word... " >&6; }
9103if ${ac_cv_path_LS+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  case $LS in
9107  [\\/]* | ?:[\\/]*)
9108  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9109  ;;
9110  *)
9111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9112for as_dir in $PATH
9113do
9114  IFS=$as_save_IFS
9115  test -z "$as_dir" && as_dir=.
9116    for ac_exec_ext in '' $ac_executable_extensions; do
9117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9118    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9120    break 2
9121  fi
9122done
9123  done
9124IFS=$as_save_IFS
9125
9126  ;;
9127esac
9128fi
9129LS=$ac_cv_path_LS
9130if test -n "$LS"; then
9131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9132$as_echo "$LS" >&6; }
9133else
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9135$as_echo "no" >&6; }
9136fi
9137
9138
9139  test -n "$LS" && break
9140done
9141
9142    else
9143      # If it succeeded, then it was overridden by the user. We will use it
9144      # for the tool.
9145
9146      # First remove it from the list of overridden variables, so we can test
9147      # for unknown variables in the end.
9148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9149
9150      # Check if we try to supply an empty value
9151      if test "x$LS" = x; then
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9153$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9155$as_echo_n "checking for LS... " >&6; }
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9157$as_echo "disabled" >&6; }
9158      else
9159        # Check if the provided tool contains a complete path.
9160        tool_specified="$LS"
9161        tool_basename="${tool_specified##*/}"
9162        if test "x$tool_basename" = "x$tool_specified"; then
9163          # A command without a complete path is provided, search $PATH.
9164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9165$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9166          # Extract the first word of "$tool_basename", so it can be a program name with args.
9167set dummy $tool_basename; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206          if test "x$LS" = x; then
9207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9208          fi
9209        else
9210          # Otherwise we believe it is a complete path. Use it as it is.
9211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9212$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9214$as_echo_n "checking for LS... " >&6; }
9215          if test ! -x "$tool_specified"; then
9216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9217$as_echo "not found" >&6; }
9218            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9219          fi
9220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9221$as_echo "$tool_specified" >&6; }
9222        fi
9223      fi
9224    fi
9225
9226  fi
9227
9228
9229
9230  if test "x$LS" = x; then
9231    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9232  fi
9233
9234
9235
9236
9237
9238  # Publish this variable in the help.
9239
9240
9241  if [ -z "${MKDIR+x}" ]; then
9242    # The variable is not set by user, try to locate tool using the code snippet
9243    for ac_prog in mkdir
9244do
9245  # Extract the first word of "$ac_prog", so it can be a program name with args.
9246set dummy $ac_prog; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_MKDIR+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $MKDIR in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275MKDIR=$ac_cv_path_MKDIR
9276if test -n "$MKDIR"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9278$as_echo "$MKDIR" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285  test -n "$MKDIR" && break
9286done
9287
9288  else
9289    # The variable is set, but is it from the command line or the environment?
9290
9291    # Try to remove the string !MKDIR! from our list.
9292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9294      # If it failed, the variable was not from the command line. Ignore it,
9295      # but warn the user (except for BASH, which is always set by the calling BASH).
9296      if test "xMKDIR" != xBASH; then
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9298$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9299      fi
9300      # Try to locate tool using the code snippet
9301      for ac_prog in mkdir
9302do
9303  # Extract the first word of "$ac_prog", so it can be a program name with args.
9304set dummy $ac_prog; ac_word=$2
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9306$as_echo_n "checking for $ac_word... " >&6; }
9307if ${ac_cv_path_MKDIR+:} false; then :
9308  $as_echo_n "(cached) " >&6
9309else
9310  case $MKDIR in
9311  [\\/]* | ?:[\\/]*)
9312  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9313  ;;
9314  *)
9315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9316for as_dir in $PATH
9317do
9318  IFS=$as_save_IFS
9319  test -z "$as_dir" && as_dir=.
9320    for ac_exec_ext in '' $ac_executable_extensions; do
9321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9322    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9324    break 2
9325  fi
9326done
9327  done
9328IFS=$as_save_IFS
9329
9330  ;;
9331esac
9332fi
9333MKDIR=$ac_cv_path_MKDIR
9334if test -n "$MKDIR"; then
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9336$as_echo "$MKDIR" >&6; }
9337else
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
9340fi
9341
9342
9343  test -n "$MKDIR" && break
9344done
9345
9346    else
9347      # If it succeeded, then it was overridden by the user. We will use it
9348      # for the tool.
9349
9350      # First remove it from the list of overridden variables, so we can test
9351      # for unknown variables in the end.
9352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9353
9354      # Check if we try to supply an empty value
9355      if test "x$MKDIR" = x; then
9356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9357$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9359$as_echo_n "checking for MKDIR... " >&6; }
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9361$as_echo "disabled" >&6; }
9362      else
9363        # Check if the provided tool contains a complete path.
9364        tool_specified="$MKDIR"
9365        tool_basename="${tool_specified##*/}"
9366        if test "x$tool_basename" = "x$tool_specified"; then
9367          # A command without a complete path is provided, search $PATH.
9368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9369$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9370          # Extract the first word of "$tool_basename", so it can be a program name with args.
9371set dummy $tool_basename; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410          if test "x$MKDIR" = x; then
9411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412          fi
9413        else
9414          # Otherwise we believe it is a complete path. Use it as it is.
9415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9416$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9418$as_echo_n "checking for MKDIR... " >&6; }
9419          if test ! -x "$tool_specified"; then
9420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421$as_echo "not found" >&6; }
9422            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9423          fi
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425$as_echo "$tool_specified" >&6; }
9426        fi
9427      fi
9428    fi
9429
9430  fi
9431
9432
9433
9434  if test "x$MKDIR" = x; then
9435    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9436  fi
9437
9438
9439
9440
9441
9442  # Publish this variable in the help.
9443
9444
9445  if [ -z "${MKTEMP+x}" ]; then
9446    # The variable is not set by user, try to locate tool using the code snippet
9447    for ac_prog in mktemp
9448do
9449  # Extract the first word of "$ac_prog", so it can be a program name with args.
9450set dummy $ac_prog; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_path_MKTEMP+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $MKTEMP in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466    for ac_exec_ext in '' $ac_executable_extensions; do
9467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473  done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479MKTEMP=$ac_cv_path_MKTEMP
9480if test -n "$MKTEMP"; then
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9482$as_echo "$MKTEMP" >&6; }
9483else
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489  test -n "$MKTEMP" && break
9490done
9491
9492  else
9493    # The variable is set, but is it from the command line or the environment?
9494
9495    # Try to remove the string !MKTEMP! from our list.
9496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9498      # If it failed, the variable was not from the command line. Ignore it,
9499      # but warn the user (except for BASH, which is always set by the calling BASH).
9500      if test "xMKTEMP" != xBASH; then
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9502$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9503      fi
9504      # Try to locate tool using the code snippet
9505      for ac_prog in mktemp
9506do
9507  # Extract the first word of "$ac_prog", so it can be a program name with args.
9508set dummy $ac_prog; ac_word=$2
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9510$as_echo_n "checking for $ac_word... " >&6; }
9511if ${ac_cv_path_MKTEMP+:} false; then :
9512  $as_echo_n "(cached) " >&6
9513else
9514  case $MKTEMP in
9515  [\\/]* | ?:[\\/]*)
9516  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9517  ;;
9518  *)
9519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9520for as_dir in $PATH
9521do
9522  IFS=$as_save_IFS
9523  test -z "$as_dir" && as_dir=.
9524    for ac_exec_ext in '' $ac_executable_extensions; do
9525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9526    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9528    break 2
9529  fi
9530done
9531  done
9532IFS=$as_save_IFS
9533
9534  ;;
9535esac
9536fi
9537MKTEMP=$ac_cv_path_MKTEMP
9538if test -n "$MKTEMP"; then
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9540$as_echo "$MKTEMP" >&6; }
9541else
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544fi
9545
9546
9547  test -n "$MKTEMP" && break
9548done
9549
9550    else
9551      # If it succeeded, then it was overridden by the user. We will use it
9552      # for the tool.
9553
9554      # First remove it from the list of overridden variables, so we can test
9555      # for unknown variables in the end.
9556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9557
9558      # Check if we try to supply an empty value
9559      if test "x$MKTEMP" = x; then
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9561$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9563$as_echo_n "checking for MKTEMP... " >&6; }
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9565$as_echo "disabled" >&6; }
9566      else
9567        # Check if the provided tool contains a complete path.
9568        tool_specified="$MKTEMP"
9569        tool_basename="${tool_specified##*/}"
9570        if test "x$tool_basename" = "x$tool_specified"; then
9571          # A command without a complete path is provided, search $PATH.
9572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9573$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9574          # Extract the first word of "$tool_basename", so it can be a program name with args.
9575set dummy $tool_basename; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614          if test "x$MKTEMP" = x; then
9615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9616          fi
9617        else
9618          # Otherwise we believe it is a complete path. Use it as it is.
9619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9620$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9622$as_echo_n "checking for MKTEMP... " >&6; }
9623          if test ! -x "$tool_specified"; then
9624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9625$as_echo "not found" >&6; }
9626            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9627          fi
9628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9629$as_echo "$tool_specified" >&6; }
9630        fi
9631      fi
9632    fi
9633
9634  fi
9635
9636
9637
9638  if test "x$MKTEMP" = x; then
9639    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9640  fi
9641
9642
9643
9644
9645
9646  # Publish this variable in the help.
9647
9648
9649  if [ -z "${MV+x}" ]; then
9650    # The variable is not set by user, try to locate tool using the code snippet
9651    for ac_prog in mv
9652do
9653  # Extract the first word of "$ac_prog", so it can be a program name with args.
9654set dummy $ac_prog; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_MV+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $MV in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683MV=$ac_cv_path_MV
9684if test -n "$MV"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9686$as_echo "$MV" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693  test -n "$MV" && break
9694done
9695
9696  else
9697    # The variable is set, but is it from the command line or the environment?
9698
9699    # Try to remove the string !MV! from our list.
9700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9702      # If it failed, the variable was not from the command line. Ignore it,
9703      # but warn the user (except for BASH, which is always set by the calling BASH).
9704      if test "xMV" != xBASH; then
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9706$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9707      fi
9708      # Try to locate tool using the code snippet
9709      for ac_prog in mv
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_MV+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $MV in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741MV=$ac_cv_path_MV
9742if test -n "$MV"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9744$as_echo "$MV" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$MV" && break
9752done
9753
9754    else
9755      # If it succeeded, then it was overridden by the user. We will use it
9756      # for the tool.
9757
9758      # First remove it from the list of overridden variables, so we can test
9759      # for unknown variables in the end.
9760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9761
9762      # Check if we try to supply an empty value
9763      if test "x$MV" = x; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9765$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9767$as_echo_n "checking for MV... " >&6; }
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9769$as_echo "disabled" >&6; }
9770      else
9771        # Check if the provided tool contains a complete path.
9772        tool_specified="$MV"
9773        tool_basename="${tool_specified##*/}"
9774        if test "x$tool_basename" = "x$tool_specified"; then
9775          # A command without a complete path is provided, search $PATH.
9776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9777$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9778          # Extract the first word of "$tool_basename", so it can be a program name with args.
9779set dummy $tool_basename; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818          if test "x$MV" = x; then
9819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9820          fi
9821        else
9822          # Otherwise we believe it is a complete path. Use it as it is.
9823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9824$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9826$as_echo_n "checking for MV... " >&6; }
9827          if test ! -x "$tool_specified"; then
9828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9829$as_echo "not found" >&6; }
9830            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9831          fi
9832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9833$as_echo "$tool_specified" >&6; }
9834        fi
9835      fi
9836    fi
9837
9838  fi
9839
9840
9841
9842  if test "x$MV" = x; then
9843    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9844  fi
9845
9846
9847
9848
9849
9850  # Publish this variable in the help.
9851
9852
9853  if [ -z "${NAWK+x}" ]; then
9854    # The variable is not set by user, try to locate tool using the code snippet
9855    for ac_prog in nawk gawk awk
9856do
9857  # Extract the first word of "$ac_prog", so it can be a program name with args.
9858set dummy $ac_prog; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if ${ac_cv_path_NAWK+:} false; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  case $NAWK in
9865  [\\/]* | ?:[\\/]*)
9866  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9867  ;;
9868  *)
9869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874    for ac_exec_ext in '' $ac_executable_extensions; do
9875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881  done
9882IFS=$as_save_IFS
9883
9884  ;;
9885esac
9886fi
9887NAWK=$ac_cv_path_NAWK
9888if test -n "$NAWK"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9890$as_echo "$NAWK" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897  test -n "$NAWK" && break
9898done
9899
9900  else
9901    # The variable is set, but is it from the command line or the environment?
9902
9903    # Try to remove the string !NAWK! from our list.
9904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9906      # If it failed, the variable was not from the command line. Ignore it,
9907      # but warn the user (except for BASH, which is always set by the calling BASH).
9908      if test "xNAWK" != xBASH; then
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9910$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9911      fi
9912      # Try to locate tool using the code snippet
9913      for ac_prog in nawk gawk awk
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if ${ac_cv_path_NAWK+:} false; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $NAWK in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9934    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945NAWK=$ac_cv_path_NAWK
9946if test -n "$NAWK"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9948$as_echo "$NAWK" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$NAWK" && break
9956done
9957
9958    else
9959      # If it succeeded, then it was overridden by the user. We will use it
9960      # for the tool.
9961
9962      # First remove it from the list of overridden variables, so we can test
9963      # for unknown variables in the end.
9964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9965
9966      # Check if we try to supply an empty value
9967      if test "x$NAWK" = x; then
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9969$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9971$as_echo_n "checking for NAWK... " >&6; }
9972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9973$as_echo "disabled" >&6; }
9974      else
9975        # Check if the provided tool contains a complete path.
9976        tool_specified="$NAWK"
9977        tool_basename="${tool_specified##*/}"
9978        if test "x$tool_basename" = "x$tool_specified"; then
9979          # A command without a complete path is provided, search $PATH.
9980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9981$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9982          # Extract the first word of "$tool_basename", so it can be a program name with args.
9983set dummy $tool_basename; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022          if test "x$NAWK" = x; then
10023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10024          fi
10025        else
10026          # Otherwise we believe it is a complete path. Use it as it is.
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10028$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10030$as_echo_n "checking for NAWK... " >&6; }
10031          if test ! -x "$tool_specified"; then
10032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10033$as_echo "not found" >&6; }
10034            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10035          fi
10036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10037$as_echo "$tool_specified" >&6; }
10038        fi
10039      fi
10040    fi
10041
10042  fi
10043
10044
10045
10046  if test "x$NAWK" = x; then
10047    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10048  fi
10049
10050
10051
10052
10053
10054  # Publish this variable in the help.
10055
10056
10057  if [ -z "${PRINTF+x}" ]; then
10058    # The variable is not set by user, try to locate tool using the code snippet
10059    for ac_prog in printf
10060do
10061  # Extract the first word of "$ac_prog", so it can be a program name with args.
10062set dummy $ac_prog; ac_word=$2
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064$as_echo_n "checking for $ac_word... " >&6; }
10065if ${ac_cv_path_PRINTF+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  case $PRINTF in
10069  [\\/]* | ?:[\\/]*)
10070  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10071  ;;
10072  *)
10073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074for as_dir in $PATH
10075do
10076  IFS=$as_save_IFS
10077  test -z "$as_dir" && as_dir=.
10078    for ac_exec_ext in '' $ac_executable_extensions; do
10079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10080    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082    break 2
10083  fi
10084done
10085  done
10086IFS=$as_save_IFS
10087
10088  ;;
10089esac
10090fi
10091PRINTF=$ac_cv_path_PRINTF
10092if test -n "$PRINTF"; then
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10094$as_echo "$PRINTF" >&6; }
10095else
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
10098fi
10099
10100
10101  test -n "$PRINTF" && break
10102done
10103
10104  else
10105    # The variable is set, but is it from the command line or the environment?
10106
10107    # Try to remove the string !PRINTF! from our list.
10108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10110      # If it failed, the variable was not from the command line. Ignore it,
10111      # but warn the user (except for BASH, which is always set by the calling BASH).
10112      if test "xPRINTF" != xBASH; then
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10114$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10115      fi
10116      # Try to locate tool using the code snippet
10117      for ac_prog in printf
10118do
10119  # Extract the first word of "$ac_prog", so it can be a program name with args.
10120set dummy $ac_prog; ac_word=$2
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122$as_echo_n "checking for $ac_word... " >&6; }
10123if ${ac_cv_path_PRINTF+:} false; then :
10124  $as_echo_n "(cached) " >&6
10125else
10126  case $PRINTF in
10127  [\\/]* | ?:[\\/]*)
10128  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10129  ;;
10130  *)
10131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134  IFS=$as_save_IFS
10135  test -z "$as_dir" && as_dir=.
10136    for ac_exec_ext in '' $ac_executable_extensions; do
10137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10138    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10140    break 2
10141  fi
10142done
10143  done
10144IFS=$as_save_IFS
10145
10146  ;;
10147esac
10148fi
10149PRINTF=$ac_cv_path_PRINTF
10150if test -n "$PRINTF"; then
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10152$as_echo "$PRINTF" >&6; }
10153else
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156fi
10157
10158
10159  test -n "$PRINTF" && break
10160done
10161
10162    else
10163      # If it succeeded, then it was overridden by the user. We will use it
10164      # for the tool.
10165
10166      # First remove it from the list of overridden variables, so we can test
10167      # for unknown variables in the end.
10168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10169
10170      # Check if we try to supply an empty value
10171      if test "x$PRINTF" = x; then
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10173$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10175$as_echo_n "checking for PRINTF... " >&6; }
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10177$as_echo "disabled" >&6; }
10178      else
10179        # Check if the provided tool contains a complete path.
10180        tool_specified="$PRINTF"
10181        tool_basename="${tool_specified##*/}"
10182        if test "x$tool_basename" = "x$tool_specified"; then
10183          # A command without a complete path is provided, search $PATH.
10184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10185$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10186          # Extract the first word of "$tool_basename", so it can be a program name with args.
10187set dummy $tool_basename; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226          if test "x$PRINTF" = x; then
10227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10228          fi
10229        else
10230          # Otherwise we believe it is a complete path. Use it as it is.
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10232$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10234$as_echo_n "checking for PRINTF... " >&6; }
10235          if test ! -x "$tool_specified"; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10237$as_echo "not found" >&6; }
10238            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10239          fi
10240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10241$as_echo "$tool_specified" >&6; }
10242        fi
10243      fi
10244    fi
10245
10246  fi
10247
10248
10249
10250  if test "x$PRINTF" = x; then
10251    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if [ -z "${RM+x}" ]; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in rm
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_RM+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $RM in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295RM=$ac_cv_path_RM
10296if test -n "$RM"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10298$as_echo "$RM" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$RM" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !RM! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xRM" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in rm
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_RM+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $RM in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353RM=$ac_cv_path_RM
10354if test -n "$RM"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10356$as_echo "$RM" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$RM" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if we try to supply an empty value
10375      if test "x$RM" = x; then
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10377$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10379$as_echo_n "checking for RM... " >&6; }
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10381$as_echo "disabled" >&6; }
10382      else
10383        # Check if the provided tool contains a complete path.
10384        tool_specified="$RM"
10385        tool_basename="${tool_specified##*/}"
10386        if test "x$tool_basename" = "x$tool_specified"; then
10387          # A command without a complete path is provided, search $PATH.
10388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10389$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10390          # Extract the first word of "$tool_basename", so it can be a program name with args.
10391set dummy $tool_basename; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430          if test "x$RM" = x; then
10431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10432          fi
10433        else
10434          # Otherwise we believe it is a complete path. Use it as it is.
10435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10436$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10438$as_echo_n "checking for RM... " >&6; }
10439          if test ! -x "$tool_specified"; then
10440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10441$as_echo "not found" >&6; }
10442            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10443          fi
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10445$as_echo "$tool_specified" >&6; }
10446        fi
10447      fi
10448    fi
10449
10450  fi
10451
10452
10453
10454  if test "x$RM" = x; then
10455    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10456  fi
10457
10458
10459
10460
10461
10462  # Publish this variable in the help.
10463
10464
10465  if [ -z "${RMDIR+x}" ]; then
10466    # The variable is not set by user, try to locate tool using the code snippet
10467    for ac_prog in rmdir
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_RMDIR+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $RMDIR in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499RMDIR=$ac_cv_path_RMDIR
10500if test -n "$RMDIR"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10502$as_echo "$RMDIR" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$RMDIR" && break
10510done
10511
10512  else
10513    # The variable is set, but is it from the command line or the environment?
10514
10515    # Try to remove the string !RMDIR! from our list.
10516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10518      # If it failed, the variable was not from the command line. Ignore it,
10519      # but warn the user (except for BASH, which is always set by the calling BASH).
10520      if test "xRMDIR" != xBASH; then
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10522$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10523      fi
10524      # Try to locate tool using the code snippet
10525      for ac_prog in rmdir
10526do
10527  # Extract the first word of "$ac_prog", so it can be a program name with args.
10528set dummy $ac_prog; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_RMDIR+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $RMDIR in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557RMDIR=$ac_cv_path_RMDIR
10558if test -n "$RMDIR"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10560$as_echo "$RMDIR" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567  test -n "$RMDIR" && break
10568done
10569
10570    else
10571      # If it succeeded, then it was overridden by the user. We will use it
10572      # for the tool.
10573
10574      # First remove it from the list of overridden variables, so we can test
10575      # for unknown variables in the end.
10576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10577
10578      # Check if we try to supply an empty value
10579      if test "x$RMDIR" = x; then
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10581$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10583$as_echo_n "checking for RMDIR... " >&6; }
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10585$as_echo "disabled" >&6; }
10586      else
10587        # Check if the provided tool contains a complete path.
10588        tool_specified="$RMDIR"
10589        tool_basename="${tool_specified##*/}"
10590        if test "x$tool_basename" = "x$tool_specified"; then
10591          # A command without a complete path is provided, search $PATH.
10592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10593$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10594          # Extract the first word of "$tool_basename", so it can be a program name with args.
10595set dummy $tool_basename; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634          if test "x$RMDIR" = x; then
10635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10636          fi
10637        else
10638          # Otherwise we believe it is a complete path. Use it as it is.
10639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10640$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10642$as_echo_n "checking for RMDIR... " >&6; }
10643          if test ! -x "$tool_specified"; then
10644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10645$as_echo "not found" >&6; }
10646            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10647          fi
10648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10649$as_echo "$tool_specified" >&6; }
10650        fi
10651      fi
10652    fi
10653
10654  fi
10655
10656
10657
10658  if test "x$RMDIR" = x; then
10659    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if [ -z "${SH+x}" ]; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in sh
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_SH+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $SH in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703SH=$ac_cv_path_SH
10704if test -n "$SH"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10706$as_echo "$SH" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$SH" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !SH! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xSH" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in sh
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_SH+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $SH in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761SH=$ac_cv_path_SH
10762if test -n "$SH"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10764$as_echo "$SH" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$SH" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if we try to supply an empty value
10783      if test "x$SH" = x; then
10784        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10785$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10787$as_echo_n "checking for SH... " >&6; }
10788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10789$as_echo "disabled" >&6; }
10790      else
10791        # Check if the provided tool contains a complete path.
10792        tool_specified="$SH"
10793        tool_basename="${tool_specified##*/}"
10794        if test "x$tool_basename" = "x$tool_specified"; then
10795          # A command without a complete path is provided, search $PATH.
10796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10797$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10798          # Extract the first word of "$tool_basename", so it can be a program name with args.
10799set dummy $tool_basename; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838          if test "x$SH" = x; then
10839            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10840          fi
10841        else
10842          # Otherwise we believe it is a complete path. Use it as it is.
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10844$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10846$as_echo_n "checking for SH... " >&6; }
10847          if test ! -x "$tool_specified"; then
10848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10849$as_echo "not found" >&6; }
10850            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10851          fi
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10853$as_echo "$tool_specified" >&6; }
10854        fi
10855      fi
10856    fi
10857
10858  fi
10859
10860
10861
10862  if test "x$SH" = x; then
10863    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10864  fi
10865
10866
10867
10868
10869
10870  # Publish this variable in the help.
10871
10872
10873  if [ -z "${SORT+x}" ]; then
10874    # The variable is not set by user, try to locate tool using the code snippet
10875    for ac_prog in sort
10876do
10877  # Extract the first word of "$ac_prog", so it can be a program name with args.
10878set dummy $ac_prog; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if ${ac_cv_path_SORT+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  case $SORT in
10885  [\\/]* | ?:[\\/]*)
10886  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10887  ;;
10888  *)
10889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892  IFS=$as_save_IFS
10893  test -z "$as_dir" && as_dir=.
10894    for ac_exec_ext in '' $ac_executable_extensions; do
10895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10896    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898    break 2
10899  fi
10900done
10901  done
10902IFS=$as_save_IFS
10903
10904  ;;
10905esac
10906fi
10907SORT=$ac_cv_path_SORT
10908if test -n "$SORT"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10910$as_echo "$SORT" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917  test -n "$SORT" && break
10918done
10919
10920  else
10921    # The variable is set, but is it from the command line or the environment?
10922
10923    # Try to remove the string !SORT! from our list.
10924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10926      # If it failed, the variable was not from the command line. Ignore it,
10927      # but warn the user (except for BASH, which is always set by the calling BASH).
10928      if test "xSORT" != xBASH; then
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10930$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10931      fi
10932      # Try to locate tool using the code snippet
10933      for ac_prog in sort
10934do
10935  # Extract the first word of "$ac_prog", so it can be a program name with args.
10936set dummy $ac_prog; ac_word=$2
10937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10938$as_echo_n "checking for $ac_word... " >&6; }
10939if ${ac_cv_path_SORT+:} false; then :
10940  $as_echo_n "(cached) " >&6
10941else
10942  case $SORT in
10943  [\\/]* | ?:[\\/]*)
10944  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10945  ;;
10946  *)
10947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10948for as_dir in $PATH
10949do
10950  IFS=$as_save_IFS
10951  test -z "$as_dir" && as_dir=.
10952    for ac_exec_ext in '' $ac_executable_extensions; do
10953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10954    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10956    break 2
10957  fi
10958done
10959  done
10960IFS=$as_save_IFS
10961
10962  ;;
10963esac
10964fi
10965SORT=$ac_cv_path_SORT
10966if test -n "$SORT"; then
10967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10968$as_echo "$SORT" >&6; }
10969else
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972fi
10973
10974
10975  test -n "$SORT" && break
10976done
10977
10978    else
10979      # If it succeeded, then it was overridden by the user. We will use it
10980      # for the tool.
10981
10982      # First remove it from the list of overridden variables, so we can test
10983      # for unknown variables in the end.
10984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10985
10986      # Check if we try to supply an empty value
10987      if test "x$SORT" = x; then
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10989$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10991$as_echo_n "checking for SORT... " >&6; }
10992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10993$as_echo "disabled" >&6; }
10994      else
10995        # Check if the provided tool contains a complete path.
10996        tool_specified="$SORT"
10997        tool_basename="${tool_specified##*/}"
10998        if test "x$tool_basename" = "x$tool_specified"; then
10999          # A command without a complete path is provided, search $PATH.
11000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11001$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11002          # Extract the first word of "$tool_basename", so it can be a program name with args.
11003set dummy $tool_basename; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042          if test "x$SORT" = x; then
11043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11044          fi
11045        else
11046          # Otherwise we believe it is a complete path. Use it as it is.
11047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11048$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11050$as_echo_n "checking for SORT... " >&6; }
11051          if test ! -x "$tool_specified"; then
11052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11053$as_echo "not found" >&6; }
11054            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11055          fi
11056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11057$as_echo "$tool_specified" >&6; }
11058        fi
11059      fi
11060    fi
11061
11062  fi
11063
11064
11065
11066  if test "x$SORT" = x; then
11067    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11068  fi
11069
11070
11071
11072
11073
11074  # Publish this variable in the help.
11075
11076
11077  if [ -z "${TAIL+x}" ]; then
11078    # The variable is not set by user, try to locate tool using the code snippet
11079    for ac_prog in tail
11080do
11081  # Extract the first word of "$ac_prog", so it can be a program name with args.
11082set dummy $ac_prog; ac_word=$2
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084$as_echo_n "checking for $ac_word... " >&6; }
11085if ${ac_cv_path_TAIL+:} false; then :
11086  $as_echo_n "(cached) " >&6
11087else
11088  case $TAIL in
11089  [\\/]* | ?:[\\/]*)
11090  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11091  ;;
11092  *)
11093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098    for ac_exec_ext in '' $ac_executable_extensions; do
11099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102    break 2
11103  fi
11104done
11105  done
11106IFS=$as_save_IFS
11107
11108  ;;
11109esac
11110fi
11111TAIL=$ac_cv_path_TAIL
11112if test -n "$TAIL"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11114$as_echo "$TAIL" >&6; }
11115else
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
11118fi
11119
11120
11121  test -n "$TAIL" && break
11122done
11123
11124  else
11125    # The variable is set, but is it from the command line or the environment?
11126
11127    # Try to remove the string !TAIL! from our list.
11128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11130      # If it failed, the variable was not from the command line. Ignore it,
11131      # but warn the user (except for BASH, which is always set by the calling BASH).
11132      if test "xTAIL" != xBASH; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11134$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11135      fi
11136      # Try to locate tool using the code snippet
11137      for ac_prog in tail
11138do
11139  # Extract the first word of "$ac_prog", so it can be a program name with args.
11140set dummy $ac_prog; ac_word=$2
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11142$as_echo_n "checking for $ac_word... " >&6; }
11143if ${ac_cv_path_TAIL+:} false; then :
11144  $as_echo_n "(cached) " >&6
11145else
11146  case $TAIL in
11147  [\\/]* | ?:[\\/]*)
11148  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11149  ;;
11150  *)
11151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11152for as_dir in $PATH
11153do
11154  IFS=$as_save_IFS
11155  test -z "$as_dir" && as_dir=.
11156    for ac_exec_ext in '' $ac_executable_extensions; do
11157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11158    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11160    break 2
11161  fi
11162done
11163  done
11164IFS=$as_save_IFS
11165
11166  ;;
11167esac
11168fi
11169TAIL=$ac_cv_path_TAIL
11170if test -n "$TAIL"; then
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11172$as_echo "$TAIL" >&6; }
11173else
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176fi
11177
11178
11179  test -n "$TAIL" && break
11180done
11181
11182    else
11183      # If it succeeded, then it was overridden by the user. We will use it
11184      # for the tool.
11185
11186      # First remove it from the list of overridden variables, so we can test
11187      # for unknown variables in the end.
11188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11189
11190      # Check if we try to supply an empty value
11191      if test "x$TAIL" = x; then
11192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11193$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11195$as_echo_n "checking for TAIL... " >&6; }
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11197$as_echo "disabled" >&6; }
11198      else
11199        # Check if the provided tool contains a complete path.
11200        tool_specified="$TAIL"
11201        tool_basename="${tool_specified##*/}"
11202        if test "x$tool_basename" = "x$tool_specified"; then
11203          # A command without a complete path is provided, search $PATH.
11204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11205$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11206          # Extract the first word of "$tool_basename", so it can be a program name with args.
11207set dummy $tool_basename; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246          if test "x$TAIL" = x; then
11247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11248          fi
11249        else
11250          # Otherwise we believe it is a complete path. Use it as it is.
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11252$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11254$as_echo_n "checking for TAIL... " >&6; }
11255          if test ! -x "$tool_specified"; then
11256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11257$as_echo "not found" >&6; }
11258            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11259          fi
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11261$as_echo "$tool_specified" >&6; }
11262        fi
11263      fi
11264    fi
11265
11266  fi
11267
11268
11269
11270  if test "x$TAIL" = x; then
11271    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11272  fi
11273
11274
11275
11276
11277
11278  # Publish this variable in the help.
11279
11280
11281  if [ -z "${TAR+x}" ]; then
11282    # The variable is not set by user, try to locate tool using the code snippet
11283    for ac_prog in gtar tar
11284do
11285  # Extract the first word of "$ac_prog", so it can be a program name with args.
11286set dummy $ac_prog; ac_word=$2
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11288$as_echo_n "checking for $ac_word... " >&6; }
11289if ${ac_cv_path_TAR+:} false; then :
11290  $as_echo_n "(cached) " >&6
11291else
11292  case $TAR in
11293  [\\/]* | ?:[\\/]*)
11294  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11295  ;;
11296  *)
11297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11298for as_dir in $PATH
11299do
11300  IFS=$as_save_IFS
11301  test -z "$as_dir" && as_dir=.
11302    for ac_exec_ext in '' $ac_executable_extensions; do
11303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11304    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11306    break 2
11307  fi
11308done
11309  done
11310IFS=$as_save_IFS
11311
11312  ;;
11313esac
11314fi
11315TAR=$ac_cv_path_TAR
11316if test -n "$TAR"; then
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11318$as_echo "$TAR" >&6; }
11319else
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
11322fi
11323
11324
11325  test -n "$TAR" && break
11326done
11327
11328  else
11329    # The variable is set, but is it from the command line or the environment?
11330
11331    # Try to remove the string !TAR! from our list.
11332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11334      # If it failed, the variable was not from the command line. Ignore it,
11335      # but warn the user (except for BASH, which is always set by the calling BASH).
11336      if test "xTAR" != xBASH; then
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11338$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11339      fi
11340      # Try to locate tool using the code snippet
11341      for ac_prog in gtar tar
11342do
11343  # Extract the first word of "$ac_prog", so it can be a program name with args.
11344set dummy $ac_prog; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_path_TAR+:} false; then :
11348  $as_echo_n "(cached) " >&6
11349else
11350  case $TAR in
11351  [\\/]* | ?:[\\/]*)
11352  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11353  ;;
11354  *)
11355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11356for as_dir in $PATH
11357do
11358  IFS=$as_save_IFS
11359  test -z "$as_dir" && as_dir=.
11360    for ac_exec_ext in '' $ac_executable_extensions; do
11361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11362    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11364    break 2
11365  fi
11366done
11367  done
11368IFS=$as_save_IFS
11369
11370  ;;
11371esac
11372fi
11373TAR=$ac_cv_path_TAR
11374if test -n "$TAR"; then
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11376$as_echo "$TAR" >&6; }
11377else
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
11380fi
11381
11382
11383  test -n "$TAR" && break
11384done
11385
11386    else
11387      # If it succeeded, then it was overridden by the user. We will use it
11388      # for the tool.
11389
11390      # First remove it from the list of overridden variables, so we can test
11391      # for unknown variables in the end.
11392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11393
11394      # Check if we try to supply an empty value
11395      if test "x$TAR" = x; then
11396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11397$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11399$as_echo_n "checking for TAR... " >&6; }
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11401$as_echo "disabled" >&6; }
11402      else
11403        # Check if the provided tool contains a complete path.
11404        tool_specified="$TAR"
11405        tool_basename="${tool_specified##*/}"
11406        if test "x$tool_basename" = "x$tool_specified"; then
11407          # A command without a complete path is provided, search $PATH.
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11409$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11410          # Extract the first word of "$tool_basename", so it can be a program name with args.
11411set dummy $tool_basename; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450          if test "x$TAR" = x; then
11451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11452          fi
11453        else
11454          # Otherwise we believe it is a complete path. Use it as it is.
11455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11456$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11458$as_echo_n "checking for TAR... " >&6; }
11459          if test ! -x "$tool_specified"; then
11460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11461$as_echo "not found" >&6; }
11462            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11463          fi
11464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11465$as_echo "$tool_specified" >&6; }
11466        fi
11467      fi
11468    fi
11469
11470  fi
11471
11472
11473
11474  if test "x$TAR" = x; then
11475    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11476  fi
11477
11478
11479
11480
11481
11482  # Publish this variable in the help.
11483
11484
11485  if [ -z "${TEE+x}" ]; then
11486    # The variable is not set by user, try to locate tool using the code snippet
11487    for ac_prog in tee
11488do
11489  # Extract the first word of "$ac_prog", so it can be a program name with args.
11490set dummy $ac_prog; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_path_TEE+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  case $TEE in
11497  [\\/]* | ?:[\\/]*)
11498  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11499  ;;
11500  *)
11501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516  ;;
11517esac
11518fi
11519TEE=$ac_cv_path_TEE
11520if test -n "$TEE"; then
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11522$as_echo "$TEE" >&6; }
11523else
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
11526fi
11527
11528
11529  test -n "$TEE" && break
11530done
11531
11532  else
11533    # The variable is set, but is it from the command line or the environment?
11534
11535    # Try to remove the string !TEE! from our list.
11536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11538      # If it failed, the variable was not from the command line. Ignore it,
11539      # but warn the user (except for BASH, which is always set by the calling BASH).
11540      if test "xTEE" != xBASH; then
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11542$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11543      fi
11544      # Try to locate tool using the code snippet
11545      for ac_prog in tee
11546do
11547  # Extract the first word of "$ac_prog", so it can be a program name with args.
11548set dummy $ac_prog; ac_word=$2
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11550$as_echo_n "checking for $ac_word... " >&6; }
11551if ${ac_cv_path_TEE+:} false; then :
11552  $as_echo_n "(cached) " >&6
11553else
11554  case $TEE in
11555  [\\/]* | ?:[\\/]*)
11556  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11557  ;;
11558  *)
11559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11560for as_dir in $PATH
11561do
11562  IFS=$as_save_IFS
11563  test -z "$as_dir" && as_dir=.
11564    for ac_exec_ext in '' $ac_executable_extensions; do
11565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11566    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11568    break 2
11569  fi
11570done
11571  done
11572IFS=$as_save_IFS
11573
11574  ;;
11575esac
11576fi
11577TEE=$ac_cv_path_TEE
11578if test -n "$TEE"; then
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11580$as_echo "$TEE" >&6; }
11581else
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
11584fi
11585
11586
11587  test -n "$TEE" && break
11588done
11589
11590    else
11591      # If it succeeded, then it was overridden by the user. We will use it
11592      # for the tool.
11593
11594      # First remove it from the list of overridden variables, so we can test
11595      # for unknown variables in the end.
11596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11597
11598      # Check if we try to supply an empty value
11599      if test "x$TEE" = x; then
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11601$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11603$as_echo_n "checking for TEE... " >&6; }
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11605$as_echo "disabled" >&6; }
11606      else
11607        # Check if the provided tool contains a complete path.
11608        tool_specified="$TEE"
11609        tool_basename="${tool_specified##*/}"
11610        if test "x$tool_basename" = "x$tool_specified"; then
11611          # A command without a complete path is provided, search $PATH.
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11613$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11614          # Extract the first word of "$tool_basename", so it can be a program name with args.
11615set dummy $tool_basename; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654          if test "x$TEE" = x; then
11655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11656          fi
11657        else
11658          # Otherwise we believe it is a complete path. Use it as it is.
11659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11660$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11662$as_echo_n "checking for TEE... " >&6; }
11663          if test ! -x "$tool_specified"; then
11664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11665$as_echo "not found" >&6; }
11666            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11667          fi
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11669$as_echo "$tool_specified" >&6; }
11670        fi
11671      fi
11672    fi
11673
11674  fi
11675
11676
11677
11678  if test "x$TEE" = x; then
11679    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11680  fi
11681
11682
11683
11684
11685
11686  # Publish this variable in the help.
11687
11688
11689  if [ -z "${TOUCH+x}" ]; then
11690    # The variable is not set by user, try to locate tool using the code snippet
11691    for ac_prog in touch
11692do
11693  # Extract the first word of "$ac_prog", so it can be a program name with args.
11694set dummy $ac_prog; ac_word=$2
11695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11696$as_echo_n "checking for $ac_word... " >&6; }
11697if ${ac_cv_path_TOUCH+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  case $TOUCH in
11701  [\\/]* | ?:[\\/]*)
11702  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11703  ;;
11704  *)
11705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11706for as_dir in $PATH
11707do
11708  IFS=$as_save_IFS
11709  test -z "$as_dir" && as_dir=.
11710    for ac_exec_ext in '' $ac_executable_extensions; do
11711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11712    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11714    break 2
11715  fi
11716done
11717  done
11718IFS=$as_save_IFS
11719
11720  ;;
11721esac
11722fi
11723TOUCH=$ac_cv_path_TOUCH
11724if test -n "$TOUCH"; then
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11726$as_echo "$TOUCH" >&6; }
11727else
11728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
11730fi
11731
11732
11733  test -n "$TOUCH" && break
11734done
11735
11736  else
11737    # The variable is set, but is it from the command line or the environment?
11738
11739    # Try to remove the string !TOUCH! from our list.
11740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11742      # If it failed, the variable was not from the command line. Ignore it,
11743      # but warn the user (except for BASH, which is always set by the calling BASH).
11744      if test "xTOUCH" != xBASH; then
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11746$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11747      fi
11748      # Try to locate tool using the code snippet
11749      for ac_prog in touch
11750do
11751  # Extract the first word of "$ac_prog", so it can be a program name with args.
11752set dummy $ac_prog; ac_word=$2
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11754$as_echo_n "checking for $ac_word... " >&6; }
11755if ${ac_cv_path_TOUCH+:} false; then :
11756  $as_echo_n "(cached) " >&6
11757else
11758  case $TOUCH in
11759  [\\/]* | ?:[\\/]*)
11760  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11761  ;;
11762  *)
11763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11764for as_dir in $PATH
11765do
11766  IFS=$as_save_IFS
11767  test -z "$as_dir" && as_dir=.
11768    for ac_exec_ext in '' $ac_executable_extensions; do
11769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11770    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11772    break 2
11773  fi
11774done
11775  done
11776IFS=$as_save_IFS
11777
11778  ;;
11779esac
11780fi
11781TOUCH=$ac_cv_path_TOUCH
11782if test -n "$TOUCH"; then
11783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11784$as_echo "$TOUCH" >&6; }
11785else
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
11788fi
11789
11790
11791  test -n "$TOUCH" && break
11792done
11793
11794    else
11795      # If it succeeded, then it was overridden by the user. We will use it
11796      # for the tool.
11797
11798      # First remove it from the list of overridden variables, so we can test
11799      # for unknown variables in the end.
11800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11801
11802      # Check if we try to supply an empty value
11803      if test "x$TOUCH" = x; then
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11805$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11807$as_echo_n "checking for TOUCH... " >&6; }
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11809$as_echo "disabled" >&6; }
11810      else
11811        # Check if the provided tool contains a complete path.
11812        tool_specified="$TOUCH"
11813        tool_basename="${tool_specified##*/}"
11814        if test "x$tool_basename" = "x$tool_specified"; then
11815          # A command without a complete path is provided, search $PATH.
11816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11817$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11818          # Extract the first word of "$tool_basename", so it can be a program name with args.
11819set dummy $tool_basename; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858          if test "x$TOUCH" = x; then
11859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11860          fi
11861        else
11862          # Otherwise we believe it is a complete path. Use it as it is.
11863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11864$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11866$as_echo_n "checking for TOUCH... " >&6; }
11867          if test ! -x "$tool_specified"; then
11868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11869$as_echo "not found" >&6; }
11870            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11871          fi
11872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11873$as_echo "$tool_specified" >&6; }
11874        fi
11875      fi
11876    fi
11877
11878  fi
11879
11880
11881
11882  if test "x$TOUCH" = x; then
11883    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11884  fi
11885
11886
11887
11888
11889
11890  # Publish this variable in the help.
11891
11892
11893  if [ -z "${TR+x}" ]; then
11894    # The variable is not set by user, try to locate tool using the code snippet
11895    for ac_prog in tr
11896do
11897  # Extract the first word of "$ac_prog", so it can be a program name with args.
11898set dummy $ac_prog; ac_word=$2
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11900$as_echo_n "checking for $ac_word... " >&6; }
11901if ${ac_cv_path_TR+:} false; then :
11902  $as_echo_n "(cached) " >&6
11903else
11904  case $TR in
11905  [\\/]* | ?:[\\/]*)
11906  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11907  ;;
11908  *)
11909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910for as_dir in $PATH
11911do
11912  IFS=$as_save_IFS
11913  test -z "$as_dir" && as_dir=.
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11916    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11918    break 2
11919  fi
11920done
11921  done
11922IFS=$as_save_IFS
11923
11924  ;;
11925esac
11926fi
11927TR=$ac_cv_path_TR
11928if test -n "$TR"; then
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11930$as_echo "$TR" >&6; }
11931else
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934fi
11935
11936
11937  test -n "$TR" && break
11938done
11939
11940  else
11941    # The variable is set, but is it from the command line or the environment?
11942
11943    # Try to remove the string !TR! from our list.
11944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11946      # If it failed, the variable was not from the command line. Ignore it,
11947      # but warn the user (except for BASH, which is always set by the calling BASH).
11948      if test "xTR" != xBASH; then
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11950$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11951      fi
11952      # Try to locate tool using the code snippet
11953      for ac_prog in tr
11954do
11955  # Extract the first word of "$ac_prog", so it can be a program name with args.
11956set dummy $ac_prog; ac_word=$2
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11958$as_echo_n "checking for $ac_word... " >&6; }
11959if ${ac_cv_path_TR+:} false; then :
11960  $as_echo_n "(cached) " >&6
11961else
11962  case $TR in
11963  [\\/]* | ?:[\\/]*)
11964  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11965  ;;
11966  *)
11967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11968for as_dir in $PATH
11969do
11970  IFS=$as_save_IFS
11971  test -z "$as_dir" && as_dir=.
11972    for ac_exec_ext in '' $ac_executable_extensions; do
11973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11974    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11976    break 2
11977  fi
11978done
11979  done
11980IFS=$as_save_IFS
11981
11982  ;;
11983esac
11984fi
11985TR=$ac_cv_path_TR
11986if test -n "$TR"; then
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11988$as_echo "$TR" >&6; }
11989else
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11991$as_echo "no" >&6; }
11992fi
11993
11994
11995  test -n "$TR" && break
11996done
11997
11998    else
11999      # If it succeeded, then it was overridden by the user. We will use it
12000      # for the tool.
12001
12002      # First remove it from the list of overridden variables, so we can test
12003      # for unknown variables in the end.
12004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12005
12006      # Check if we try to supply an empty value
12007      if test "x$TR" = x; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12009$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12011$as_echo_n "checking for TR... " >&6; }
12012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12013$as_echo "disabled" >&6; }
12014      else
12015        # Check if the provided tool contains a complete path.
12016        tool_specified="$TR"
12017        tool_basename="${tool_specified##*/}"
12018        if test "x$tool_basename" = "x$tool_specified"; then
12019          # A command without a complete path is provided, search $PATH.
12020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12021$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12022          # Extract the first word of "$tool_basename", so it can be a program name with args.
12023set dummy $tool_basename; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062          if test "x$TR" = x; then
12063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12064          fi
12065        else
12066          # Otherwise we believe it is a complete path. Use it as it is.
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12068$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12070$as_echo_n "checking for TR... " >&6; }
12071          if test ! -x "$tool_specified"; then
12072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12073$as_echo "not found" >&6; }
12074            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12075          fi
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12077$as_echo "$tool_specified" >&6; }
12078        fi
12079      fi
12080    fi
12081
12082  fi
12083
12084
12085
12086  if test "x$TR" = x; then
12087    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12088  fi
12089
12090
12091
12092
12093
12094  # Publish this variable in the help.
12095
12096
12097  if [ -z "${UNAME+x}" ]; then
12098    # The variable is not set by user, try to locate tool using the code snippet
12099    for ac_prog in uname
12100do
12101  # Extract the first word of "$ac_prog", so it can be a program name with args.
12102set dummy $ac_prog; ac_word=$2
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12104$as_echo_n "checking for $ac_word... " >&6; }
12105if ${ac_cv_path_UNAME+:} false; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  case $UNAME in
12109  [\\/]* | ?:[\\/]*)
12110  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12111  ;;
12112  *)
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12120    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12122    break 2
12123  fi
12124done
12125  done
12126IFS=$as_save_IFS
12127
12128  ;;
12129esac
12130fi
12131UNAME=$ac_cv_path_UNAME
12132if test -n "$UNAME"; then
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12134$as_echo "$UNAME" >&6; }
12135else
12136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137$as_echo "no" >&6; }
12138fi
12139
12140
12141  test -n "$UNAME" && break
12142done
12143
12144  else
12145    # The variable is set, but is it from the command line or the environment?
12146
12147    # Try to remove the string !UNAME! from our list.
12148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12150      # If it failed, the variable was not from the command line. Ignore it,
12151      # but warn the user (except for BASH, which is always set by the calling BASH).
12152      if test "xUNAME" != xBASH; then
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12154$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12155      fi
12156      # Try to locate tool using the code snippet
12157      for ac_prog in uname
12158do
12159  # Extract the first word of "$ac_prog", so it can be a program name with args.
12160set dummy $ac_prog; ac_word=$2
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12162$as_echo_n "checking for $ac_word... " >&6; }
12163if ${ac_cv_path_UNAME+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  case $UNAME in
12167  [\\/]* | ?:[\\/]*)
12168  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12169  ;;
12170  *)
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12178    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12180    break 2
12181  fi
12182done
12183  done
12184IFS=$as_save_IFS
12185
12186  ;;
12187esac
12188fi
12189UNAME=$ac_cv_path_UNAME
12190if test -n "$UNAME"; then
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12192$as_echo "$UNAME" >&6; }
12193else
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
12196fi
12197
12198
12199  test -n "$UNAME" && break
12200done
12201
12202    else
12203      # If it succeeded, then it was overridden by the user. We will use it
12204      # for the tool.
12205
12206      # First remove it from the list of overridden variables, so we can test
12207      # for unknown variables in the end.
12208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12209
12210      # Check if we try to supply an empty value
12211      if test "x$UNAME" = x; then
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12213$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12215$as_echo_n "checking for UNAME... " >&6; }
12216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12217$as_echo "disabled" >&6; }
12218      else
12219        # Check if the provided tool contains a complete path.
12220        tool_specified="$UNAME"
12221        tool_basename="${tool_specified##*/}"
12222        if test "x$tool_basename" = "x$tool_specified"; then
12223          # A command without a complete path is provided, search $PATH.
12224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12225$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12226          # Extract the first word of "$tool_basename", so it can be a program name with args.
12227set dummy $tool_basename; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266          if test "x$UNAME" = x; then
12267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12268          fi
12269        else
12270          # Otherwise we believe it is a complete path. Use it as it is.
12271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12272$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12274$as_echo_n "checking for UNAME... " >&6; }
12275          if test ! -x "$tool_specified"; then
12276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12277$as_echo "not found" >&6; }
12278            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12279          fi
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12281$as_echo "$tool_specified" >&6; }
12282        fi
12283      fi
12284    fi
12285
12286  fi
12287
12288
12289
12290  if test "x$UNAME" = x; then
12291    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12292  fi
12293
12294
12295
12296
12297
12298  # Publish this variable in the help.
12299
12300
12301  if [ -z "${UNIQ+x}" ]; then
12302    # The variable is not set by user, try to locate tool using the code snippet
12303    for ac_prog in uniq
12304do
12305  # Extract the first word of "$ac_prog", so it can be a program name with args.
12306set dummy $ac_prog; ac_word=$2
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12308$as_echo_n "checking for $ac_word... " >&6; }
12309if ${ac_cv_path_UNIQ+:} false; then :
12310  $as_echo_n "(cached) " >&6
12311else
12312  case $UNIQ in
12313  [\\/]* | ?:[\\/]*)
12314  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12315  ;;
12316  *)
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12324    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12326    break 2
12327  fi
12328done
12329  done
12330IFS=$as_save_IFS
12331
12332  ;;
12333esac
12334fi
12335UNIQ=$ac_cv_path_UNIQ
12336if test -n "$UNIQ"; then
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12338$as_echo "$UNIQ" >&6; }
12339else
12340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341$as_echo "no" >&6; }
12342fi
12343
12344
12345  test -n "$UNIQ" && break
12346done
12347
12348  else
12349    # The variable is set, but is it from the command line or the environment?
12350
12351    # Try to remove the string !UNIQ! from our list.
12352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12354      # If it failed, the variable was not from the command line. Ignore it,
12355      # but warn the user (except for BASH, which is always set by the calling BASH).
12356      if test "xUNIQ" != xBASH; then
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12358$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12359      fi
12360      # Try to locate tool using the code snippet
12361      for ac_prog in uniq
12362do
12363  # Extract the first word of "$ac_prog", so it can be a program name with args.
12364set dummy $ac_prog; ac_word=$2
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12366$as_echo_n "checking for $ac_word... " >&6; }
12367if ${ac_cv_path_UNIQ+:} false; then :
12368  $as_echo_n "(cached) " >&6
12369else
12370  case $UNIQ in
12371  [\\/]* | ?:[\\/]*)
12372  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12373  ;;
12374  *)
12375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12376for as_dir in $PATH
12377do
12378  IFS=$as_save_IFS
12379  test -z "$as_dir" && as_dir=.
12380    for ac_exec_ext in '' $ac_executable_extensions; do
12381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12382    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12384    break 2
12385  fi
12386done
12387  done
12388IFS=$as_save_IFS
12389
12390  ;;
12391esac
12392fi
12393UNIQ=$ac_cv_path_UNIQ
12394if test -n "$UNIQ"; then
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12396$as_echo "$UNIQ" >&6; }
12397else
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
12400fi
12401
12402
12403  test -n "$UNIQ" && break
12404done
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if we try to supply an empty value
12415      if test "x$UNIQ" = x; then
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12417$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12419$as_echo_n "checking for UNIQ... " >&6; }
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12421$as_echo "disabled" >&6; }
12422      else
12423        # Check if the provided tool contains a complete path.
12424        tool_specified="$UNIQ"
12425        tool_basename="${tool_specified##*/}"
12426        if test "x$tool_basename" = "x$tool_specified"; then
12427          # A command without a complete path is provided, search $PATH.
12428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12429$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12430          # Extract the first word of "$tool_basename", so it can be a program name with args.
12431set dummy $tool_basename; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470          if test "x$UNIQ" = x; then
12471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12472          fi
12473        else
12474          # Otherwise we believe it is a complete path. Use it as it is.
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12476$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12478$as_echo_n "checking for UNIQ... " >&6; }
12479          if test ! -x "$tool_specified"; then
12480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12481$as_echo "not found" >&6; }
12482            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12483          fi
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12485$as_echo "$tool_specified" >&6; }
12486        fi
12487      fi
12488    fi
12489
12490  fi
12491
12492
12493
12494  if test "x$UNIQ" = x; then
12495    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12496  fi
12497
12498
12499
12500
12501
12502  # Publish this variable in the help.
12503
12504
12505  if [ -z "${WC+x}" ]; then
12506    # The variable is not set by user, try to locate tool using the code snippet
12507    for ac_prog in wc
12508do
12509  # Extract the first word of "$ac_prog", so it can be a program name with args.
12510set dummy $ac_prog; ac_word=$2
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12512$as_echo_n "checking for $ac_word... " >&6; }
12513if ${ac_cv_path_WC+:} false; then :
12514  $as_echo_n "(cached) " >&6
12515else
12516  case $WC in
12517  [\\/]* | ?:[\\/]*)
12518  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12519  ;;
12520  *)
12521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12522for as_dir in $PATH
12523do
12524  IFS=$as_save_IFS
12525  test -z "$as_dir" && as_dir=.
12526    for ac_exec_ext in '' $ac_executable_extensions; do
12527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12528    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12530    break 2
12531  fi
12532done
12533  done
12534IFS=$as_save_IFS
12535
12536  ;;
12537esac
12538fi
12539WC=$ac_cv_path_WC
12540if test -n "$WC"; then
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12542$as_echo "$WC" >&6; }
12543else
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545$as_echo "no" >&6; }
12546fi
12547
12548
12549  test -n "$WC" && break
12550done
12551
12552  else
12553    # The variable is set, but is it from the command line or the environment?
12554
12555    # Try to remove the string !WC! from our list.
12556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12558      # If it failed, the variable was not from the command line. Ignore it,
12559      # but warn the user (except for BASH, which is always set by the calling BASH).
12560      if test "xWC" != xBASH; then
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12562$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12563      fi
12564      # Try to locate tool using the code snippet
12565      for ac_prog in wc
12566do
12567  # Extract the first word of "$ac_prog", so it can be a program name with args.
12568set dummy $ac_prog; ac_word=$2
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12570$as_echo_n "checking for $ac_word... " >&6; }
12571if ${ac_cv_path_WC+:} false; then :
12572  $as_echo_n "(cached) " >&6
12573else
12574  case $WC in
12575  [\\/]* | ?:[\\/]*)
12576  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12577  ;;
12578  *)
12579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12580for as_dir in $PATH
12581do
12582  IFS=$as_save_IFS
12583  test -z "$as_dir" && as_dir=.
12584    for ac_exec_ext in '' $ac_executable_extensions; do
12585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12586    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12588    break 2
12589  fi
12590done
12591  done
12592IFS=$as_save_IFS
12593
12594  ;;
12595esac
12596fi
12597WC=$ac_cv_path_WC
12598if test -n "$WC"; then
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12600$as_echo "$WC" >&6; }
12601else
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
12604fi
12605
12606
12607  test -n "$WC" && break
12608done
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if we try to supply an empty value
12619      if test "x$WC" = x; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12621$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12623$as_echo_n "checking for WC... " >&6; }
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12625$as_echo "disabled" >&6; }
12626      else
12627        # Check if the provided tool contains a complete path.
12628        tool_specified="$WC"
12629        tool_basename="${tool_specified##*/}"
12630        if test "x$tool_basename" = "x$tool_specified"; then
12631          # A command without a complete path is provided, search $PATH.
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12634          # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674          if test "x$WC" = x; then
12675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676          fi
12677        else
12678          # Otherwise we believe it is a complete path. Use it as it is.
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12682$as_echo_n "checking for WC... " >&6; }
12683          if test ! -x "$tool_specified"; then
12684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12687          fi
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690        fi
12691      fi
12692    fi
12693
12694  fi
12695
12696
12697
12698  if test "x$WC" = x; then
12699    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12700  fi
12701
12702
12703
12704
12705
12706  # Publish this variable in the help.
12707
12708
12709  if [ -z "${WHICH+x}" ]; then
12710    # The variable is not set by user, try to locate tool using the code snippet
12711    for ac_prog in which
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_WHICH+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $WHICH in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743WHICH=$ac_cv_path_WHICH
12744if test -n "$WHICH"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12746$as_echo "$WHICH" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$WHICH" && break
12754done
12755
12756  else
12757    # The variable is set, but is it from the command line or the environment?
12758
12759    # Try to remove the string !WHICH! from our list.
12760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762      # If it failed, the variable was not from the command line. Ignore it,
12763      # but warn the user (except for BASH, which is always set by the calling BASH).
12764      if test "xWHICH" != xBASH; then
12765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12766$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12767      fi
12768      # Try to locate tool using the code snippet
12769      for ac_prog in which
12770do
12771  # Extract the first word of "$ac_prog", so it can be a program name with args.
12772set dummy $ac_prog; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_WHICH+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $WHICH in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801WHICH=$ac_cv_path_WHICH
12802if test -n "$WHICH"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12804$as_echo "$WHICH" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811  test -n "$WHICH" && break
12812done
12813
12814    else
12815      # If it succeeded, then it was overridden by the user. We will use it
12816      # for the tool.
12817
12818      # First remove it from the list of overridden variables, so we can test
12819      # for unknown variables in the end.
12820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821
12822      # Check if we try to supply an empty value
12823      if test "x$WHICH" = x; then
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12825$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12827$as_echo_n "checking for WHICH... " >&6; }
12828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12829$as_echo "disabled" >&6; }
12830      else
12831        # Check if the provided tool contains a complete path.
12832        tool_specified="$WHICH"
12833        tool_basename="${tool_specified##*/}"
12834        if test "x$tool_basename" = "x$tool_specified"; then
12835          # A command without a complete path is provided, search $PATH.
12836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12837$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12838          # Extract the first word of "$tool_basename", so it can be a program name with args.
12839set dummy $tool_basename; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878          if test "x$WHICH" = x; then
12879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880          fi
12881        else
12882          # Otherwise we believe it is a complete path. Use it as it is.
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12884$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12886$as_echo_n "checking for WHICH... " >&6; }
12887          if test ! -x "$tool_specified"; then
12888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889$as_echo "not found" >&6; }
12890            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12891          fi
12892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893$as_echo "$tool_specified" >&6; }
12894        fi
12895      fi
12896    fi
12897
12898  fi
12899
12900
12901
12902  if test "x$WHICH" = x; then
12903    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12904  fi
12905
12906
12907
12908
12909
12910  # Publish this variable in the help.
12911
12912
12913  if [ -z "${XARGS+x}" ]; then
12914    # The variable is not set by user, try to locate tool using the code snippet
12915    for ac_prog in xargs
12916do
12917  # Extract the first word of "$ac_prog", so it can be a program name with args.
12918set dummy $ac_prog; ac_word=$2
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12920$as_echo_n "checking for $ac_word... " >&6; }
12921if ${ac_cv_path_XARGS+:} false; then :
12922  $as_echo_n "(cached) " >&6
12923else
12924  case $XARGS in
12925  [\\/]* | ?:[\\/]*)
12926  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12927  ;;
12928  *)
12929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12930for as_dir in $PATH
12931do
12932  IFS=$as_save_IFS
12933  test -z "$as_dir" && as_dir=.
12934    for ac_exec_ext in '' $ac_executable_extensions; do
12935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12936    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12938    break 2
12939  fi
12940done
12941  done
12942IFS=$as_save_IFS
12943
12944  ;;
12945esac
12946fi
12947XARGS=$ac_cv_path_XARGS
12948if test -n "$XARGS"; then
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12950$as_echo "$XARGS" >&6; }
12951else
12952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12953$as_echo "no" >&6; }
12954fi
12955
12956
12957  test -n "$XARGS" && break
12958done
12959
12960  else
12961    # The variable is set, but is it from the command line or the environment?
12962
12963    # Try to remove the string !XARGS! from our list.
12964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12966      # If it failed, the variable was not from the command line. Ignore it,
12967      # but warn the user (except for BASH, which is always set by the calling BASH).
12968      if test "xXARGS" != xBASH; then
12969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12970$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12971      fi
12972      # Try to locate tool using the code snippet
12973      for ac_prog in xargs
12974do
12975  # Extract the first word of "$ac_prog", so it can be a program name with args.
12976set dummy $ac_prog; ac_word=$2
12977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12978$as_echo_n "checking for $ac_word... " >&6; }
12979if ${ac_cv_path_XARGS+:} false; then :
12980  $as_echo_n "(cached) " >&6
12981else
12982  case $XARGS in
12983  [\\/]* | ?:[\\/]*)
12984  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12985  ;;
12986  *)
12987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12988for as_dir in $PATH
12989do
12990  IFS=$as_save_IFS
12991  test -z "$as_dir" && as_dir=.
12992    for ac_exec_ext in '' $ac_executable_extensions; do
12993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12994    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12996    break 2
12997  fi
12998done
12999  done
13000IFS=$as_save_IFS
13001
13002  ;;
13003esac
13004fi
13005XARGS=$ac_cv_path_XARGS
13006if test -n "$XARGS"; then
13007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13008$as_echo "$XARGS" >&6; }
13009else
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13011$as_echo "no" >&6; }
13012fi
13013
13014
13015  test -n "$XARGS" && break
13016done
13017
13018    else
13019      # If it succeeded, then it was overridden by the user. We will use it
13020      # for the tool.
13021
13022      # First remove it from the list of overridden variables, so we can test
13023      # for unknown variables in the end.
13024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13025
13026      # Check if we try to supply an empty value
13027      if test "x$XARGS" = x; then
13028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13029$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13031$as_echo_n "checking for XARGS... " >&6; }
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13033$as_echo "disabled" >&6; }
13034      else
13035        # Check if the provided tool contains a complete path.
13036        tool_specified="$XARGS"
13037        tool_basename="${tool_specified##*/}"
13038        if test "x$tool_basename" = "x$tool_specified"; then
13039          # A command without a complete path is provided, search $PATH.
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13042          # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082          if test "x$XARGS" = x; then
13083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084          fi
13085        else
13086          # Otherwise we believe it is a complete path. Use it as it is.
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13090$as_echo_n "checking for XARGS... " >&6; }
13091          if test ! -x "$tool_specified"; then
13092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13095          fi
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098        fi
13099      fi
13100    fi
13101
13102  fi
13103
13104
13105
13106  if test "x$XARGS" = x; then
13107    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13108  fi
13109
13110
13111
13112  # Then required tools that require some special treatment.
13113
13114
13115  # Publish this variable in the help.
13116
13117
13118  if [ -z "${AWK+x}" ]; then
13119    # The variable is not set by user, try to locate tool using the code snippet
13120    for ac_prog in gawk mawk nawk awk
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_prog_AWK+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  if test -n "$AWK"; then
13130  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13131else
13132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13133for as_dir in $PATH
13134do
13135  IFS=$as_save_IFS
13136  test -z "$as_dir" && as_dir=.
13137    for ac_exec_ext in '' $ac_executable_extensions; do
13138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13139    ac_cv_prog_AWK="$ac_prog"
13140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13141    break 2
13142  fi
13143done
13144  done
13145IFS=$as_save_IFS
13146
13147fi
13148fi
13149AWK=$ac_cv_prog_AWK
13150if test -n "$AWK"; then
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13152$as_echo "$AWK" >&6; }
13153else
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155$as_echo "no" >&6; }
13156fi
13157
13158
13159  test -n "$AWK" && break
13160done
13161
13162  else
13163    # The variable is set, but is it from the command line or the environment?
13164
13165    # Try to remove the string !AWK! from our list.
13166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13168      # If it failed, the variable was not from the command line. Ignore it,
13169      # but warn the user (except for BASH, which is always set by the calling BASH).
13170      if test "xAWK" != xBASH; then
13171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13172$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13173      fi
13174      # Try to locate tool using the code snippet
13175      for ac_prog in gawk mawk nawk awk
13176do
13177  # Extract the first word of "$ac_prog", so it can be a program name with args.
13178set dummy $ac_prog; ac_word=$2
13179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13180$as_echo_n "checking for $ac_word... " >&6; }
13181if ${ac_cv_prog_AWK+:} false; then :
13182  $as_echo_n "(cached) " >&6
13183else
13184  if test -n "$AWK"; then
13185  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13186else
13187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13188for as_dir in $PATH
13189do
13190  IFS=$as_save_IFS
13191  test -z "$as_dir" && as_dir=.
13192    for ac_exec_ext in '' $ac_executable_extensions; do
13193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13194    ac_cv_prog_AWK="$ac_prog"
13195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13196    break 2
13197  fi
13198done
13199  done
13200IFS=$as_save_IFS
13201
13202fi
13203fi
13204AWK=$ac_cv_prog_AWK
13205if test -n "$AWK"; then
13206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13207$as_echo "$AWK" >&6; }
13208else
13209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13210$as_echo "no" >&6; }
13211fi
13212
13213
13214  test -n "$AWK" && break
13215done
13216
13217    else
13218      # If it succeeded, then it was overridden by the user. We will use it
13219      # for the tool.
13220
13221      # First remove it from the list of overridden variables, so we can test
13222      # for unknown variables in the end.
13223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13224
13225      # Check if we try to supply an empty value
13226      if test "x$AWK" = x; then
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13228$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13230$as_echo_n "checking for AWK... " >&6; }
13231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13232$as_echo "disabled" >&6; }
13233      else
13234        # Check if the provided tool contains a complete path.
13235        tool_specified="$AWK"
13236        tool_basename="${tool_specified##*/}"
13237        if test "x$tool_basename" = "x$tool_specified"; then
13238          # A command without a complete path is provided, search $PATH.
13239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13240$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13241          # Extract the first word of "$tool_basename", so it can be a program name with args.
13242set dummy $tool_basename; ac_word=$2
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13244$as_echo_n "checking for $ac_word... " >&6; }
13245if ${ac_cv_path_AWK+:} false; then :
13246  $as_echo_n "(cached) " >&6
13247else
13248  case $AWK in
13249  [\\/]* | ?:[\\/]*)
13250  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13251  ;;
13252  *)
13253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13254for as_dir in $PATH
13255do
13256  IFS=$as_save_IFS
13257  test -z "$as_dir" && as_dir=.
13258    for ac_exec_ext in '' $ac_executable_extensions; do
13259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13260    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13262    break 2
13263  fi
13264done
13265  done
13266IFS=$as_save_IFS
13267
13268  ;;
13269esac
13270fi
13271AWK=$ac_cv_path_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281          if test "x$AWK" = x; then
13282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13283          fi
13284        else
13285          # Otherwise we believe it is a complete path. Use it as it is.
13286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13287$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13289$as_echo_n "checking for AWK... " >&6; }
13290          if test ! -x "$tool_specified"; then
13291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13292$as_echo "not found" >&6; }
13293            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13294          fi
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13296$as_echo "$tool_specified" >&6; }
13297        fi
13298      fi
13299    fi
13300
13301  fi
13302
13303
13304  if test "x$AWK" = x; then
13305    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13306  fi
13307
13308
13309
13310
13311  # Publish this variable in the help.
13312
13313
13314  if [ -z "${GREP+x}" ]; then
13315    # The variable is not set by user, try to locate tool using the code snippet
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13317$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13318if ${ac_cv_path_GREP+:} false; then :
13319  $as_echo_n "(cached) " >&6
13320else
13321  if test -z "$GREP"; then
13322  ac_path_GREP_found=false
13323  # Loop through the user's path and test for each of PROGNAME-LIST
13324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13325for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13326do
13327  IFS=$as_save_IFS
13328  test -z "$as_dir" && as_dir=.
13329    for ac_prog in grep ggrep; do
13330    for ac_exec_ext in '' $ac_executable_extensions; do
13331      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13332      as_fn_executable_p "$ac_path_GREP" || continue
13333# Check for GNU ac_path_GREP and select it if it is found.
13334  # Check for GNU $ac_path_GREP
13335case `"$ac_path_GREP" --version 2>&1` in
13336*GNU*)
13337  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13338*)
13339  ac_count=0
13340  $as_echo_n 0123456789 >"conftest.in"
13341  while :
13342  do
13343    cat "conftest.in" "conftest.in" >"conftest.tmp"
13344    mv "conftest.tmp" "conftest.in"
13345    cp "conftest.in" "conftest.nl"
13346    $as_echo 'GREP' >> "conftest.nl"
13347    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13348    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13349    as_fn_arith $ac_count + 1 && ac_count=$as_val
13350    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13351      # Best one so far, save it but keep looking for a better one
13352      ac_cv_path_GREP="$ac_path_GREP"
13353      ac_path_GREP_max=$ac_count
13354    fi
13355    # 10*(2^10) chars as input seems more than enough
13356    test $ac_count -gt 10 && break
13357  done
13358  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13359esac
13360
13361      $ac_path_GREP_found && break 3
13362    done
13363  done
13364  done
13365IFS=$as_save_IFS
13366  if test -z "$ac_cv_path_GREP"; then
13367    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13368  fi
13369else
13370  ac_cv_path_GREP=$GREP
13371fi
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13375$as_echo "$ac_cv_path_GREP" >&6; }
13376 GREP="$ac_cv_path_GREP"
13377
13378
13379  else
13380    # The variable is set, but is it from the command line or the environment?
13381
13382    # Try to remove the string !GREP! from our list.
13383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13385      # If it failed, the variable was not from the command line. Ignore it,
13386      # but warn the user (except for BASH, which is always set by the calling BASH).
13387      if test "xGREP" != xBASH; then
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13389$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13390      fi
13391      # Try to locate tool using the code snippet
13392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455    else
13456      # If it succeeded, then it was overridden by the user. We will use it
13457      # for the tool.
13458
13459      # First remove it from the list of overridden variables, so we can test
13460      # for unknown variables in the end.
13461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13462
13463      # Check if we try to supply an empty value
13464      if test "x$GREP" = x; then
13465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13466$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13468$as_echo_n "checking for GREP... " >&6; }
13469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13470$as_echo "disabled" >&6; }
13471      else
13472        # Check if the provided tool contains a complete path.
13473        tool_specified="$GREP"
13474        tool_basename="${tool_specified##*/}"
13475        if test "x$tool_basename" = "x$tool_specified"; then
13476          # A command without a complete path is provided, search $PATH.
13477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13478$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13479          # Extract the first word of "$tool_basename", so it can be a program name with args.
13480set dummy $tool_basename; ac_word=$2
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13482$as_echo_n "checking for $ac_word... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  case $GREP in
13487  [\\/]* | ?:[\\/]*)
13488  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13489  ;;
13490  *)
13491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13492for as_dir in $PATH
13493do
13494  IFS=$as_save_IFS
13495  test -z "$as_dir" && as_dir=.
13496    for ac_exec_ext in '' $ac_executable_extensions; do
13497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13498    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13500    break 2
13501  fi
13502done
13503  done
13504IFS=$as_save_IFS
13505
13506  ;;
13507esac
13508fi
13509GREP=$ac_cv_path_GREP
13510if test -n "$GREP"; then
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13512$as_echo "$GREP" >&6; }
13513else
13514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
13516fi
13517
13518
13519          if test "x$GREP" = x; then
13520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13521          fi
13522        else
13523          # Otherwise we believe it is a complete path. Use it as it is.
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13525$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13527$as_echo_n "checking for GREP... " >&6; }
13528          if test ! -x "$tool_specified"; then
13529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13530$as_echo "not found" >&6; }
13531            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13532          fi
13533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13534$as_echo "$tool_specified" >&6; }
13535        fi
13536      fi
13537    fi
13538
13539  fi
13540
13541
13542  if test "x$GREP" = x; then
13543    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13544  fi
13545
13546
13547
13548
13549  # Publish this variable in the help.
13550
13551
13552  if [ -z "${EGREP+x}" ]; then
13553    # The variable is not set by user, try to locate tool using the code snippet
13554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13555$as_echo_n "checking for egrep... " >&6; }
13556if ${ac_cv_path_EGREP+:} false; then :
13557  $as_echo_n "(cached) " >&6
13558else
13559  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13560   then ac_cv_path_EGREP="$GREP -E"
13561   else
13562     if test -z "$EGREP"; then
13563  ac_path_EGREP_found=false
13564  # Loop through the user's path and test for each of PROGNAME-LIST
13565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13566for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13567do
13568  IFS=$as_save_IFS
13569  test -z "$as_dir" && as_dir=.
13570    for ac_prog in egrep; do
13571    for ac_exec_ext in '' $ac_executable_extensions; do
13572      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13573      as_fn_executable_p "$ac_path_EGREP" || continue
13574# Check for GNU ac_path_EGREP and select it if it is found.
13575  # Check for GNU $ac_path_EGREP
13576case `"$ac_path_EGREP" --version 2>&1` in
13577*GNU*)
13578  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13579*)
13580  ac_count=0
13581  $as_echo_n 0123456789 >"conftest.in"
13582  while :
13583  do
13584    cat "conftest.in" "conftest.in" >"conftest.tmp"
13585    mv "conftest.tmp" "conftest.in"
13586    cp "conftest.in" "conftest.nl"
13587    $as_echo 'EGREP' >> "conftest.nl"
13588    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13589    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13590    as_fn_arith $ac_count + 1 && ac_count=$as_val
13591    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13592      # Best one so far, save it but keep looking for a better one
13593      ac_cv_path_EGREP="$ac_path_EGREP"
13594      ac_path_EGREP_max=$ac_count
13595    fi
13596    # 10*(2^10) chars as input seems more than enough
13597    test $ac_count -gt 10 && break
13598  done
13599  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13600esac
13601
13602      $ac_path_EGREP_found && break 3
13603    done
13604  done
13605  done
13606IFS=$as_save_IFS
13607  if test -z "$ac_cv_path_EGREP"; then
13608    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13609  fi
13610else
13611  ac_cv_path_EGREP=$EGREP
13612fi
13613
13614   fi
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13617$as_echo "$ac_cv_path_EGREP" >&6; }
13618 EGREP="$ac_cv_path_EGREP"
13619
13620
13621  else
13622    # The variable is set, but is it from the command line or the environment?
13623
13624    # Try to remove the string !EGREP! from our list.
13625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13627      # If it failed, the variable was not from the command line. Ignore it,
13628      # but warn the user (except for BASH, which is always set by the calling BASH).
13629      if test "xEGREP" != xBASH; then
13630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13631$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13632      fi
13633      # Try to locate tool using the code snippet
13634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13635$as_echo_n "checking for egrep... " >&6; }
13636if ${ac_cv_path_EGREP+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13640   then ac_cv_path_EGREP="$GREP -E"
13641   else
13642     if test -z "$EGREP"; then
13643  ac_path_EGREP_found=false
13644  # Loop through the user's path and test for each of PROGNAME-LIST
13645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13647do
13648  IFS=$as_save_IFS
13649  test -z "$as_dir" && as_dir=.
13650    for ac_prog in egrep; do
13651    for ac_exec_ext in '' $ac_executable_extensions; do
13652      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13653      as_fn_executable_p "$ac_path_EGREP" || continue
13654# Check for GNU ac_path_EGREP and select it if it is found.
13655  # Check for GNU $ac_path_EGREP
13656case `"$ac_path_EGREP" --version 2>&1` in
13657*GNU*)
13658  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13659*)
13660  ac_count=0
13661  $as_echo_n 0123456789 >"conftest.in"
13662  while :
13663  do
13664    cat "conftest.in" "conftest.in" >"conftest.tmp"
13665    mv "conftest.tmp" "conftest.in"
13666    cp "conftest.in" "conftest.nl"
13667    $as_echo 'EGREP' >> "conftest.nl"
13668    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13670    as_fn_arith $ac_count + 1 && ac_count=$as_val
13671    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13672      # Best one so far, save it but keep looking for a better one
13673      ac_cv_path_EGREP="$ac_path_EGREP"
13674      ac_path_EGREP_max=$ac_count
13675    fi
13676    # 10*(2^10) chars as input seems more than enough
13677    test $ac_count -gt 10 && break
13678  done
13679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13680esac
13681
13682      $ac_path_EGREP_found && break 3
13683    done
13684  done
13685  done
13686IFS=$as_save_IFS
13687  if test -z "$ac_cv_path_EGREP"; then
13688    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13689  fi
13690else
13691  ac_cv_path_EGREP=$EGREP
13692fi
13693
13694   fi
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13697$as_echo "$ac_cv_path_EGREP" >&6; }
13698 EGREP="$ac_cv_path_EGREP"
13699
13700
13701    else
13702      # If it succeeded, then it was overridden by the user. We will use it
13703      # for the tool.
13704
13705      # First remove it from the list of overridden variables, so we can test
13706      # for unknown variables in the end.
13707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13708
13709      # Check if we try to supply an empty value
13710      if test "x$EGREP" = x; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13712$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13714$as_echo_n "checking for EGREP... " >&6; }
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13716$as_echo "disabled" >&6; }
13717      else
13718        # Check if the provided tool contains a complete path.
13719        tool_specified="$EGREP"
13720        tool_basename="${tool_specified##*/}"
13721        if test "x$tool_basename" = "x$tool_specified"; then
13722          # A command without a complete path is provided, search $PATH.
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13724$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13725          # Extract the first word of "$tool_basename", so it can be a program name with args.
13726set dummy $tool_basename; ac_word=$2
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13728$as_echo_n "checking for $ac_word... " >&6; }
13729if ${ac_cv_path_EGREP+:} false; then :
13730  $as_echo_n "(cached) " >&6
13731else
13732  case $EGREP in
13733  [\\/]* | ?:[\\/]*)
13734  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13735  ;;
13736  *)
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_exec_ext in '' $ac_executable_extensions; do
13743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13744    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13746    break 2
13747  fi
13748done
13749  done
13750IFS=$as_save_IFS
13751
13752  ;;
13753esac
13754fi
13755EGREP=$ac_cv_path_EGREP
13756if test -n "$EGREP"; then
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13758$as_echo "$EGREP" >&6; }
13759else
13760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13761$as_echo "no" >&6; }
13762fi
13763
13764
13765          if test "x$EGREP" = x; then
13766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13767          fi
13768        else
13769          # Otherwise we believe it is a complete path. Use it as it is.
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13771$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13773$as_echo_n "checking for EGREP... " >&6; }
13774          if test ! -x "$tool_specified"; then
13775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13776$as_echo "not found" >&6; }
13777            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13778          fi
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13780$as_echo "$tool_specified" >&6; }
13781        fi
13782      fi
13783    fi
13784
13785  fi
13786
13787
13788  if test "x$EGREP" = x; then
13789    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13790  fi
13791
13792
13793
13794
13795  # Publish this variable in the help.
13796
13797
13798  if [ -z "${FGREP+x}" ]; then
13799    # The variable is not set by user, try to locate tool using the code snippet
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13801$as_echo_n "checking for fgrep... " >&6; }
13802if ${ac_cv_path_FGREP+:} false; then :
13803  $as_echo_n "(cached) " >&6
13804else
13805  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13806   then ac_cv_path_FGREP="$GREP -F"
13807   else
13808     if test -z "$FGREP"; then
13809  ac_path_FGREP_found=false
13810  # Loop through the user's path and test for each of PROGNAME-LIST
13811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13812for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13813do
13814  IFS=$as_save_IFS
13815  test -z "$as_dir" && as_dir=.
13816    for ac_prog in fgrep; do
13817    for ac_exec_ext in '' $ac_executable_extensions; do
13818      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13819      as_fn_executable_p "$ac_path_FGREP" || continue
13820# Check for GNU ac_path_FGREP and select it if it is found.
13821  # Check for GNU $ac_path_FGREP
13822case `"$ac_path_FGREP" --version 2>&1` in
13823*GNU*)
13824  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13825*)
13826  ac_count=0
13827  $as_echo_n 0123456789 >"conftest.in"
13828  while :
13829  do
13830    cat "conftest.in" "conftest.in" >"conftest.tmp"
13831    mv "conftest.tmp" "conftest.in"
13832    cp "conftest.in" "conftest.nl"
13833    $as_echo 'FGREP' >> "conftest.nl"
13834    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13836    as_fn_arith $ac_count + 1 && ac_count=$as_val
13837    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13838      # Best one so far, save it but keep looking for a better one
13839      ac_cv_path_FGREP="$ac_path_FGREP"
13840      ac_path_FGREP_max=$ac_count
13841    fi
13842    # 10*(2^10) chars as input seems more than enough
13843    test $ac_count -gt 10 && break
13844  done
13845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13846esac
13847
13848      $ac_path_FGREP_found && break 3
13849    done
13850  done
13851  done
13852IFS=$as_save_IFS
13853  if test -z "$ac_cv_path_FGREP"; then
13854    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13855  fi
13856else
13857  ac_cv_path_FGREP=$FGREP
13858fi
13859
13860   fi
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13863$as_echo "$ac_cv_path_FGREP" >&6; }
13864 FGREP="$ac_cv_path_FGREP"
13865
13866
13867  else
13868    # The variable is set, but is it from the command line or the environment?
13869
13870    # Try to remove the string !FGREP! from our list.
13871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13873      # If it failed, the variable was not from the command line. Ignore it,
13874      # but warn the user (except for BASH, which is always set by the calling BASH).
13875      if test "xFGREP" != xBASH; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13877$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13878      fi
13879      # Try to locate tool using the code snippet
13880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13881$as_echo_n "checking for fgrep... " >&6; }
13882if ${ac_cv_path_FGREP+:} false; then :
13883  $as_echo_n "(cached) " >&6
13884else
13885  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13886   then ac_cv_path_FGREP="$GREP -F"
13887   else
13888     if test -z "$FGREP"; then
13889  ac_path_FGREP_found=false
13890  # Loop through the user's path and test for each of PROGNAME-LIST
13891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13892for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13893do
13894  IFS=$as_save_IFS
13895  test -z "$as_dir" && as_dir=.
13896    for ac_prog in fgrep; do
13897    for ac_exec_ext in '' $ac_executable_extensions; do
13898      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13899      as_fn_executable_p "$ac_path_FGREP" || continue
13900# Check for GNU ac_path_FGREP and select it if it is found.
13901  # Check for GNU $ac_path_FGREP
13902case `"$ac_path_FGREP" --version 2>&1` in
13903*GNU*)
13904  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13905*)
13906  ac_count=0
13907  $as_echo_n 0123456789 >"conftest.in"
13908  while :
13909  do
13910    cat "conftest.in" "conftest.in" >"conftest.tmp"
13911    mv "conftest.tmp" "conftest.in"
13912    cp "conftest.in" "conftest.nl"
13913    $as_echo 'FGREP' >> "conftest.nl"
13914    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13915    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13916    as_fn_arith $ac_count + 1 && ac_count=$as_val
13917    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13918      # Best one so far, save it but keep looking for a better one
13919      ac_cv_path_FGREP="$ac_path_FGREP"
13920      ac_path_FGREP_max=$ac_count
13921    fi
13922    # 10*(2^10) chars as input seems more than enough
13923    test $ac_count -gt 10 && break
13924  done
13925  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13926esac
13927
13928      $ac_path_FGREP_found && break 3
13929    done
13930  done
13931  done
13932IFS=$as_save_IFS
13933  if test -z "$ac_cv_path_FGREP"; then
13934    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13935  fi
13936else
13937  ac_cv_path_FGREP=$FGREP
13938fi
13939
13940   fi
13941fi
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13943$as_echo "$ac_cv_path_FGREP" >&6; }
13944 FGREP="$ac_cv_path_FGREP"
13945
13946
13947    else
13948      # If it succeeded, then it was overridden by the user. We will use it
13949      # for the tool.
13950
13951      # First remove it from the list of overridden variables, so we can test
13952      # for unknown variables in the end.
13953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13954
13955      # Check if we try to supply an empty value
13956      if test "x$FGREP" = x; then
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13958$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13960$as_echo_n "checking for FGREP... " >&6; }
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13962$as_echo "disabled" >&6; }
13963      else
13964        # Check if the provided tool contains a complete path.
13965        tool_specified="$FGREP"
13966        tool_basename="${tool_specified##*/}"
13967        if test "x$tool_basename" = "x$tool_specified"; then
13968          # A command without a complete path is provided, search $PATH.
13969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13970$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13971          # Extract the first word of "$tool_basename", so it can be a program name with args.
13972set dummy $tool_basename; ac_word=$2
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13974$as_echo_n "checking for $ac_word... " >&6; }
13975if ${ac_cv_path_FGREP+:} false; then :
13976  $as_echo_n "(cached) " >&6
13977else
13978  case $FGREP in
13979  [\\/]* | ?:[\\/]*)
13980  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13981  ;;
13982  *)
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_exec_ext in '' $ac_executable_extensions; do
13989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13990    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13992    break 2
13993  fi
13994done
13995  done
13996IFS=$as_save_IFS
13997
13998  ;;
13999esac
14000fi
14001FGREP=$ac_cv_path_FGREP
14002if test -n "$FGREP"; then
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14004$as_echo "$FGREP" >&6; }
14005else
14006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14007$as_echo "no" >&6; }
14008fi
14009
14010
14011          if test "x$FGREP" = x; then
14012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14013          fi
14014        else
14015          # Otherwise we believe it is a complete path. Use it as it is.
14016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14017$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14019$as_echo_n "checking for FGREP... " >&6; }
14020          if test ! -x "$tool_specified"; then
14021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14022$as_echo "not found" >&6; }
14023            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14024          fi
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14026$as_echo "$tool_specified" >&6; }
14027        fi
14028      fi
14029    fi
14030
14031  fi
14032
14033
14034  if test "x$FGREP" = x; then
14035    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14036  fi
14037
14038
14039
14040
14041  # Publish this variable in the help.
14042
14043
14044  if [ -z "${SED+x}" ]; then
14045    # The variable is not set by user, try to locate tool using the code snippet
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14047$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14048if ${ac_cv_path_SED+:} false; then :
14049  $as_echo_n "(cached) " >&6
14050else
14051            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14052     for ac_i in 1 2 3 4 5 6 7; do
14053       ac_script="$ac_script$as_nl$ac_script"
14054     done
14055     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14056     { ac_script=; unset ac_script;}
14057     if test -z "$SED"; then
14058  ac_path_SED_found=false
14059  # Loop through the user's path and test for each of PROGNAME-LIST
14060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14061for as_dir in $PATH
14062do
14063  IFS=$as_save_IFS
14064  test -z "$as_dir" && as_dir=.
14065    for ac_prog in sed gsed; do
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14068      as_fn_executable_p "$ac_path_SED" || continue
14069# Check for GNU ac_path_SED and select it if it is found.
14070  # Check for GNU $ac_path_SED
14071case `"$ac_path_SED" --version 2>&1` in
14072*GNU*)
14073  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14074*)
14075  ac_count=0
14076  $as_echo_n 0123456789 >"conftest.in"
14077  while :
14078  do
14079    cat "conftest.in" "conftest.in" >"conftest.tmp"
14080    mv "conftest.tmp" "conftest.in"
14081    cp "conftest.in" "conftest.nl"
14082    $as_echo '' >> "conftest.nl"
14083    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14084    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14085    as_fn_arith $ac_count + 1 && ac_count=$as_val
14086    if test $ac_count -gt ${ac_path_SED_max-0}; then
14087      # Best one so far, save it but keep looking for a better one
14088      ac_cv_path_SED="$ac_path_SED"
14089      ac_path_SED_max=$ac_count
14090    fi
14091    # 10*(2^10) chars as input seems more than enough
14092    test $ac_count -gt 10 && break
14093  done
14094  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14095esac
14096
14097      $ac_path_SED_found && break 3
14098    done
14099  done
14100  done
14101IFS=$as_save_IFS
14102  if test -z "$ac_cv_path_SED"; then
14103    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14104  fi
14105else
14106  ac_cv_path_SED=$SED
14107fi
14108
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14111$as_echo "$ac_cv_path_SED" >&6; }
14112 SED="$ac_cv_path_SED"
14113  rm -f conftest.sed
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !SED! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xSED" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130if ${ac_cv_path_SED+:} false; then :
14131  $as_echo_n "(cached) " >&6
14132else
14133            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134     for ac_i in 1 2 3 4 5 6 7; do
14135       ac_script="$ac_script$as_nl$ac_script"
14136     done
14137     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138     { ac_script=; unset ac_script;}
14139     if test -z "$SED"; then
14140  ac_path_SED_found=false
14141  # Loop through the user's path and test for each of PROGNAME-LIST
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_prog in sed gsed; do
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150      as_fn_executable_p "$ac_path_SED" || continue
14151# Check for GNU ac_path_SED and select it if it is found.
14152  # Check for GNU $ac_path_SED
14153case `"$ac_path_SED" --version 2>&1` in
14154*GNU*)
14155  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156*)
14157  ac_count=0
14158  $as_echo_n 0123456789 >"conftest.in"
14159  while :
14160  do
14161    cat "conftest.in" "conftest.in" >"conftest.tmp"
14162    mv "conftest.tmp" "conftest.in"
14163    cp "conftest.in" "conftest.nl"
14164    $as_echo '' >> "conftest.nl"
14165    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167    as_fn_arith $ac_count + 1 && ac_count=$as_val
14168    if test $ac_count -gt ${ac_path_SED_max-0}; then
14169      # Best one so far, save it but keep looking for a better one
14170      ac_cv_path_SED="$ac_path_SED"
14171      ac_path_SED_max=$ac_count
14172    fi
14173    # 10*(2^10) chars as input seems more than enough
14174    test $ac_count -gt 10 && break
14175  done
14176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177esac
14178
14179      $ac_path_SED_found && break 3
14180    done
14181  done
14182  done
14183IFS=$as_save_IFS
14184  if test -z "$ac_cv_path_SED"; then
14185    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186  fi
14187else
14188  ac_cv_path_SED=$SED
14189fi
14190
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193$as_echo "$ac_cv_path_SED" >&6; }
14194 SED="$ac_cv_path_SED"
14195  rm -f conftest.sed
14196
14197    else
14198      # If it succeeded, then it was overridden by the user. We will use it
14199      # for the tool.
14200
14201      # First remove it from the list of overridden variables, so we can test
14202      # for unknown variables in the end.
14203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14204
14205      # Check if we try to supply an empty value
14206      if test "x$SED" = x; then
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14208$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14210$as_echo_n "checking for SED... " >&6; }
14211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14212$as_echo "disabled" >&6; }
14213      else
14214        # Check if the provided tool contains a complete path.
14215        tool_specified="$SED"
14216        tool_basename="${tool_specified##*/}"
14217        if test "x$tool_basename" = "x$tool_specified"; then
14218          # A command without a complete path is provided, search $PATH.
14219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14220$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14221          # Extract the first word of "$tool_basename", so it can be a program name with args.
14222set dummy $tool_basename; ac_word=$2
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224$as_echo_n "checking for $ac_word... " >&6; }
14225if ${ac_cv_path_SED+:} false; then :
14226  $as_echo_n "(cached) " >&6
14227else
14228  case $SED in
14229  [\\/]* | ?:[\\/]*)
14230  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14231  ;;
14232  *)
14233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14234for as_dir in $PATH
14235do
14236  IFS=$as_save_IFS
14237  test -z "$as_dir" && as_dir=.
14238    for ac_exec_ext in '' $ac_executable_extensions; do
14239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14240    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14242    break 2
14243  fi
14244done
14245  done
14246IFS=$as_save_IFS
14247
14248  ;;
14249esac
14250fi
14251SED=$ac_cv_path_SED
14252if test -n "$SED"; then
14253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14254$as_echo "$SED" >&6; }
14255else
14256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14257$as_echo "no" >&6; }
14258fi
14259
14260
14261          if test "x$SED" = x; then
14262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14263          fi
14264        else
14265          # Otherwise we believe it is a complete path. Use it as it is.
14266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14267$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14269$as_echo_n "checking for SED... " >&6; }
14270          if test ! -x "$tool_specified"; then
14271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14272$as_echo "not found" >&6; }
14273            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14274          fi
14275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14276$as_echo "$tool_specified" >&6; }
14277        fi
14278      fi
14279    fi
14280
14281  fi
14282
14283
14284  if test "x$SED" = x; then
14285    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14286  fi
14287
14288
14289
14290  # Always force rm.
14291  RM="$RM -f"
14292
14293  # pwd behaves differently on various platforms and some don't support the -L flag.
14294  # Always use the bash builtin pwd to get uniform behavior.
14295  THEPWDCMD=pwd
14296
14297  # These are not required on all platforms
14298
14299
14300  # Publish this variable in the help.
14301
14302
14303  if [ -z "${CYGPATH+x}" ]; then
14304    # The variable is not set by user, try to locate tool using the code snippet
14305    for ac_prog in cygpath
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_CYGPATH+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $CYGPATH in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337CYGPATH=$ac_cv_path_CYGPATH
14338if test -n "$CYGPATH"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14340$as_echo "$CYGPATH" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$CYGPATH" && break
14348done
14349
14350  else
14351    # The variable is set, but is it from the command line or the environment?
14352
14353    # Try to remove the string !CYGPATH! from our list.
14354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14356      # If it failed, the variable was not from the command line. Ignore it,
14357      # but warn the user (except for BASH, which is always set by the calling BASH).
14358      if test "xCYGPATH" != xBASH; then
14359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14360$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14361      fi
14362      # Try to locate tool using the code snippet
14363      for ac_prog in cygpath
14364do
14365  # Extract the first word of "$ac_prog", so it can be a program name with args.
14366set dummy $ac_prog; ac_word=$2
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14368$as_echo_n "checking for $ac_word... " >&6; }
14369if ${ac_cv_path_CYGPATH+:} false; then :
14370  $as_echo_n "(cached) " >&6
14371else
14372  case $CYGPATH in
14373  [\\/]* | ?:[\\/]*)
14374  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14375  ;;
14376  *)
14377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14378for as_dir in $PATH
14379do
14380  IFS=$as_save_IFS
14381  test -z "$as_dir" && as_dir=.
14382    for ac_exec_ext in '' $ac_executable_extensions; do
14383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14384    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14386    break 2
14387  fi
14388done
14389  done
14390IFS=$as_save_IFS
14391
14392  ;;
14393esac
14394fi
14395CYGPATH=$ac_cv_path_CYGPATH
14396if test -n "$CYGPATH"; then
14397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14398$as_echo "$CYGPATH" >&6; }
14399else
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402fi
14403
14404
14405  test -n "$CYGPATH" && break
14406done
14407
14408    else
14409      # If it succeeded, then it was overridden by the user. We will use it
14410      # for the tool.
14411
14412      # First remove it from the list of overridden variables, so we can test
14413      # for unknown variables in the end.
14414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14415
14416      # Check if we try to supply an empty value
14417      if test "x$CYGPATH" = x; then
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14419$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14421$as_echo_n "checking for CYGPATH... " >&6; }
14422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14423$as_echo "disabled" >&6; }
14424      else
14425        # Check if the provided tool contains a complete path.
14426        tool_specified="$CYGPATH"
14427        tool_basename="${tool_specified##*/}"
14428        if test "x$tool_basename" = "x$tool_specified"; then
14429          # A command without a complete path is provided, search $PATH.
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14431$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14432          # Extract the first word of "$tool_basename", so it can be a program name with args.
14433set dummy $tool_basename; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472          if test "x$CYGPATH" = x; then
14473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14474          fi
14475        else
14476          # Otherwise we believe it is a complete path. Use it as it is.
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14478$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14480$as_echo_n "checking for CYGPATH... " >&6; }
14481          if test ! -x "$tool_specified"; then
14482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14483$as_echo "not found" >&6; }
14484            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14485          fi
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14487$as_echo "$tool_specified" >&6; }
14488        fi
14489      fi
14490    fi
14491
14492  fi
14493
14494
14495
14496
14497  # Publish this variable in the help.
14498
14499
14500  if [ -z "${READLINK+x}" ]; then
14501    # The variable is not set by user, try to locate tool using the code snippet
14502    for ac_prog in greadlink readlink
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_READLINK+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $READLINK in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534READLINK=$ac_cv_path_READLINK
14535if test -n "$READLINK"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14537$as_echo "$READLINK" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$READLINK" && break
14545done
14546
14547  else
14548    # The variable is set, but is it from the command line or the environment?
14549
14550    # Try to remove the string !READLINK! from our list.
14551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14553      # If it failed, the variable was not from the command line. Ignore it,
14554      # but warn the user (except for BASH, which is always set by the calling BASH).
14555      if test "xREADLINK" != xBASH; then
14556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14557$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14558      fi
14559      # Try to locate tool using the code snippet
14560      for ac_prog in greadlink readlink
14561do
14562  # Extract the first word of "$ac_prog", so it can be a program name with args.
14563set dummy $ac_prog; ac_word=$2
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14565$as_echo_n "checking for $ac_word... " >&6; }
14566if ${ac_cv_path_READLINK+:} false; then :
14567  $as_echo_n "(cached) " >&6
14568else
14569  case $READLINK in
14570  [\\/]* | ?:[\\/]*)
14571  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14572  ;;
14573  *)
14574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14575for as_dir in $PATH
14576do
14577  IFS=$as_save_IFS
14578  test -z "$as_dir" && as_dir=.
14579    for ac_exec_ext in '' $ac_executable_extensions; do
14580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14581    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14583    break 2
14584  fi
14585done
14586  done
14587IFS=$as_save_IFS
14588
14589  ;;
14590esac
14591fi
14592READLINK=$ac_cv_path_READLINK
14593if test -n "$READLINK"; then
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14595$as_echo "$READLINK" >&6; }
14596else
14597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14598$as_echo "no" >&6; }
14599fi
14600
14601
14602  test -n "$READLINK" && break
14603done
14604
14605    else
14606      # If it succeeded, then it was overridden by the user. We will use it
14607      # for the tool.
14608
14609      # First remove it from the list of overridden variables, so we can test
14610      # for unknown variables in the end.
14611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14612
14613      # Check if we try to supply an empty value
14614      if test "x$READLINK" = x; then
14615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14616$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14618$as_echo_n "checking for READLINK... " >&6; }
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14620$as_echo "disabled" >&6; }
14621      else
14622        # Check if the provided tool contains a complete path.
14623        tool_specified="$READLINK"
14624        tool_basename="${tool_specified##*/}"
14625        if test "x$tool_basename" = "x$tool_specified"; then
14626          # A command without a complete path is provided, search $PATH.
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14628$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14629          # Extract the first word of "$tool_basename", so it can be a program name with args.
14630set dummy $tool_basename; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669          if test "x$READLINK" = x; then
14670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14671          fi
14672        else
14673          # Otherwise we believe it is a complete path. Use it as it is.
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14675$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14677$as_echo_n "checking for READLINK... " >&6; }
14678          if test ! -x "$tool_specified"; then
14679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14680$as_echo "not found" >&6; }
14681            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14682          fi
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14684$as_echo "$tool_specified" >&6; }
14685        fi
14686      fi
14687    fi
14688
14689  fi
14690
14691
14692
14693
14694  # Publish this variable in the help.
14695
14696
14697  if [ -z "${DF+x}" ]; then
14698    # The variable is not set by user, try to locate tool using the code snippet
14699    for ac_prog in df
14700do
14701  # Extract the first word of "$ac_prog", so it can be a program name with args.
14702set dummy $ac_prog; ac_word=$2
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704$as_echo_n "checking for $ac_word... " >&6; }
14705if ${ac_cv_path_DF+:} false; then :
14706  $as_echo_n "(cached) " >&6
14707else
14708  case $DF in
14709  [\\/]* | ?:[\\/]*)
14710  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14711  ;;
14712  *)
14713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714for as_dir in $PATH
14715do
14716  IFS=$as_save_IFS
14717  test -z "$as_dir" && as_dir=.
14718    for ac_exec_ext in '' $ac_executable_extensions; do
14719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722    break 2
14723  fi
14724done
14725  done
14726IFS=$as_save_IFS
14727
14728  ;;
14729esac
14730fi
14731DF=$ac_cv_path_DF
14732if test -n "$DF"; then
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14734$as_echo "$DF" >&6; }
14735else
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14737$as_echo "no" >&6; }
14738fi
14739
14740
14741  test -n "$DF" && break
14742done
14743
14744  else
14745    # The variable is set, but is it from the command line or the environment?
14746
14747    # Try to remove the string !DF! from our list.
14748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14750      # If it failed, the variable was not from the command line. Ignore it,
14751      # but warn the user (except for BASH, which is always set by the calling BASH).
14752      if test "xDF" != xBASH; then
14753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14754$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14755      fi
14756      # Try to locate tool using the code snippet
14757      for ac_prog in df
14758do
14759  # Extract the first word of "$ac_prog", so it can be a program name with args.
14760set dummy $ac_prog; ac_word=$2
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14762$as_echo_n "checking for $ac_word... " >&6; }
14763if ${ac_cv_path_DF+:} false; then :
14764  $as_echo_n "(cached) " >&6
14765else
14766  case $DF in
14767  [\\/]* | ?:[\\/]*)
14768  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14769  ;;
14770  *)
14771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14772for as_dir in $PATH
14773do
14774  IFS=$as_save_IFS
14775  test -z "$as_dir" && as_dir=.
14776    for ac_exec_ext in '' $ac_executable_extensions; do
14777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14778    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14780    break 2
14781  fi
14782done
14783  done
14784IFS=$as_save_IFS
14785
14786  ;;
14787esac
14788fi
14789DF=$ac_cv_path_DF
14790if test -n "$DF"; then
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14792$as_echo "$DF" >&6; }
14793else
14794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795$as_echo "no" >&6; }
14796fi
14797
14798
14799  test -n "$DF" && break
14800done
14801
14802    else
14803      # If it succeeded, then it was overridden by the user. We will use it
14804      # for the tool.
14805
14806      # First remove it from the list of overridden variables, so we can test
14807      # for unknown variables in the end.
14808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14809
14810      # Check if we try to supply an empty value
14811      if test "x$DF" = x; then
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14813$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14815$as_echo_n "checking for DF... " >&6; }
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14817$as_echo "disabled" >&6; }
14818      else
14819        # Check if the provided tool contains a complete path.
14820        tool_specified="$DF"
14821        tool_basename="${tool_specified##*/}"
14822        if test "x$tool_basename" = "x$tool_specified"; then
14823          # A command without a complete path is provided, search $PATH.
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14825$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14826          # Extract the first word of "$tool_basename", so it can be a program name with args.
14827set dummy $tool_basename; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866          if test "x$DF" = x; then
14867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14868          fi
14869        else
14870          # Otherwise we believe it is a complete path. Use it as it is.
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14872$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14874$as_echo_n "checking for DF... " >&6; }
14875          if test ! -x "$tool_specified"; then
14876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14877$as_echo "not found" >&6; }
14878            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14879          fi
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14881$as_echo "$tool_specified" >&6; }
14882        fi
14883      fi
14884    fi
14885
14886  fi
14887
14888
14889
14890
14891  # Publish this variable in the help.
14892
14893
14894  if [ -z "${CPIO+x}" ]; then
14895    # The variable is not set by user, try to locate tool using the code snippet
14896    for ac_prog in cpio bsdcpio
14897do
14898  # Extract the first word of "$ac_prog", so it can be a program name with args.
14899set dummy $ac_prog; ac_word=$2
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14901$as_echo_n "checking for $ac_word... " >&6; }
14902if ${ac_cv_path_CPIO+:} false; then :
14903  $as_echo_n "(cached) " >&6
14904else
14905  case $CPIO in
14906  [\\/]* | ?:[\\/]*)
14907  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14908  ;;
14909  *)
14910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14911for as_dir in $PATH
14912do
14913  IFS=$as_save_IFS
14914  test -z "$as_dir" && as_dir=.
14915    for ac_exec_ext in '' $ac_executable_extensions; do
14916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14917    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14919    break 2
14920  fi
14921done
14922  done
14923IFS=$as_save_IFS
14924
14925  ;;
14926esac
14927fi
14928CPIO=$ac_cv_path_CPIO
14929if test -n "$CPIO"; then
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14931$as_echo "$CPIO" >&6; }
14932else
14933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
14935fi
14936
14937
14938  test -n "$CPIO" && break
14939done
14940
14941  else
14942    # The variable is set, but is it from the command line or the environment?
14943
14944    # Try to remove the string !CPIO! from our list.
14945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14947      # If it failed, the variable was not from the command line. Ignore it,
14948      # but warn the user (except for BASH, which is always set by the calling BASH).
14949      if test "xCPIO" != xBASH; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14951$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14952      fi
14953      # Try to locate tool using the code snippet
14954      for ac_prog in cpio bsdcpio
14955do
14956  # Extract the first word of "$ac_prog", so it can be a program name with args.
14957set dummy $ac_prog; ac_word=$2
14958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14959$as_echo_n "checking for $ac_word... " >&6; }
14960if ${ac_cv_path_CPIO+:} false; then :
14961  $as_echo_n "(cached) " >&6
14962else
14963  case $CPIO in
14964  [\\/]* | ?:[\\/]*)
14965  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14966  ;;
14967  *)
14968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14969for as_dir in $PATH
14970do
14971  IFS=$as_save_IFS
14972  test -z "$as_dir" && as_dir=.
14973    for ac_exec_ext in '' $ac_executable_extensions; do
14974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14975    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14977    break 2
14978  fi
14979done
14980  done
14981IFS=$as_save_IFS
14982
14983  ;;
14984esac
14985fi
14986CPIO=$ac_cv_path_CPIO
14987if test -n "$CPIO"; then
14988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14989$as_echo "$CPIO" >&6; }
14990else
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14992$as_echo "no" >&6; }
14993fi
14994
14995
14996  test -n "$CPIO" && break
14997done
14998
14999    else
15000      # If it succeeded, then it was overridden by the user. We will use it
15001      # for the tool.
15002
15003      # First remove it from the list of overridden variables, so we can test
15004      # for unknown variables in the end.
15005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15006
15007      # Check if we try to supply an empty value
15008      if test "x$CPIO" = x; then
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15010$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15012$as_echo_n "checking for CPIO... " >&6; }
15013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15014$as_echo "disabled" >&6; }
15015      else
15016        # Check if the provided tool contains a complete path.
15017        tool_specified="$CPIO"
15018        tool_basename="${tool_specified##*/}"
15019        if test "x$tool_basename" = "x$tool_specified"; then
15020          # A command without a complete path is provided, search $PATH.
15021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15022$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15023          # Extract the first word of "$tool_basename", so it can be a program name with args.
15024set dummy $tool_basename; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063          if test "x$CPIO" = x; then
15064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15065          fi
15066        else
15067          # Otherwise we believe it is a complete path. Use it as it is.
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15069$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15071$as_echo_n "checking for CPIO... " >&6; }
15072          if test ! -x "$tool_specified"; then
15073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15074$as_echo "not found" >&6; }
15075            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15076          fi
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15078$as_echo "$tool_specified" >&6; }
15079        fi
15080      fi
15081    fi
15082
15083  fi
15084
15085
15086
15087
15088  # Publish this variable in the help.
15089
15090
15091  if [ -z "${NICE+x}" ]; then
15092    # The variable is not set by user, try to locate tool using the code snippet
15093    for ac_prog in nice
15094do
15095  # Extract the first word of "$ac_prog", so it can be a program name with args.
15096set dummy $ac_prog; ac_word=$2
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15098$as_echo_n "checking for $ac_word... " >&6; }
15099if ${ac_cv_path_NICE+:} false; then :
15100  $as_echo_n "(cached) " >&6
15101else
15102  case $NICE in
15103  [\\/]* | ?:[\\/]*)
15104  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15105  ;;
15106  *)
15107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15108for as_dir in $PATH
15109do
15110  IFS=$as_save_IFS
15111  test -z "$as_dir" && as_dir=.
15112    for ac_exec_ext in '' $ac_executable_extensions; do
15113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15114    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15116    break 2
15117  fi
15118done
15119  done
15120IFS=$as_save_IFS
15121
15122  ;;
15123esac
15124fi
15125NICE=$ac_cv_path_NICE
15126if test -n "$NICE"; then
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15128$as_echo "$NICE" >&6; }
15129else
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15131$as_echo "no" >&6; }
15132fi
15133
15134
15135  test -n "$NICE" && break
15136done
15137
15138  else
15139    # The variable is set, but is it from the command line or the environment?
15140
15141    # Try to remove the string !NICE! from our list.
15142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15144      # If it failed, the variable was not from the command line. Ignore it,
15145      # but warn the user (except for BASH, which is always set by the calling BASH).
15146      if test "xNICE" != xBASH; then
15147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15148$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15149      fi
15150      # Try to locate tool using the code snippet
15151      for ac_prog in nice
15152do
15153  # Extract the first word of "$ac_prog", so it can be a program name with args.
15154set dummy $ac_prog; ac_word=$2
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15156$as_echo_n "checking for $ac_word... " >&6; }
15157if ${ac_cv_path_NICE+:} false; then :
15158  $as_echo_n "(cached) " >&6
15159else
15160  case $NICE in
15161  [\\/]* | ?:[\\/]*)
15162  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15163  ;;
15164  *)
15165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15166for as_dir in $PATH
15167do
15168  IFS=$as_save_IFS
15169  test -z "$as_dir" && as_dir=.
15170    for ac_exec_ext in '' $ac_executable_extensions; do
15171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15172    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15174    break 2
15175  fi
15176done
15177  done
15178IFS=$as_save_IFS
15179
15180  ;;
15181esac
15182fi
15183NICE=$ac_cv_path_NICE
15184if test -n "$NICE"; then
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15186$as_echo "$NICE" >&6; }
15187else
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15189$as_echo "no" >&6; }
15190fi
15191
15192
15193  test -n "$NICE" && break
15194done
15195
15196    else
15197      # If it succeeded, then it was overridden by the user. We will use it
15198      # for the tool.
15199
15200      # First remove it from the list of overridden variables, so we can test
15201      # for unknown variables in the end.
15202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15203
15204      # Check if we try to supply an empty value
15205      if test "x$NICE" = x; then
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15207$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15209$as_echo_n "checking for NICE... " >&6; }
15210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15211$as_echo "disabled" >&6; }
15212      else
15213        # Check if the provided tool contains a complete path.
15214        tool_specified="$NICE"
15215        tool_basename="${tool_specified##*/}"
15216        if test "x$tool_basename" = "x$tool_specified"; then
15217          # A command without a complete path is provided, search $PATH.
15218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15219$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15220          # Extract the first word of "$tool_basename", so it can be a program name with args.
15221set dummy $tool_basename; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260          if test "x$NICE" = x; then
15261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15262          fi
15263        else
15264          # Otherwise we believe it is a complete path. Use it as it is.
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15266$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15268$as_echo_n "checking for NICE... " >&6; }
15269          if test ! -x "$tool_specified"; then
15270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15273          fi
15274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15275$as_echo "$tool_specified" >&6; }
15276        fi
15277      fi
15278    fi
15279
15280  fi
15281
15282
15283
15284
15285# Now we can determine OpenJDK build and target platforms. This is required to
15286# have early on.
15287# Make sure we can run config.sub.
15288$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15289  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15290
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15292$as_echo_n "checking build system type... " >&6; }
15293if ${ac_cv_build+:} false; then :
15294  $as_echo_n "(cached) " >&6
15295else
15296  ac_build_alias=$build_alias
15297test "x$ac_build_alias" = x &&
15298  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15299test "x$ac_build_alias" = x &&
15300  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15301ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15302  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15303
15304fi
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15306$as_echo "$ac_cv_build" >&6; }
15307case $ac_cv_build in
15308*-*-*) ;;
15309*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15310esac
15311build=$ac_cv_build
15312ac_save_IFS=$IFS; IFS='-'
15313set x $ac_cv_build
15314shift
15315build_cpu=$1
15316build_vendor=$2
15317shift; shift
15318# Remember, the first character of IFS is used to create $*,
15319# except with old shells:
15320build_os=$*
15321IFS=$ac_save_IFS
15322case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15323
15324
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15326$as_echo_n "checking host system type... " >&6; }
15327if ${ac_cv_host+:} false; then :
15328  $as_echo_n "(cached) " >&6
15329else
15330  if test "x$host_alias" = x; then
15331  ac_cv_host=$ac_cv_build
15332else
15333  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15334    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15335fi
15336
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15339$as_echo "$ac_cv_host" >&6; }
15340case $ac_cv_host in
15341*-*-*) ;;
15342*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15343esac
15344host=$ac_cv_host
15345ac_save_IFS=$IFS; IFS='-'
15346set x $ac_cv_host
15347shift
15348host_cpu=$1
15349host_vendor=$2
15350shift; shift
15351# Remember, the first character of IFS is used to create $*,
15352# except with old shells:
15353host_os=$*
15354IFS=$ac_save_IFS
15355case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15356
15357
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15359$as_echo_n "checking target system type... " >&6; }
15360if ${ac_cv_target+:} false; then :
15361  $as_echo_n "(cached) " >&6
15362else
15363  if test "x$target_alias" = x; then
15364  ac_cv_target=$ac_cv_host
15365else
15366  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15368fi
15369
15370fi
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15372$as_echo "$ac_cv_target" >&6; }
15373case $ac_cv_target in
15374*-*-*) ;;
15375*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15376esac
15377target=$ac_cv_target
15378ac_save_IFS=$IFS; IFS='-'
15379set x $ac_cv_target
15380shift
15381target_cpu=$1
15382target_vendor=$2
15383shift; shift
15384# Remember, the first character of IFS is used to create $*,
15385# except with old shells:
15386target_os=$*
15387IFS=$ac_save_IFS
15388case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15389
15390
15391# The aliases save the names the user supplied, while $host etc.
15392# will get canonicalized.
15393test -n "$target_alias" &&
15394  test "$program_prefix$program_suffix$program_transform_name" = \
15395    NONENONEs,x,x, &&
15396  program_prefix=${target_alias}-
15397
15398  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15399  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15400  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15401  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15402  # to use the configure naming style.
15403
15404
15405
15406
15407
15408  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15409  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15410  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15411  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15412  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15413  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15414
15415
15416
15417  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15418
15419  case "$build_os" in
15420    *linux*)
15421      VAR_OS=linux
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *solaris*)
15425      VAR_OS=solaris
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *darwin*)
15429      VAR_OS=macosx
15430      VAR_OS_TYPE=unix
15431      ;;
15432    *bsd*)
15433      VAR_OS=bsd
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *cygwin*)
15437      VAR_OS=windows
15438      VAR_OS_ENV=windows.cygwin
15439      ;;
15440    *mingw*)
15441      VAR_OS=windows
15442      VAR_OS_ENV=windows.msys
15443      ;;
15444    *aix*)
15445      VAR_OS=aix
15446      VAR_OS_TYPE=unix
15447      ;;
15448    *)
15449      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15450      ;;
15451  esac
15452
15453
15454  # First argument is the cpu name from the trip/quad
15455  case "$build_cpu" in
15456    x86_64)
15457      VAR_CPU=x86_64
15458      VAR_CPU_ARCH=x86
15459      VAR_CPU_BITS=64
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    i?86)
15463      VAR_CPU=x86
15464      VAR_CPU_ARCH=x86
15465      VAR_CPU_BITS=32
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    arm*)
15469      VAR_CPU=arm
15470      VAR_CPU_ARCH=arm
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=little
15473      ;;
15474    aarch64)
15475      VAR_CPU=aarch64
15476      VAR_CPU_ARCH=aarch64
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=little
15479      ;;
15480    powerpc)
15481      VAR_CPU=ppc
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=32
15484      VAR_CPU_ENDIAN=big
15485      ;;
15486    powerpc64)
15487      VAR_CPU=ppc64
15488      VAR_CPU_ARCH=ppc
15489      VAR_CPU_BITS=64
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    powerpc64le)
15493      VAR_CPU=ppc64le
15494      VAR_CPU_ARCH=ppc
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=little
15497      ;;
15498    s390)
15499      VAR_CPU=s390
15500      VAR_CPU_ARCH=s390
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    s390x)
15505      VAR_CPU=s390x
15506      VAR_CPU_ARCH=s390
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    sparc)
15511      VAR_CPU=sparc
15512      VAR_CPU_ARCH=sparc
15513      VAR_CPU_BITS=32
15514      VAR_CPU_ENDIAN=big
15515      ;;
15516    sparcv9|sparc64)
15517      VAR_CPU=sparcv9
15518      VAR_CPU_ARCH=sparc
15519      VAR_CPU_BITS=64
15520      VAR_CPU_ENDIAN=big
15521      ;;
15522    *)
15523      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15524      ;;
15525  esac
15526
15527  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15528  OPENJDK_BUILD_OS="$VAR_OS"
15529  if test "x$VAR_OS_TYPE" != x; then
15530    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15531  else
15532    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15533  fi
15534  if test "x$VAR_OS_ENV" != x; then
15535    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15536  else
15537    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15538  fi
15539  OPENJDK_BUILD_CPU="$VAR_CPU"
15540  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15541  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15542  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15543
15544
15545
15546
15547
15548
15549
15550
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15552$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15554$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15555
15556  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15557
15558  case "$host_os" in
15559    *linux*)
15560      VAR_OS=linux
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *solaris*)
15564      VAR_OS=solaris
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *darwin*)
15568      VAR_OS=macosx
15569      VAR_OS_TYPE=unix
15570      ;;
15571    *bsd*)
15572      VAR_OS=bsd
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *cygwin*)
15576      VAR_OS=windows
15577      VAR_OS_ENV=windows.cygwin
15578      ;;
15579    *mingw*)
15580      VAR_OS=windows
15581      VAR_OS_ENV=windows.msys
15582      ;;
15583    *aix*)
15584      VAR_OS=aix
15585      VAR_OS_TYPE=unix
15586      ;;
15587    *)
15588      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15589      ;;
15590  esac
15591
15592
15593  # First argument is the cpu name from the trip/quad
15594  case "$host_cpu" in
15595    x86_64)
15596      VAR_CPU=x86_64
15597      VAR_CPU_ARCH=x86
15598      VAR_CPU_BITS=64
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    i?86)
15602      VAR_CPU=x86
15603      VAR_CPU_ARCH=x86
15604      VAR_CPU_BITS=32
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    arm*)
15608      VAR_CPU=arm
15609      VAR_CPU_ARCH=arm
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=little
15612      ;;
15613    aarch64)
15614      VAR_CPU=aarch64
15615      VAR_CPU_ARCH=aarch64
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=little
15618      ;;
15619    powerpc)
15620      VAR_CPU=ppc
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=32
15623      VAR_CPU_ENDIAN=big
15624      ;;
15625    powerpc64)
15626      VAR_CPU=ppc64
15627      VAR_CPU_ARCH=ppc
15628      VAR_CPU_BITS=64
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    powerpc64le)
15632      VAR_CPU=ppc64le
15633      VAR_CPU_ARCH=ppc
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=little
15636      ;;
15637    s390)
15638      VAR_CPU=s390
15639      VAR_CPU_ARCH=s390
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    s390x)
15644      VAR_CPU=s390x
15645      VAR_CPU_ARCH=s390
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    sparc)
15650      VAR_CPU=sparc
15651      VAR_CPU_ARCH=sparc
15652      VAR_CPU_BITS=32
15653      VAR_CPU_ENDIAN=big
15654      ;;
15655    sparcv9|sparc64)
15656      VAR_CPU=sparcv9
15657      VAR_CPU_ARCH=sparc
15658      VAR_CPU_BITS=64
15659      VAR_CPU_ENDIAN=big
15660      ;;
15661    *)
15662      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15663      ;;
15664  esac
15665
15666  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15667  OPENJDK_TARGET_OS="$VAR_OS"
15668  if test "x$VAR_OS_TYPE" != x; then
15669    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15670  else
15671    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15672  fi
15673  if test "x$VAR_OS_ENV" != x; then
15674    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15675  else
15676    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15677  fi
15678  OPENJDK_TARGET_CPU="$VAR_CPU"
15679  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15680  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15681  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15682
15683
15684
15685
15686
15687
15688
15689
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15691$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15693$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15694
15695
15696
15697# Check whether --with-target-bits was given.
15698if test "${with_target_bits+set}" = set; then :
15699  withval=$with_target_bits;
15700fi
15701
15702
15703  # We have three types of compiles:
15704  # native  == normal compilation, target system == build system
15705  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15706  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15707  #
15708  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15709    # We're doing a proper cross-compilation
15710    COMPILE_TYPE="cross"
15711  else
15712    COMPILE_TYPE="native"
15713  fi
15714
15715  if test "x$with_target_bits" != x; then
15716    if test "x$COMPILE_TYPE" = "xcross"; then
15717      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15718    fi
15719
15720    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15721      # A reduced build is requested
15722      COMPILE_TYPE="reduced"
15723      OPENJDK_TARGET_CPU_BITS=32
15724      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15725        OPENJDK_TARGET_CPU=x86
15726      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15727        OPENJDK_TARGET_CPU=sparc
15728      else
15729        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15730      fi
15731    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15732      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
15733    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15734      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15735$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15736    else
15737      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15738    fi
15739  fi
15740
15741
15742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15743$as_echo_n "checking compilation type... " >&6; }
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15745$as_echo "$COMPILE_TYPE" >&6; }
15746
15747
15748  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15749    REQUIRED_OS_NAME=SunOS
15750    REQUIRED_OS_VERSION=5.10
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15753    REQUIRED_OS_NAME=Linux
15754    REQUIRED_OS_VERSION=2.6
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15757    REQUIRED_OS_NAME=Windows
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15759      REQUIRED_OS_VERSION=5.2
15760    else
15761      REQUIRED_OS_VERSION=5.1
15762    fi
15763  fi
15764  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15765    REQUIRED_OS_NAME=Darwin
15766    REQUIRED_OS_VERSION=11.2
15767  fi
15768  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15769    REQUIRED_OS_NAME=AIX
15770    REQUIRED_OS_VERSION=7.1
15771  fi
15772
15773
15774
15775
15776
15777
15778  # Also store the legacy naming of the cpu.
15779  # Ie i586 and amd64 instead of x86 and x86_64
15780  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15781  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15782    OPENJDK_TARGET_CPU_LEGACY="i586"
15783  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15784    # On all platforms except MacOSX replace x86_64 with amd64.
15785    OPENJDK_TARGET_CPU_LEGACY="amd64"
15786  fi
15787
15788
15789  # And the second legacy naming of the cpu.
15790  # Ie i386 and amd64 instead of x86 and x86_64.
15791  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15792  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15793    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15794  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15795    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15796  fi
15797
15798
15799  # This is the name of the cpu (but using i386 and amd64 instead of
15800  # x86 and x86_64, respectively), preceeded by a /, to be used when
15801  # locating libraries. On macosx, it's empty, though.
15802  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15804    OPENJDK_TARGET_CPU_LIBDIR=""
15805  fi
15806
15807
15808  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15809  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15810  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15811  OPENJDK_TARGET_CPU_ISADIR=""
15812  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15813    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15814      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15815    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15816      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15817    fi
15818  fi
15819
15820
15821  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15822  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    # On linux only, we replace x86 with i386.
15825    OPENJDK_TARGET_CPU_OSARCH="i386"
15826  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15827    # On all platforms except macosx, we replace x86_64 with amd64.
15828    OPENJDK_TARGET_CPU_OSARCH="amd64"
15829  fi
15830
15831
15832  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15833  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15834    OPENJDK_TARGET_CPU_JLI="i386"
15835  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15836    # On all platforms except macosx, we replace x86_64 with amd64.
15837    OPENJDK_TARGET_CPU_JLI="amd64"
15838  fi
15839  # Now setup the -D flags for building libjli.
15840  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15841  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15842    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15843      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15844    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15845      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15846    fi
15847  fi
15848
15849
15850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15851      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15852  else
15853      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15854  fi
15855
15856
15857  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15858  # Macosx is osx and x86_64 is x64
15859  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15860    OPENJDK_TARGET_OS_BUNDLE="osx"
15861  else
15862    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15863  fi
15864  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865    OPENJDK_TARGET_CPU_BUNDLE="x64"
15866  else
15867    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15868  fi
15869  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15870
15871
15872
15873
15874  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15875    A_LP64="LP64:="
15876    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15877    # unpack200.exe
15878    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15879      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15880    fi
15881  fi
15882  LP64=$A_LP64
15883
15884
15885  if test "x$COMPILE_TYPE" = "xcross"; then
15886    # FIXME: ... or should this include reduced builds..?
15887    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15888  else
15889    DEFINE_CROSS_COMPILE_ARCH=""
15890  fi
15891
15892
15893  # Convert openjdk platform names to hotspot names
15894
15895  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15897    HOTSPOT_TARGET_OS=bsd
15898  fi
15899
15900
15901  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15902  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15903    HOTSPOT_TARGET_OS_TYPE=posix
15904  fi
15905
15906
15907  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15909    HOTSPOT_TARGET_CPU=x86_32
15910  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15911    HOTSPOT_TARGET_CPU=sparc
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15913    HOTSPOT_TARGET_CPU=ppc_64
15914  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15915    HOTSPOT_TARGET_CPU=ppc_64
15916  fi
15917
15918
15919  # This is identical with OPENJDK_*, but define anyway for consistency.
15920  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15921
15922
15923  # Setup HOTSPOT_TARGET_CPU_DEFINE
15924  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15925    HOTSPOT_TARGET_CPU_DEFINE=IA32
15926  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15927    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15928  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15929    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15930  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15931    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15934  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15935    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15936
15937  # The cpu defines below are for zero, we don't support them directly.
15938  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15939    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15940  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15941    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15942  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15943    HOTSPOT_TARGET_CPU_DEFINE=S390
15944  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15945    HOTSPOT_TARGET_CPU_DEFINE=S390
15946  fi
15947
15948
15949
15950
15951  # Also store the legacy naming of the cpu.
15952  # Ie i586 and amd64 instead of x86 and x86_64
15953  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15954  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15955    OPENJDK_BUILD_CPU_LEGACY="i586"
15956  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15957    # On all platforms except MacOSX replace x86_64 with amd64.
15958    OPENJDK_BUILD_CPU_LEGACY="amd64"
15959  fi
15960
15961
15962  # And the second legacy naming of the cpu.
15963  # Ie i386 and amd64 instead of x86 and x86_64.
15964  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15967  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15969  fi
15970
15971
15972  # This is the name of the cpu (but using i386 and amd64 instead of
15973  # x86 and x86_64, respectively), preceeded by a /, to be used when
15974  # locating libraries. On macosx, it's empty, though.
15975  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15976  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15977    OPENJDK_BUILD_CPU_LIBDIR=""
15978  fi
15979
15980
15981  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15982  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15983  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15984  OPENJDK_BUILD_CPU_ISADIR=""
15985  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15986    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15988    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15989      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15990    fi
15991  fi
15992
15993
15994  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15995  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    # On linux only, we replace x86 with i386.
15998    OPENJDK_BUILD_CPU_OSARCH="i386"
15999  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16000    # On all platforms except macosx, we replace x86_64 with amd64.
16001    OPENJDK_BUILD_CPU_OSARCH="amd64"
16002  fi
16003
16004
16005  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16006  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007    OPENJDK_BUILD_CPU_JLI="i386"
16008  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009    # On all platforms except macosx, we replace x86_64 with amd64.
16010    OPENJDK_BUILD_CPU_JLI="amd64"
16011  fi
16012  # Now setup the -D flags for building libjli.
16013  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16014  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16015    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16017    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16018      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16019    fi
16020  fi
16021
16022
16023  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16024      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16025  else
16026      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16027  fi
16028
16029
16030  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16031  # Macosx is osx and x86_64 is x64
16032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16033    OPENJDK_BUILD_OS_BUNDLE="osx"
16034  else
16035    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16036  fi
16037  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16038    OPENJDK_BUILD_CPU_BUNDLE="x64"
16039  else
16040    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16041  fi
16042  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16043
16044
16045
16046
16047  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16048    A_LP64="LP64:="
16049    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16050    # unpack200.exe
16051    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16052      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16053    fi
16054  fi
16055  LP64=$A_LP64
16056
16057
16058  if test "x$COMPILE_TYPE" = "xcross"; then
16059    # FIXME: ... or should this include reduced builds..?
16060    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16061  else
16062    DEFINE_CROSS_COMPILE_ARCH=""
16063  fi
16064
16065
16066  # Convert openjdk platform names to hotspot names
16067
16068  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16069  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070    HOTSPOT_BUILD_OS=bsd
16071  fi
16072
16073
16074  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16075  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16076    HOTSPOT_BUILD_OS_TYPE=posix
16077  fi
16078
16079
16080  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16081  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16082    HOTSPOT_BUILD_CPU=x86_32
16083  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16084    HOTSPOT_BUILD_CPU=sparc
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16088    HOTSPOT_BUILD_CPU=ppc_64
16089  fi
16090
16091
16092  # This is identical with OPENJDK_*, but define anyway for consistency.
16093  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16094
16095
16096  # Setup HOTSPOT_BUILD_CPU_DEFINE
16097  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16098    HOTSPOT_BUILD_CPU_DEFINE=IA32
16099  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16109
16110  # The cpu defines below are for zero, we don't support them directly.
16111  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16118    HOTSPOT_BUILD_CPU_DEFINE=S390
16119  fi
16120
16121
16122
16123
16124  # ZERO_ARCHDEF is used to enable architecture-specific code.
16125  # This is used in legacy hotspot build.
16126  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16127
16128
16129
16130
16131
16132# Continue setting up basic stuff. Most remaining code require fundamental tools.
16133
16134  # Save the current directory this script was started from
16135  CURDIR="$PWD"
16136
16137  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16138  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16139  # was not available at that time.
16140  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16141  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16142    ORIGINAL_PATH="$REWRITTEN_PATH"
16143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16144$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16145  fi
16146
16147  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16148    PATH_SEP=";"
16149
16150  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16151  if test $SRC_ROOT_LENGTH -gt 100; then
16152    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16153  fi
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16157$as_echo_n "checking cygwin release... " >&6; }
16158    CYGWIN_VERSION=`$UNAME -r`
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16160$as_echo "$CYGWIN_VERSION" >&6; }
16161    WINDOWS_ENV_VENDOR='cygwin'
16162    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16163
16164    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16165    if test "x$CYGWIN_VERSION_OLD" != x; then
16166      { $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
16167$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;}
16168      as_fn_error $? "Cannot continue" "$LINENO" 5
16169    fi
16170    if test "x$CYGPATH" = x; then
16171      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16174$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16175    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16176    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16177    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16178    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16180$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16181    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16182    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16183    if test "x$test_cygdrive_prefix" = x; then
16184      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16185    fi
16186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16188$as_echo_n "checking msys release... " >&6; }
16189    MSYS_VERSION=`$UNAME -r`
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16191$as_echo "$MSYS_VERSION" >&6; }
16192
16193    WINDOWS_ENV_VENDOR='msys'
16194    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16195
16196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16197$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16198    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16199    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16200
16201  windows_path="$MSYS_ROOT_PATH"
16202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16203    unix_path=`$CYGPATH -u "$windows_path"`
16204    MSYS_ROOT_PATH="$unix_path"
16205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16207    MSYS_ROOT_PATH="$unix_path"
16208  fi
16209
16210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16211$as_echo "$MSYS_ROOT_PATH" >&6; }
16212    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16213  else
16214    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16215  fi
16216
16217  # Test if windows or unix (cygwin/msys) find is first in path.
16218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16219$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16220  FIND_BINARY_OUTPUT=`find --version 2>&1`
16221  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16223$as_echo "unix style" >&6; }
16224  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16226$as_echo "Windows" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16228$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16229    { $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
16230$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16231    as_fn_error $? "Cannot continue" "$LINENO" 5
16232  else
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16234$as_echo "unknown" >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16236$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16237  fi
16238
16239  else
16240    PATH_SEP=":"
16241  fi
16242
16243
16244  # We get the top-level directory from the supporting wrappers.
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16246$as_echo_n "checking for top-level directory... " >&6; }
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16248$as_echo "$TOPDIR" >&6; }
16249
16250
16251  # Save the original version of TOPDIR for string comparisons
16252  ORIGINAL_TOPDIR="$TOPDIR"
16253
16254
16255  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16256
16257  # Only process if variable expands to non-empty
16258
16259  if test "x$CURDIR" != x; then
16260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261
16262  # Input might be given as Windows format, start by converting to
16263  # unix format.
16264  path="$CURDIR"
16265  new_path=`$CYGPATH -u "$path"`
16266
16267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16270  # "foo.exe" is OK but "foo" is an error.
16271  #
16272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16273  # It is also a way to make sure we got the proper file name for the real test later on.
16274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16275  if test "x$test_shortpath" = x; then
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16277$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16278    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16279  fi
16280
16281  # Call helper function which possibly converts this using DOS-style short mode.
16282  # If so, the updated path is stored in $new_path.
16283
16284  input_path="$new_path"
16285  # Check if we need to convert this using DOS-style short mode. If the path
16286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16287  # take no chances and rewrite it.
16288  # Note: m4 eats our [], so we need to use [ and ] instead.
16289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16290  if test "x$has_forbidden_chars" != x; then
16291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16295      # Going to short mode and back again did indeed matter. Since short mode is
16296      # case insensitive, let's make it lowercase to improve readability.
16297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298      # Now convert it back to Unix-style (cygpath)
16299      input_path=`$CYGPATH -u "$shortmode_path"`
16300      new_path="$input_path"
16301    fi
16302  fi
16303
16304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16305  if test "x$test_cygdrive_prefix" = x; then
16306    # As a simple fix, exclude /usr/bin since it's not a real path.
16307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16309      # a path prefixed by /cygdrive for fixpath to work.
16310      new_path="$CYGWIN_ROOT_PATH$input_path"
16311    fi
16312  fi
16313
16314
16315  if test "x$path" != "x$new_path"; then
16316    CURDIR="$new_path"
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16318$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16319  fi
16320
16321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322
16323  path="$CURDIR"
16324  has_colon=`$ECHO $path | $GREP ^.:`
16325  new_path="$path"
16326  if test "x$has_colon" = x; then
16327    # Not in mixed or Windows style, start by that.
16328    new_path=`cmd //c echo $path`
16329  fi
16330
16331
16332  input_path="$new_path"
16333  # Check if we need to convert this using DOS-style short mode. If the path
16334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16335  # take no chances and rewrite it.
16336  # Note: m4 eats our [], so we need to use [ and ] instead.
16337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16338  if test "x$has_forbidden_chars" != x; then
16339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16341  fi
16342
16343
16344  windows_path="$new_path"
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    unix_path=`$CYGPATH -u "$windows_path"`
16347    new_path="$unix_path"
16348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16350    new_path="$unix_path"
16351  fi
16352
16353  if test "x$path" != "x$new_path"; then
16354    CURDIR="$new_path"
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16356$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16357  fi
16358
16359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16361
16362    else
16363      # We're on a unix platform. Hooray! :)
16364      path="$CURDIR"
16365      has_space=`$ECHO "$path" | $GREP " "`
16366      if test "x$has_space" != x; then
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16370      fi
16371
16372      # Use eval to expand a potential ~
16373      eval path="$path"
16374      if test ! -f "$path" && test ! -d "$path"; then
16375        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16376      fi
16377
16378      if test -d "$path"; then
16379        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16380      else
16381        dir="`$DIRNAME "$path"`"
16382        base="`$BASENAME "$path"`"
16383        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16384      fi
16385    fi
16386  fi
16387
16388
16389  # Only process if variable expands to non-empty
16390
16391  if test "x$TOPDIR" != x; then
16392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393
16394  # Input might be given as Windows format, start by converting to
16395  # unix format.
16396  path="$TOPDIR"
16397  new_path=`$CYGPATH -u "$path"`
16398
16399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16402  # "foo.exe" is OK but "foo" is an error.
16403  #
16404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16405  # It is also a way to make sure we got the proper file name for the real test later on.
16406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16407  if test "x$test_shortpath" = x; then
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16409$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16410    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16411  fi
16412
16413  # Call helper function which possibly converts this using DOS-style short mode.
16414  # If so, the updated path is stored in $new_path.
16415
16416  input_path="$new_path"
16417  # Check if we need to convert this using DOS-style short mode. If the path
16418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419  # take no chances and rewrite it.
16420  # Note: m4 eats our [], so we need to use [ and ] instead.
16421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16422  if test "x$has_forbidden_chars" != x; then
16423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16427      # Going to short mode and back again did indeed matter. Since short mode is
16428      # case insensitive, let's make it lowercase to improve readability.
16429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16430      # Now convert it back to Unix-style (cygpath)
16431      input_path=`$CYGPATH -u "$shortmode_path"`
16432      new_path="$input_path"
16433    fi
16434  fi
16435
16436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16437  if test "x$test_cygdrive_prefix" = x; then
16438    # As a simple fix, exclude /usr/bin since it's not a real path.
16439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16441      # a path prefixed by /cygdrive for fixpath to work.
16442      new_path="$CYGWIN_ROOT_PATH$input_path"
16443    fi
16444  fi
16445
16446
16447  if test "x$path" != "x$new_path"; then
16448    TOPDIR="$new_path"
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16450$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16451  fi
16452
16453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454
16455  path="$TOPDIR"
16456  has_colon=`$ECHO $path | $GREP ^.:`
16457  new_path="$path"
16458  if test "x$has_colon" = x; then
16459    # Not in mixed or Windows style, start by that.
16460    new_path=`cmd //c echo $path`
16461  fi
16462
16463
16464  input_path="$new_path"
16465  # Check if we need to convert this using DOS-style short mode. If the path
16466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16467  # take no chances and rewrite it.
16468  # Note: m4 eats our [], so we need to use [ and ] instead.
16469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16470  if test "x$has_forbidden_chars" != x; then
16471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16473  fi
16474
16475
16476  windows_path="$new_path"
16477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478    unix_path=`$CYGPATH -u "$windows_path"`
16479    new_path="$unix_path"
16480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16482    new_path="$unix_path"
16483  fi
16484
16485  if test "x$path" != "x$new_path"; then
16486    TOPDIR="$new_path"
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16488$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16489  fi
16490
16491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16493
16494    else
16495      # We're on a unix platform. Hooray! :)
16496      path="$TOPDIR"
16497      has_space=`$ECHO "$path" | $GREP " "`
16498      if test "x$has_space" != x; then
16499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16500$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16502      fi
16503
16504      # Use eval to expand a potential ~
16505      eval path="$path"
16506      if test ! -f "$path" && test ! -d "$path"; then
16507        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16508      fi
16509
16510      if test -d "$path"; then
16511        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16512      else
16513        dir="`$DIRNAME "$path"`"
16514        base="`$BASENAME "$path"`"
16515        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16516      fi
16517    fi
16518  fi
16519
16520  # SRC_ROOT is a traditional alias for TOPDIR.
16521  SRC_ROOT=$TOPDIR
16522
16523  # Calculate a canonical version of TOPDIR for string comparisons
16524  CANONICAL_TOPDIR=$TOPDIR
16525
16526  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16527    # Follow a chain of symbolic links. Use readlink
16528    # where it exists, else fall back to horribly
16529    # complicated shell code.
16530    if test "x$READLINK_TESTED" != yes; then
16531      # On MacOSX there is a readlink tool with a different
16532      # purpose than the GNU readlink tool. Check the found readlink.
16533      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16534      if test "x$ISGNU" = x; then
16535        # A readlink that we do not know how to use.
16536        # Are there other non-GNU readlinks out there?
16537        READLINK_TESTED=yes
16538        READLINK=
16539      fi
16540    fi
16541
16542    if test "x$READLINK" != x; then
16543      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16544    else
16545      # Save the current directory for restoring afterwards
16546      STARTDIR=$PWD
16547      COUNTER=0
16548      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16549      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16550      cd $sym_link_dir
16551      # Use -P flag to resolve symlinks in directories.
16552      cd `$THEPWDCMD -P`
16553      sym_link_dir=`$THEPWDCMD -P`
16554      # Resolve file symlinks
16555      while test $COUNTER -lt 20; do
16556        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16557        if test "x$ISLINK" == x; then
16558          # This is not a symbolic link! We are done!
16559          break
16560        fi
16561        # Again resolve directory symlinks since the target of the just found
16562        # link could be in a different directory
16563        cd `$DIRNAME $ISLINK`
16564        sym_link_dir=`$THEPWDCMD -P`
16565        sym_link_file=`$BASENAME $ISLINK`
16566        let COUNTER=COUNTER+1
16567      done
16568      cd $STARTDIR
16569      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16570    fi
16571  fi
16572
16573
16574
16575  # Locate the directory of this script.
16576  AUTOCONF_DIR=$TOPDIR/common/autoconf
16577
16578  # Setup username (for use in adhoc version strings etc)
16579  # Outer [ ] to quote m4.
16580   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16581
16582
16583
16584# Check if it's a pure open build or if custom sources are to be used.
16585
16586  # Check whether --enable-openjdk-only was given.
16587if test "${enable_openjdk_only+set}" = set; then :
16588  enableval=$enable_openjdk_only;
16589else
16590  enable_openjdk_only="no"
16591fi
16592
16593
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16595$as_echo_n "checking for presence of closed sources... " >&6; }
16596  if test -d "$SRC_ROOT/jdk/src/closed"; then
16597    CLOSED_SOURCE_PRESENT=yes
16598  else
16599    CLOSED_SOURCE_PRESENT=no
16600  fi
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16602$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16603
16604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16605$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16606  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16608$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16609
16610  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16611    OPENJDK=true
16612    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16613      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16614$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16615    fi
16616  else
16617    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16618      OPENJDK=true
16619    else
16620      OPENJDK=false
16621    fi
16622  fi
16623
16624  if test "x$OPENJDK" = "xtrue"; then
16625    SET_OPENJDK="OPENJDK=true"
16626  fi
16627
16628
16629
16630  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16631  # the IncludeCustomExtension macro.
16632
16633
16634# Check whether --with-custom-make-dir was given.
16635if test "${with_custom_make_dir+set}" = set; then :
16636  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
16637$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16638fi
16639
16640
16641
16642
16643# These are needed to be able to create a configuration name (and thus the output directory)
16644
16645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16646$as_echo_n "checking which variant of the JDK to build... " >&6; }
16647
16648# Check whether --with-jdk-variant was given.
16649if test "${with_jdk_variant+set}" = set; then :
16650  withval=$with_jdk_variant;
16651fi
16652
16653
16654  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16655    JDK_VARIANT="normal"
16656  else
16657    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16658  fi
16659
16660
16661
16662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16663$as_echo "$JDK_VARIANT" >&6; }
16664
16665
16666  DEBUG_LEVEL="release"
16667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16668$as_echo_n "checking which debug level to use... " >&6; }
16669  # Check whether --enable-debug was given.
16670if test "${enable_debug+set}" = set; then :
16671  enableval=$enable_debug;
16672        ENABLE_DEBUG="${enableval}"
16673        DEBUG_LEVEL="fastdebug"
16674
16675else
16676  ENABLE_DEBUG="no"
16677fi
16678
16679
16680
16681# Check whether --with-debug-level was given.
16682if test "${with_debug_level+set}" = set; then :
16683  withval=$with_debug_level;
16684        DEBUG_LEVEL="${withval}"
16685        if test "x$ENABLE_DEBUG" = xyes; then
16686          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16687        fi
16688
16689fi
16690
16691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16692$as_echo "$DEBUG_LEVEL" >&6; }
16693
16694  if test "x$DEBUG_LEVEL" != xrelease && \
16695      test "x$DEBUG_LEVEL" != xoptimized && \
16696      test "x$DEBUG_LEVEL" != xfastdebug && \
16697      test "x$DEBUG_LEVEL" != xslowdebug; then
16698    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16699  fi
16700
16701  # Translate DEBUG_LEVEL to debug level used by Hotspot
16702  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16703  if test "x$DEBUG_LEVEL" = xrelease; then
16704    HOTSPOT_DEBUG_LEVEL="product"
16705  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16706    HOTSPOT_DEBUG_LEVEL="debug"
16707  fi
16708
16709  if test "x$DEBUG_LEVEL" = xoptimized; then
16710    # The debug level 'optimized' is a little special because it is currently only
16711    # applicable to the HotSpot build where it means to build a completely
16712    # optimized version of the VM without any debugging code (like for the
16713    # 'release' debug level which is called 'product' in the HotSpot build) but
16714    # with the exception that it can contain additional code which is otherwise
16715    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16716    # test new and/or experimental features which are not intended for customer
16717    # shipment. Because these new features need to be tested and benchmarked in
16718    # real world scenarios, we want to build the containing JDK at the 'release'
16719    # debug level.
16720    DEBUG_LEVEL="release"
16721  fi
16722
16723
16724
16725
16726
16727
16728# Check whether --with-jvm-variants was given.
16729if test "${with_jvm_variants+set}" = set; then :
16730  withval=$with_jvm_variants;
16731fi
16732
16733
16734  if test "x$with_jvm_variants" = x; then
16735    with_jvm_variants="server"
16736  fi
16737  JVM_VARIANTS_OPT="$with_jvm_variants"
16738
16739  # Has the user listed more than one variant?
16740  # Additional [] needed to keep m4 from mangling shell constructs.
16741  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16742    BUILDING_MULTIPLE_JVM_VARIANTS=true
16743  else
16744    BUILDING_MULTIPLE_JVM_VARIANTS=false
16745  fi
16746  # Replace the commas with AND for use in the build directory name.
16747  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16748
16749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16750$as_echo_n "checking which variants of the JVM to build... " >&6; }
16751  # JVM_VARIANTS is a space-separated list.
16752  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16753  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16755$as_echo "$JVM_VARIANTS" >&6; }
16756
16757  # Check that the selected variants are valid
16758
16759  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16760  # Notice that the original variant failes on SLES 10 and 11
16761  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16762  STACK=${JVM_VARIANTS// /$'\n'}
16763  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16764  if test "x$INVALID_VARIANTS" != x; then
16765    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16766$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16767    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16768  fi
16769
16770  # All "special" variants share the same output directory ("server")
16771  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16772  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16773  STACK=${JVM_VARIANTS// /$'\n'}
16774  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16775  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16776    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16777  fi
16778
16779
16780
16781
16782  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16783    # zero behaves as a platform and rewrites these values. This is really weird. :(
16784    # We are guaranteed that we do not build any other variants when building zero.
16785    HOTSPOT_TARGET_CPU=zero
16786    HOTSPOT_TARGET_CPU_ARCH=zero
16787  fi
16788
16789
16790# With basic setup done, call the custom early hook.
16791
16792
16793# Check if we have devkits, extra paths or sysroot set.
16794
16795
16796# Check whether --with-devkit was given.
16797if test "${with_devkit+set}" = set; then :
16798  withval=$with_devkit;
16799
16800  # Only process if variable expands to non-empty
16801
16802  if test "x$with_devkit" != x; then
16803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804
16805  # Input might be given as Windows format, start by converting to
16806  # unix format.
16807  path="$with_devkit"
16808  new_path=`$CYGPATH -u "$path"`
16809
16810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16813  # "foo.exe" is OK but "foo" is an error.
16814  #
16815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16816  # It is also a way to make sure we got the proper file name for the real test later on.
16817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16818  if test "x$test_shortpath" = x; then
16819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16820$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16821    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16822  fi
16823
16824  # Call helper function which possibly converts this using DOS-style short mode.
16825  # If so, the updated path is stored in $new_path.
16826
16827  input_path="$new_path"
16828  # Check if we need to convert this using DOS-style short mode. If the path
16829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16830  # take no chances and rewrite it.
16831  # Note: m4 eats our [], so we need to use [ and ] instead.
16832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16833  if test "x$has_forbidden_chars" != x; then
16834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16838      # Going to short mode and back again did indeed matter. Since short mode is
16839      # case insensitive, let's make it lowercase to improve readability.
16840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841      # Now convert it back to Unix-style (cygpath)
16842      input_path=`$CYGPATH -u "$shortmode_path"`
16843      new_path="$input_path"
16844    fi
16845  fi
16846
16847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16848  if test "x$test_cygdrive_prefix" = x; then
16849    # As a simple fix, exclude /usr/bin since it's not a real path.
16850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16852      # a path prefixed by /cygdrive for fixpath to work.
16853      new_path="$CYGWIN_ROOT_PATH$input_path"
16854    fi
16855  fi
16856
16857
16858  if test "x$path" != "x$new_path"; then
16859    with_devkit="$new_path"
16860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16861$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16862  fi
16863
16864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865
16866  path="$with_devkit"
16867  has_colon=`$ECHO $path | $GREP ^.:`
16868  new_path="$path"
16869  if test "x$has_colon" = x; then
16870    # Not in mixed or Windows style, start by that.
16871    new_path=`cmd //c echo $path`
16872  fi
16873
16874
16875  input_path="$new_path"
16876  # Check if we need to convert this using DOS-style short mode. If the path
16877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16878  # take no chances and rewrite it.
16879  # Note: m4 eats our [], so we need to use [ and ] instead.
16880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16881  if test "x$has_forbidden_chars" != x; then
16882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16884  fi
16885
16886
16887  windows_path="$new_path"
16888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16889    unix_path=`$CYGPATH -u "$windows_path"`
16890    new_path="$unix_path"
16891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16893    new_path="$unix_path"
16894  fi
16895
16896  if test "x$path" != "x$new_path"; then
16897    with_devkit="$new_path"
16898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16899$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16900  fi
16901
16902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904
16905    else
16906      # We're on a unix platform. Hooray! :)
16907      path="$with_devkit"
16908      has_space=`$ECHO "$path" | $GREP " "`
16909      if test "x$has_space" != x; then
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16911$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16913      fi
16914
16915      # Use eval to expand a potential ~
16916      eval path="$path"
16917      if test ! -f "$path" && test ! -d "$path"; then
16918        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16919      fi
16920
16921      if test -d "$path"; then
16922        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16923      else
16924        dir="`$DIRNAME "$path"`"
16925        base="`$BASENAME "$path"`"
16926        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16927      fi
16928    fi
16929  fi
16930
16931        DEVKIT_ROOT="$with_devkit"
16932        # Check for a meta data info file in the root of the devkit
16933        if test -f "$DEVKIT_ROOT/devkit.info"; then
16934          . $DEVKIT_ROOT/devkit.info
16935          # This potentially sets the following:
16936          # A descriptive name of the devkit
16937
16938  if test "x$DEVKIT_NAME" = x; then
16939    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16940  fi
16941
16942          # Corresponds to --with-extra-path
16943
16944  if test "x$DEVKIT_EXTRA_PATH" = x; then
16945    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16946  fi
16947
16948          # Corresponds to --with-toolchain-path
16949
16950  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16951    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # Corresponds to --with-sysroot
16955
16956  if test "x$DEVKIT_SYSROOT" = x; then
16957    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960
16961          # Identifies the Visual Studio version in the devkit
16962
16963  if test "x$DEVKIT_VS_VERSION" = x; then
16964    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16965  fi
16966
16967          # The Visual Studio include environment variable
16968
16969  if test "x$DEVKIT_VS_INCLUDE" = x; then
16970    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16971  fi
16972
16973          # The Visual Studio lib environment variable
16974
16975  if test "x$DEVKIT_VS_LIB" = x; then
16976    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16977  fi
16978
16979          # Corresponds to --with-msvcr-dll
16980
16981  if test "x$DEVKIT_MSVCR_DLL" = x; then
16982    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16983  fi
16984
16985          # Corresponds to --with-msvcp-dll
16986
16987  if test "x$DEVKIT_MSVCP_DLL" = x; then
16988    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16989  fi
16990
16991        fi
16992
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16994$as_echo_n "checking for devkit... " >&6; }
16995        if test "x$DEVKIT_NAME" != x; then
16996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16997$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16998        else
16999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17000$as_echo "$DEVKIT_ROOT" >&6; }
17001        fi
17002
17003
17004  if test "x$DEVKIT_EXTRA_PATH" != x; then
17005    if test "x$EXTRA_PATH" = x; then
17006      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17007    else
17008      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17009    fi
17010  fi
17011
17012
17013        # Fallback default of just /bin if DEVKIT_PATH is not defined
17014        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17015          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17016        fi
17017
17018  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17019    if test "x$TOOLCHAIN_PATH" = x; then
17020      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17021    else
17022      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17023    fi
17024  fi
17025
17026
17027        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17028        # places for backwards compatiblity.
17029        if test "x$DEVKIT_SYSROOT" != x; then
17030          SYSROOT="$DEVKIT_SYSROOT"
17031        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17032          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17033        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17034          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17035        fi
17036
17037
17038fi
17039
17040
17041  # You can force the sysroot if the sysroot encoded into the compiler tools
17042  # is not correct.
17043
17044# Check whether --with-sys-root was given.
17045if test "${with_sys_root+set}" = set; then :
17046  withval=$with_sys_root; SYSROOT=$with_sys_root
17047
17048fi
17049
17050
17051
17052# Check whether --with-sysroot was given.
17053if test "${with_sysroot+set}" = set; then :
17054  withval=$with_sysroot; SYSROOT=$with_sysroot
17055
17056fi
17057
17058
17059
17060# Check whether --with-tools-dir was given.
17061if test "${with_tools_dir+set}" = set; then :
17062  withval=$with_tools_dir;
17063  if test "x$with_tools_dir" != x; then
17064    if test "x$TOOLCHAIN_PATH" = x; then
17065      TOOLCHAIN_PATH="$with_tools_dir"
17066    else
17067      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17068    fi
17069  fi
17070
17071
17072fi
17073
17074
17075
17076# Check whether --with-toolchain-path was given.
17077if test "${with_toolchain_path+set}" = set; then :
17078  withval=$with_toolchain_path;
17079  if test "x$with_toolchain_path" != x; then
17080    if test "x$TOOLCHAIN_PATH" = x; then
17081      TOOLCHAIN_PATH="$with_toolchain_path"
17082    else
17083      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17084    fi
17085  fi
17086
17087
17088fi
17089
17090
17091
17092# Check whether --with-extra-path was given.
17093if test "${with_extra_path+set}" = set; then :
17094  withval=$with_extra_path;
17095  if test "x$with_extra_path" != x; then
17096    if test "x$EXTRA_PATH" = x; then
17097      EXTRA_PATH="$with_extra_path"
17098    else
17099      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17100    fi
17101  fi
17102
17103
17104fi
17105
17106
17107  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17108    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17109    # If not, detect if Xcode is installed by running xcodebuild -version
17110    # if no Xcode installed, xcodebuild exits with 1
17111    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17112    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17113      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17114      # fall back on the stub binary in /usr/bin/xcodebuild
17115      # Extract the first word of "xcodebuild", so it can be a program name with args.
17116set dummy xcodebuild; ac_word=$2
17117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17118$as_echo_n "checking for $ac_word... " >&6; }
17119if ${ac_cv_path_XCODEBUILD+:} false; then :
17120  $as_echo_n "(cached) " >&6
17121else
17122  case $XCODEBUILD in
17123  [\\/]* | ?:[\\/]*)
17124  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17125  ;;
17126  *)
17127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17128for as_dir in $TOOLCHAIN_PATH
17129do
17130  IFS=$as_save_IFS
17131  test -z "$as_dir" && as_dir=.
17132    for ac_exec_ext in '' $ac_executable_extensions; do
17133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17134    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17136    break 2
17137  fi
17138done
17139  done
17140IFS=$as_save_IFS
17141
17142  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17143  ;;
17144esac
17145fi
17146XCODEBUILD=$ac_cv_path_XCODEBUILD
17147if test -n "$XCODEBUILD"; then
17148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17149$as_echo "$XCODEBUILD" >&6; }
17150else
17151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17152$as_echo "no" >&6; }
17153fi
17154
17155
17156    else
17157      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17158      # when only the command line tools are installed there are no SDKs, so headers
17159      # are copied into the system frameworks
17160      XCODEBUILD=
17161
17162    fi
17163
17164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17165$as_echo_n "checking for sdk name... " >&6; }
17166
17167# Check whether --with-sdk-name was given.
17168if test "${with_sdk_name+set}" = set; then :
17169  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17170
17171fi
17172
17173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17174$as_echo "$SDKNAME" >&6; }
17175
17176    # if toolchain path is specified then don't rely on system headers, they may not compile
17177    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17178    test -z "$TOOLCHAIN_PATH" && \
17179      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17180
17181    if test -z "$SYSROOT"; then
17182      if test -n "$XCODEBUILD"; then
17183        # if we don't have system headers, use default SDK name (last resort)
17184        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17185          SDKNAME=${SDKNAME:-macosx}
17186        fi
17187
17188        if test -n "$SDKNAME"; then
17189          # Call xcodebuild to determine SYSROOT
17190          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17191        fi
17192      else
17193        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17194          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
17195        fi
17196      fi
17197    else
17198      # warn user if --with-sdk-name was also set
17199      if test -n "$with_sdk_name"; then
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17201$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17202      fi
17203    fi
17204
17205    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17206      # If no system framework headers, then SYSROOT must be set, or we won't build
17207      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
17208    fi
17209
17210    # Perform a basic sanity test
17211    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17212      if test -z "$SYSROOT"; then
17213        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
17214      else
17215        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17216      fi
17217    fi
17218
17219    # set SDKROOT too, Xcode tools will pick it up
17220    SDKROOT=$SYSROOT
17221
17222  fi
17223
17224  # Prepend the extra path to the global path
17225
17226  if test "x$EXTRA_PATH" != x; then
17227    if test "x$PATH" = x; then
17228      PATH="$EXTRA_PATH"
17229    else
17230      PATH="$EXTRA_PATH:$PATH"
17231    fi
17232  fi
17233
17234
17235  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17236    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17237    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17238  fi
17239
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17241$as_echo_n "checking for sysroot... " >&6; }
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17243$as_echo "$SYSROOT" >&6; }
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17245$as_echo_n "checking for toolchain path... " >&6; }
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17247$as_echo "$TOOLCHAIN_PATH" >&6; }
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17249$as_echo_n "checking for extra path... " >&6; }
17250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17251$as_echo "$EXTRA_PATH" >&6; }
17252
17253
17254# To properly create a configuration name, we need to have the OpenJDK target
17255# and options (variants and debug level) parsed.
17256
17257
17258
17259# Check whether --with-conf-name was given.
17260if test "${with_conf_name+set}" = set; then :
17261  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17262fi
17263
17264
17265  # Test from where we are running configure, in or outside of src root.
17266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17267$as_echo_n "checking where to store configuration... " >&6; }
17268  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17269      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17270      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17271    # We are running configure from the src root.
17272    # Create a default ./build/target-variant-debuglevel output root.
17273    if test "x${CONF_NAME}" = x; then
17274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17275$as_echo "in default location" >&6; }
17276      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17277    else
17278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17279$as_echo "in build directory with custom name" >&6; }
17280    fi
17281    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17282    $MKDIR -p "$OUTPUT_ROOT"
17283    if test ! -d "$OUTPUT_ROOT"; then
17284      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17285    fi
17286  else
17287    # We are running configure from outside of the src dir.
17288    # Then use the current directory as output dir!
17289    # If configuration is situated in normal build directory, just use the build
17290    # directory name as configuration name, otherwise use the complete path.
17291    if test "x${CONF_NAME}" = x; then
17292      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17293    fi
17294    OUTPUT_ROOT="$CURDIR"
17295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17296$as_echo "in current directory" >&6; }
17297
17298    # WARNING: This might be a bad thing to do. You need to be sure you want to
17299    # have a configuration in this directory. Do some sanity checks!
17300
17301    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17302      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17303      # other files
17304      files_present=`$LS $OUTPUT_ROOT`
17305      # Configure has already touched config.log and confdefs.h in the current dir when this check
17306      # is performed.
17307      filtered_files=`$ECHO "$files_present" \
17308          | $SED -e 's/config.log//g' \
17309              -e 's/configure.log//g' \
17310              -e 's/confdefs.h//g' \
17311              -e 's/ //g' \
17312          | $TR -d '\n'`
17313      if test "x$filtered_files" != x; then
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17315$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17317$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17318        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17319$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17320        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17321$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17323$as_echo "$as_me: seriously mess up just about everything." >&6;}
17324        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17325$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17326        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17327$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17328        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17329      fi
17330    fi
17331  fi
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17333$as_echo_n "checking what configuration name to use... " >&6; }
17334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17335$as_echo "$CONF_NAME" >&6; }
17336
17337
17338  # Only process if variable expands to non-empty
17339
17340  if test "x$OUTPUT_ROOT" != x; then
17341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17342
17343  # Input might be given as Windows format, start by converting to
17344  # unix format.
17345  path="$OUTPUT_ROOT"
17346  new_path=`$CYGPATH -u "$path"`
17347
17348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17351  # "foo.exe" is OK but "foo" is an error.
17352  #
17353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17354  # It is also a way to make sure we got the proper file name for the real test later on.
17355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17356  if test "x$test_shortpath" = x; then
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17358$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17359    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17360  fi
17361
17362  # Call helper function which possibly converts this using DOS-style short mode.
17363  # If so, the updated path is stored in $new_path.
17364
17365  input_path="$new_path"
17366  # Check if we need to convert this using DOS-style short mode. If the path
17367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17368  # take no chances and rewrite it.
17369  # Note: m4 eats our [], so we need to use [ and ] instead.
17370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17371  if test "x$has_forbidden_chars" != x; then
17372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17376      # Going to short mode and back again did indeed matter. Since short mode is
17377      # case insensitive, let's make it lowercase to improve readability.
17378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17379      # Now convert it back to Unix-style (cygpath)
17380      input_path=`$CYGPATH -u "$shortmode_path"`
17381      new_path="$input_path"
17382    fi
17383  fi
17384
17385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17386  if test "x$test_cygdrive_prefix" = x; then
17387    # As a simple fix, exclude /usr/bin since it's not a real path.
17388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17390      # a path prefixed by /cygdrive for fixpath to work.
17391      new_path="$CYGWIN_ROOT_PATH$input_path"
17392    fi
17393  fi
17394
17395
17396  if test "x$path" != "x$new_path"; then
17397    OUTPUT_ROOT="$new_path"
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17399$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17400  fi
17401
17402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403
17404  path="$OUTPUT_ROOT"
17405  has_colon=`$ECHO $path | $GREP ^.:`
17406  new_path="$path"
17407  if test "x$has_colon" = x; then
17408    # Not in mixed or Windows style, start by that.
17409    new_path=`cmd //c echo $path`
17410  fi
17411
17412
17413  input_path="$new_path"
17414  # Check if we need to convert this using DOS-style short mode. If the path
17415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17416  # take no chances and rewrite it.
17417  # Note: m4 eats our [], so we need to use [ and ] instead.
17418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17419  if test "x$has_forbidden_chars" != x; then
17420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17422  fi
17423
17424
17425  windows_path="$new_path"
17426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17427    unix_path=`$CYGPATH -u "$windows_path"`
17428    new_path="$unix_path"
17429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17431    new_path="$unix_path"
17432  fi
17433
17434  if test "x$path" != "x$new_path"; then
17435    OUTPUT_ROOT="$new_path"
17436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17437$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17438  fi
17439
17440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17442
17443    else
17444      # We're on a unix platform. Hooray! :)
17445      path="$OUTPUT_ROOT"
17446      has_space=`$ECHO "$path" | $GREP " "`
17447      if test "x$has_space" != x; then
17448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17449$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17451      fi
17452
17453      # Use eval to expand a potential ~
17454      eval path="$path"
17455      if test ! -f "$path" && test ! -d "$path"; then
17456        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17457      fi
17458
17459      if test -d "$path"; then
17460        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17461      else
17462        dir="`$DIRNAME "$path"`"
17463        base="`$BASENAME "$path"`"
17464        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17465      fi
17466    fi
17467  fi
17468
17469
17470  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17471  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17472
17473  SPEC=$OUTPUT_ROOT/spec.gmk
17474
17475  CONF_NAME=$CONF_NAME
17476
17477  OUTPUT_ROOT=$OUTPUT_ROOT
17478
17479
17480
17481  # The spec.gmk file contains all variables for the make system.
17482  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17483
17484  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17485  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17486
17487  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17488  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17489
17490  # The compare.sh is used to compare the build output to other builds.
17491  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17492
17493  # The generated Makefile knows where the spec.gmk is and where the source is.
17494  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17495  # which will look for generated configurations
17496  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17497
17498
17499
17500# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17501
17502  for ac_prog in apt-get yum port pkgutil pkgadd
17503do
17504  # Extract the first word of "$ac_prog", so it can be a program name with args.
17505set dummy $ac_prog; ac_word=$2
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507$as_echo_n "checking for $ac_word... " >&6; }
17508if ${ac_cv_prog_PKGHANDLER+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  if test -n "$PKGHANDLER"; then
17512  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17513else
17514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17515for as_dir in $PATH
17516do
17517  IFS=$as_save_IFS
17518  test -z "$as_dir" && as_dir=.
17519    for ac_exec_ext in '' $ac_executable_extensions; do
17520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17521    ac_cv_prog_PKGHANDLER="$ac_prog"
17522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17523    break 2
17524  fi
17525done
17526  done
17527IFS=$as_save_IFS
17528
17529fi
17530fi
17531PKGHANDLER=$ac_cv_prog_PKGHANDLER
17532if test -n "$PKGHANDLER"; then
17533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17534$as_echo "$PKGHANDLER" >&6; }
17535else
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17537$as_echo "no" >&6; }
17538fi
17539
17540
17541  test -n "$PKGHANDLER" && break
17542done
17543
17544
17545
17546# Setup tools that requires more complex handling, or that is not needed by the configure script.
17547
17548
17549
17550  # Publish this variable in the help.
17551
17552
17553  if [ -z "${MAKE+x}" ]; then
17554    # The variable is not set by user, try to locate tool using the code snippet
17555
17556    # Try our hardest to locate a correct version of GNU make
17557    for ac_prog in gmake
17558do
17559  # Extract the first word of "$ac_prog", so it can be a program name with args.
17560set dummy $ac_prog; ac_word=$2
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17562$as_echo_n "checking for $ac_word... " >&6; }
17563if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17564  $as_echo_n "(cached) " >&6
17565else
17566  case $CHECK_GMAKE in
17567  [\\/]* | ?:[\\/]*)
17568  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17569  ;;
17570  *)
17571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572for as_dir in $PATH
17573do
17574  IFS=$as_save_IFS
17575  test -z "$as_dir" && as_dir=.
17576    for ac_exec_ext in '' $ac_executable_extensions; do
17577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17578    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17580    break 2
17581  fi
17582done
17583  done
17584IFS=$as_save_IFS
17585
17586  ;;
17587esac
17588fi
17589CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17590if test -n "$CHECK_GMAKE"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17592$as_echo "$CHECK_GMAKE" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599  test -n "$CHECK_GMAKE" && break
17600done
17601
17602
17603  MAKE_CANDIDATE=""$CHECK_GMAKE""
17604  DESCRIPTION="gmake in PATH"
17605
17606  # On Cygwin, we require a newer version of make than on other platforms
17607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17608    MAKE_VERSION_EXPR="-e 4\."
17609    MAKE_REQUIRED_VERSION="4.0"
17610   else
17611    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17612    MAKE_REQUIRED_VERSION="3.81"
17613  fi
17614
17615  if test "x$MAKE_CANDIDATE" != x; then
17616    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17617$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17618    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17619    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17620    if test "x$IS_GNU_MAKE" = x; then
17621      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17622$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17623    else
17624      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17625      if test "x$IS_MODERN_MAKE" = x; then
17626        { $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
17627$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;}
17628      else
17629        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17630          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17631            MAKE_EXPECTED_ENV='cygwin'
17632          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17633            MAKE_EXPECTED_ENV='msys'
17634          else
17635            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17636          fi
17637          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17638          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17639        else
17640          # Not relevant for non-Windows
17641          IS_MAKE_CORRECT_ENV=true
17642        fi
17643        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17644          { $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
17645$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;}
17646        else
17647          FOUND_MAKE=$MAKE_CANDIDATE
17648
17649  # Only process if variable expands to non-empty
17650
17651  if test "x$FOUND_MAKE" != x; then
17652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17653
17654  # First separate the path from the arguments. This will split at the first
17655  # space.
17656  complete="$FOUND_MAKE"
17657  path="${complete%% *}"
17658  tmp="$complete EOL"
17659  arguments="${tmp#* }"
17660
17661  # Input might be given as Windows format, start by converting to
17662  # unix format.
17663  new_path=`$CYGPATH -u "$path"`
17664
17665  # Now try to locate executable using which
17666  new_path=`$WHICH "$new_path" 2> /dev/null`
17667  # bat and cmd files are not always considered executable in cygwin causing which
17668  # to not find them
17669  if test "x$new_path" = x \
17670      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17671      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17672    new_path=`$CYGPATH -u "$path"`
17673  fi
17674  if test "x$new_path" = x; then
17675    # Oops. Which didn't find the executable.
17676    # The splitting of arguments from the executable at a space might have been incorrect,
17677    # since paths with space are more likely in Windows. Give it another try with the whole
17678    # argument.
17679    path="$complete"
17680    arguments="EOL"
17681    new_path=`$CYGPATH -u "$path"`
17682    new_path=`$WHICH "$new_path" 2> /dev/null`
17683    # bat and cmd files are not always considered executable in cygwin causing which
17684    # to not find them
17685    if test "x$new_path" = x \
17686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17688      new_path=`$CYGPATH -u "$path"`
17689    fi
17690    if test "x$new_path" = x; then
17691      # It's still not found. Now this is an unrecoverable error.
17692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17694      has_space=`$ECHO "$complete" | $GREP " "`
17695      if test "x$has_space" != x; then
17696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17698      fi
17699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700    fi
17701  fi
17702
17703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17706  # "foo.exe" is OK but "foo" is an error.
17707  #
17708  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17709  # It is also a way to make sure we got the proper file name for the real test later on.
17710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17711  if test "x$test_shortpath" = x; then
17712    # Short path failed, file does not exist as specified.
17713    # Try adding .exe or .cmd
17714    if test -f "${new_path}.exe"; then
17715      input_to_shortpath="${new_path}.exe"
17716    elif test -f "${new_path}.cmd"; then
17717      input_to_shortpath="${new_path}.cmd"
17718    else
17719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17720$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17723      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17724    fi
17725  else
17726    input_to_shortpath="$new_path"
17727  fi
17728
17729  # Call helper function which possibly converts this using DOS-style short mode.
17730  # If so, the updated path is stored in $new_path.
17731  new_path="$input_to_shortpath"
17732
17733  input_path="$input_to_shortpath"
17734  # Check if we need to convert this using DOS-style short mode. If the path
17735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17736  # take no chances and rewrite it.
17737  # Note: m4 eats our [], so we need to use [ and ] instead.
17738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17739  if test "x$has_forbidden_chars" != x; then
17740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17744      # Going to short mode and back again did indeed matter. Since short mode is
17745      # case insensitive, let's make it lowercase to improve readability.
17746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17747      # Now convert it back to Unix-style (cygpath)
17748      input_path=`$CYGPATH -u "$shortmode_path"`
17749      new_path="$input_path"
17750    fi
17751  fi
17752
17753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17754  if test "x$test_cygdrive_prefix" = x; then
17755    # As a simple fix, exclude /usr/bin since it's not a real path.
17756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17758      # a path prefixed by /cygdrive for fixpath to work.
17759      new_path="$CYGWIN_ROOT_PATH$input_path"
17760    fi
17761  fi
17762
17763  # remove trailing .exe if any
17764  new_path="${new_path/%.exe/}"
17765
17766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17767
17768  # First separate the path from the arguments. This will split at the first
17769  # space.
17770  complete="$FOUND_MAKE"
17771  path="${complete%% *}"
17772  tmp="$complete EOL"
17773  arguments="${tmp#* }"
17774
17775  # Input might be given as Windows format, start by converting to
17776  # unix format.
17777  new_path="$path"
17778
17779  windows_path="$new_path"
17780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781    unix_path=`$CYGPATH -u "$windows_path"`
17782    new_path="$unix_path"
17783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785    new_path="$unix_path"
17786  fi
17787
17788
17789  # Now try to locate executable using which
17790  new_path=`$WHICH "$new_path" 2> /dev/null`
17791
17792  if test "x$new_path" = x; then
17793    # Oops. Which didn't find the executable.
17794    # The splitting of arguments from the executable at a space might have been incorrect,
17795    # since paths with space are more likely in Windows. Give it another try with the whole
17796    # argument.
17797    path="$complete"
17798    arguments="EOL"
17799    new_path="$path"
17800
17801  windows_path="$new_path"
17802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803    unix_path=`$CYGPATH -u "$windows_path"`
17804    new_path="$unix_path"
17805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17807    new_path="$unix_path"
17808  fi
17809
17810
17811    new_path=`$WHICH "$new_path" 2> /dev/null`
17812    # bat and cmd files are not always considered executable in MSYS causing which
17813    # to not find them
17814    if test "x$new_path" = x \
17815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17817      new_path="$path"
17818
17819  windows_path="$new_path"
17820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17821    unix_path=`$CYGPATH -u "$windows_path"`
17822    new_path="$unix_path"
17823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17825    new_path="$unix_path"
17826  fi
17827
17828    fi
17829
17830    if test "x$new_path" = x; then
17831      # It's still not found. Now this is an unrecoverable error.
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17834      has_space=`$ECHO "$complete" | $GREP " "`
17835      if test "x$has_space" != x; then
17836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17838      fi
17839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17840    fi
17841  fi
17842
17843  # Now new_path has a complete unix path to the binary
17844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17845    # Keep paths in /bin as-is, but remove trailing .exe if any
17846    new_path="${new_path/%.exe/}"
17847    # Do not save /bin paths to all_fixpath_prefixes!
17848  else
17849    # Not in mixed or Windows style, start by that.
17850    new_path=`cmd //c echo $new_path`
17851
17852  input_path="$new_path"
17853  # Check if we need to convert this using DOS-style short mode. If the path
17854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17855  # take no chances and rewrite it.
17856  # Note: m4 eats our [], so we need to use [ and ] instead.
17857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17858  if test "x$has_forbidden_chars" != x; then
17859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17861  fi
17862
17863    # Output is in $new_path
17864
17865  windows_path="$new_path"
17866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17867    unix_path=`$CYGPATH -u "$windows_path"`
17868    new_path="$unix_path"
17869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17871    new_path="$unix_path"
17872  fi
17873
17874    # remove trailing .exe if any
17875    new_path="${new_path/%.exe/}"
17876
17877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17879  fi
17880
17881    else
17882      # We're on a unix platform. Hooray! :)
17883      # First separate the path from the arguments. This will split at the first
17884      # space.
17885      complete="$FOUND_MAKE"
17886      path="${complete%% *}"
17887      tmp="$complete EOL"
17888      arguments="${tmp#* }"
17889
17890      # Cannot rely on the command "which" here since it doesn't always work.
17891      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17892      if test -z "$is_absolute_path"; then
17893        # Path to executable is not absolute. Find it.
17894        IFS_save="$IFS"
17895        IFS=:
17896        for p in $PATH; do
17897          if test -f "$p/$path" && test -x "$p/$path"; then
17898            new_path="$p/$path"
17899            break
17900          fi
17901        done
17902        IFS="$IFS_save"
17903      else
17904        # This is an absolute path, we can use it without further modifications.
17905        new_path="$path"
17906      fi
17907
17908      if test "x$new_path" = x; then
17909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17910$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17911        has_space=`$ECHO "$complete" | $GREP " "`
17912        if test "x$has_space" != x; then
17913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17915        fi
17916        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17917      fi
17918    fi
17919
17920    # Now join together the path and the arguments once again
17921    if test "x$arguments" != xEOL; then
17922      new_complete="$new_path ${arguments% *}"
17923    else
17924      new_complete="$new_path"
17925    fi
17926
17927    if test "x$complete" != "x$new_complete"; then
17928      FOUND_MAKE="$new_complete"
17929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17930$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17931    fi
17932  fi
17933
17934        fi
17935      fi
17936    fi
17937  fi
17938
17939
17940    if test "x$FOUND_MAKE" = x; then
17941      for ac_prog in make
17942do
17943  # Extract the first word of "$ac_prog", so it can be a program name with args.
17944set dummy $ac_prog; ac_word=$2
17945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17946$as_echo_n "checking for $ac_word... " >&6; }
17947if ${ac_cv_path_CHECK_MAKE+:} false; then :
17948  $as_echo_n "(cached) " >&6
17949else
17950  case $CHECK_MAKE in
17951  [\\/]* | ?:[\\/]*)
17952  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17953  ;;
17954  *)
17955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17956for as_dir in $PATH
17957do
17958  IFS=$as_save_IFS
17959  test -z "$as_dir" && as_dir=.
17960    for ac_exec_ext in '' $ac_executable_extensions; do
17961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17962    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17964    break 2
17965  fi
17966done
17967  done
17968IFS=$as_save_IFS
17969
17970  ;;
17971esac
17972fi
17973CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17974if test -n "$CHECK_MAKE"; then
17975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17976$as_echo "$CHECK_MAKE" >&6; }
17977else
17978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17979$as_echo "no" >&6; }
17980fi
17981
17982
17983  test -n "$CHECK_MAKE" && break
17984done
17985
17986
17987  MAKE_CANDIDATE=""$CHECK_MAKE""
17988  DESCRIPTION="make in PATH"
17989
17990  # On Cygwin, we require a newer version of make than on other platforms
17991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992    MAKE_VERSION_EXPR="-e 4\."
17993    MAKE_REQUIRED_VERSION="4.0"
17994   else
17995    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17996    MAKE_REQUIRED_VERSION="3.81"
17997  fi
17998
17999  if test "x$MAKE_CANDIDATE" != x; then
18000    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18001$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18002    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18003    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18004    if test "x$IS_GNU_MAKE" = x; then
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18006$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18007    else
18008      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18009      if test "x$IS_MODERN_MAKE" = x; then
18010        { $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
18011$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;}
18012      else
18013        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18014          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015            MAKE_EXPECTED_ENV='cygwin'
18016          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18017            MAKE_EXPECTED_ENV='msys'
18018          else
18019            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18020          fi
18021          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18022          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18023        else
18024          # Not relevant for non-Windows
18025          IS_MAKE_CORRECT_ENV=true
18026        fi
18027        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18028          { $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
18029$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;}
18030        else
18031          FOUND_MAKE=$MAKE_CANDIDATE
18032
18033  # Only process if variable expands to non-empty
18034
18035  if test "x$FOUND_MAKE" != x; then
18036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037
18038  # First separate the path from the arguments. This will split at the first
18039  # space.
18040  complete="$FOUND_MAKE"
18041  path="${complete%% *}"
18042  tmp="$complete EOL"
18043  arguments="${tmp#* }"
18044
18045  # Input might be given as Windows format, start by converting to
18046  # unix format.
18047  new_path=`$CYGPATH -u "$path"`
18048
18049  # Now try to locate executable using which
18050  new_path=`$WHICH "$new_path" 2> /dev/null`
18051  # bat and cmd files are not always considered executable in cygwin causing which
18052  # to not find them
18053  if test "x$new_path" = x \
18054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18056    new_path=`$CYGPATH -u "$path"`
18057  fi
18058  if test "x$new_path" = x; then
18059    # Oops. Which didn't find the executable.
18060    # The splitting of arguments from the executable at a space might have been incorrect,
18061    # since paths with space are more likely in Windows. Give it another try with the whole
18062    # argument.
18063    path="$complete"
18064    arguments="EOL"
18065    new_path=`$CYGPATH -u "$path"`
18066    new_path=`$WHICH "$new_path" 2> /dev/null`
18067    # bat and cmd files are not always considered executable in cygwin causing which
18068    # to not find them
18069    if test "x$new_path" = x \
18070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18072      new_path=`$CYGPATH -u "$path"`
18073    fi
18074    if test "x$new_path" = x; then
18075      # It's still not found. Now this is an unrecoverable error.
18076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18078      has_space=`$ECHO "$complete" | $GREP " "`
18079      if test "x$has_space" != x; then
18080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18082      fi
18083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084    fi
18085  fi
18086
18087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18090  # "foo.exe" is OK but "foo" is an error.
18091  #
18092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18093  # It is also a way to make sure we got the proper file name for the real test later on.
18094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18095  if test "x$test_shortpath" = x; then
18096    # Short path failed, file does not exist as specified.
18097    # Try adding .exe or .cmd
18098    if test -f "${new_path}.exe"; then
18099      input_to_shortpath="${new_path}.exe"
18100    elif test -f "${new_path}.cmd"; then
18101      input_to_shortpath="${new_path}.cmd"
18102    else
18103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18108    fi
18109  else
18110    input_to_shortpath="$new_path"
18111  fi
18112
18113  # Call helper function which possibly converts this using DOS-style short mode.
18114  # If so, the updated path is stored in $new_path.
18115  new_path="$input_to_shortpath"
18116
18117  input_path="$input_to_shortpath"
18118  # Check if we need to convert this using DOS-style short mode. If the path
18119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18120  # take no chances and rewrite it.
18121  # Note: m4 eats our [], so we need to use [ and ] instead.
18122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18123  if test "x$has_forbidden_chars" != x; then
18124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18128      # Going to short mode and back again did indeed matter. Since short mode is
18129      # case insensitive, let's make it lowercase to improve readability.
18130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18131      # Now convert it back to Unix-style (cygpath)
18132      input_path=`$CYGPATH -u "$shortmode_path"`
18133      new_path="$input_path"
18134    fi
18135  fi
18136
18137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18138  if test "x$test_cygdrive_prefix" = x; then
18139    # As a simple fix, exclude /usr/bin since it's not a real path.
18140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18142      # a path prefixed by /cygdrive for fixpath to work.
18143      new_path="$CYGWIN_ROOT_PATH$input_path"
18144    fi
18145  fi
18146
18147  # remove trailing .exe if any
18148  new_path="${new_path/%.exe/}"
18149
18150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18151
18152  # First separate the path from the arguments. This will split at the first
18153  # space.
18154  complete="$FOUND_MAKE"
18155  path="${complete%% *}"
18156  tmp="$complete EOL"
18157  arguments="${tmp#* }"
18158
18159  # Input might be given as Windows format, start by converting to
18160  # unix format.
18161  new_path="$path"
18162
18163  windows_path="$new_path"
18164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165    unix_path=`$CYGPATH -u "$windows_path"`
18166    new_path="$unix_path"
18167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18169    new_path="$unix_path"
18170  fi
18171
18172
18173  # Now try to locate executable using which
18174  new_path=`$WHICH "$new_path" 2> /dev/null`
18175
18176  if test "x$new_path" = x; then
18177    # Oops. Which didn't find the executable.
18178    # The splitting of arguments from the executable at a space might have been incorrect,
18179    # since paths with space are more likely in Windows. Give it another try with the whole
18180    # argument.
18181    path="$complete"
18182    arguments="EOL"
18183    new_path="$path"
18184
18185  windows_path="$new_path"
18186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18187    unix_path=`$CYGPATH -u "$windows_path"`
18188    new_path="$unix_path"
18189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18191    new_path="$unix_path"
18192  fi
18193
18194
18195    new_path=`$WHICH "$new_path" 2> /dev/null`
18196    # bat and cmd files are not always considered executable in MSYS causing which
18197    # to not find them
18198    if test "x$new_path" = x \
18199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201      new_path="$path"
18202
18203  windows_path="$new_path"
18204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18205    unix_path=`$CYGPATH -u "$windows_path"`
18206    new_path="$unix_path"
18207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18209    new_path="$unix_path"
18210  fi
18211
18212    fi
18213
18214    if test "x$new_path" = x; then
18215      # It's still not found. Now this is an unrecoverable error.
18216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18218      has_space=`$ECHO "$complete" | $GREP " "`
18219      if test "x$has_space" != x; then
18220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18222      fi
18223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18224    fi
18225  fi
18226
18227  # Now new_path has a complete unix path to the binary
18228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18229    # Keep paths in /bin as-is, but remove trailing .exe if any
18230    new_path="${new_path/%.exe/}"
18231    # Do not save /bin paths to all_fixpath_prefixes!
18232  else
18233    # Not in mixed or Windows style, start by that.
18234    new_path=`cmd //c echo $new_path`
18235
18236  input_path="$new_path"
18237  # Check if we need to convert this using DOS-style short mode. If the path
18238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18239  # take no chances and rewrite it.
18240  # Note: m4 eats our [], so we need to use [ and ] instead.
18241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18242  if test "x$has_forbidden_chars" != x; then
18243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18245  fi
18246
18247    # Output is in $new_path
18248
18249  windows_path="$new_path"
18250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18251    unix_path=`$CYGPATH -u "$windows_path"`
18252    new_path="$unix_path"
18253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18255    new_path="$unix_path"
18256  fi
18257
18258    # remove trailing .exe if any
18259    new_path="${new_path/%.exe/}"
18260
18261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18263  fi
18264
18265    else
18266      # We're on a unix platform. Hooray! :)
18267      # First separate the path from the arguments. This will split at the first
18268      # space.
18269      complete="$FOUND_MAKE"
18270      path="${complete%% *}"
18271      tmp="$complete EOL"
18272      arguments="${tmp#* }"
18273
18274      # Cannot rely on the command "which" here since it doesn't always work.
18275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18276      if test -z "$is_absolute_path"; then
18277        # Path to executable is not absolute. Find it.
18278        IFS_save="$IFS"
18279        IFS=:
18280        for p in $PATH; do
18281          if test -f "$p/$path" && test -x "$p/$path"; then
18282            new_path="$p/$path"
18283            break
18284          fi
18285        done
18286        IFS="$IFS_save"
18287      else
18288        # This is an absolute path, we can use it without further modifications.
18289        new_path="$path"
18290      fi
18291
18292      if test "x$new_path" = x; then
18293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18294$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18295        has_space=`$ECHO "$complete" | $GREP " "`
18296        if test "x$has_space" != x; then
18297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18299        fi
18300        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18301      fi
18302    fi
18303
18304    # Now join together the path and the arguments once again
18305    if test "x$arguments" != xEOL; then
18306      new_complete="$new_path ${arguments% *}"
18307    else
18308      new_complete="$new_path"
18309    fi
18310
18311    if test "x$complete" != "x$new_complete"; then
18312      FOUND_MAKE="$new_complete"
18313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18314$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18315    fi
18316  fi
18317
18318        fi
18319      fi
18320    fi
18321  fi
18322
18323    fi
18324
18325    if test "x$FOUND_MAKE" = x; then
18326      if test "x$TOOLCHAIN_PATH" != x; then
18327        # We have a toolchain path, check that as well before giving up.
18328        OLD_PATH=$PATH
18329        PATH=$TOOLCHAIN_PATH:$PATH
18330        for ac_prog in gmake
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $CHECK_TOOLSDIR_GMAKE in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18363if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18365$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18373done
18374
18375
18376  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18377  DESCRIPTION="gmake in tools-dir"
18378
18379  # On Cygwin, we require a newer version of make than on other platforms
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    MAKE_VERSION_EXPR="-e 4\."
18382    MAKE_REQUIRED_VERSION="4.0"
18383   else
18384    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18385    MAKE_REQUIRED_VERSION="3.81"
18386  fi
18387
18388  if test "x$MAKE_CANDIDATE" != x; then
18389    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18390$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18391    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18392    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18393    if test "x$IS_GNU_MAKE" = x; then
18394      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18395$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18396    else
18397      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18398      if test "x$IS_MODERN_MAKE" = x; then
18399        { $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
18400$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;}
18401      else
18402        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18403          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18404            MAKE_EXPECTED_ENV='cygwin'
18405          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406            MAKE_EXPECTED_ENV='msys'
18407          else
18408            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18409          fi
18410          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18411          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18412        else
18413          # Not relevant for non-Windows
18414          IS_MAKE_CORRECT_ENV=true
18415        fi
18416        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18417          { $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
18418$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;}
18419        else
18420          FOUND_MAKE=$MAKE_CANDIDATE
18421
18422  # Only process if variable expands to non-empty
18423
18424  if test "x$FOUND_MAKE" != x; then
18425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426
18427  # First separate the path from the arguments. This will split at the first
18428  # space.
18429  complete="$FOUND_MAKE"
18430  path="${complete%% *}"
18431  tmp="$complete EOL"
18432  arguments="${tmp#* }"
18433
18434  # Input might be given as Windows format, start by converting to
18435  # unix format.
18436  new_path=`$CYGPATH -u "$path"`
18437
18438  # Now try to locate executable using which
18439  new_path=`$WHICH "$new_path" 2> /dev/null`
18440  # bat and cmd files are not always considered executable in cygwin causing which
18441  # to not find them
18442  if test "x$new_path" = x \
18443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445    new_path=`$CYGPATH -u "$path"`
18446  fi
18447  if test "x$new_path" = x; then
18448    # Oops. Which didn't find the executable.
18449    # The splitting of arguments from the executable at a space might have been incorrect,
18450    # since paths with space are more likely in Windows. Give it another try with the whole
18451    # argument.
18452    path="$complete"
18453    arguments="EOL"
18454    new_path=`$CYGPATH -u "$path"`
18455    new_path=`$WHICH "$new_path" 2> /dev/null`
18456    # bat and cmd files are not always considered executable in cygwin causing which
18457    # to not find them
18458    if test "x$new_path" = x \
18459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18461      new_path=`$CYGPATH -u "$path"`
18462    fi
18463    if test "x$new_path" = x; then
18464      # It's still not found. Now this is an unrecoverable error.
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18466$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18467      has_space=`$ECHO "$complete" | $GREP " "`
18468      if test "x$has_space" != x; then
18469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18471      fi
18472      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473    fi
18474  fi
18475
18476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18479  # "foo.exe" is OK but "foo" is an error.
18480  #
18481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18482  # It is also a way to make sure we got the proper file name for the real test later on.
18483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18484  if test "x$test_shortpath" = x; then
18485    # Short path failed, file does not exist as specified.
18486    # Try adding .exe or .cmd
18487    if test -f "${new_path}.exe"; then
18488      input_to_shortpath="${new_path}.exe"
18489    elif test -f "${new_path}.cmd"; then
18490      input_to_shortpath="${new_path}.cmd"
18491    else
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18497    fi
18498  else
18499    input_to_shortpath="$new_path"
18500  fi
18501
18502  # Call helper function which possibly converts this using DOS-style short mode.
18503  # If so, the updated path is stored in $new_path.
18504  new_path="$input_to_shortpath"
18505
18506  input_path="$input_to_shortpath"
18507  # Check if we need to convert this using DOS-style short mode. If the path
18508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18509  # take no chances and rewrite it.
18510  # Note: m4 eats our [], so we need to use [ and ] instead.
18511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18512  if test "x$has_forbidden_chars" != x; then
18513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18517      # Going to short mode and back again did indeed matter. Since short mode is
18518      # case insensitive, let's make it lowercase to improve readability.
18519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18520      # Now convert it back to Unix-style (cygpath)
18521      input_path=`$CYGPATH -u "$shortmode_path"`
18522      new_path="$input_path"
18523    fi
18524  fi
18525
18526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18527  if test "x$test_cygdrive_prefix" = x; then
18528    # As a simple fix, exclude /usr/bin since it's not a real path.
18529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18531      # a path prefixed by /cygdrive for fixpath to work.
18532      new_path="$CYGWIN_ROOT_PATH$input_path"
18533    fi
18534  fi
18535
18536  # remove trailing .exe if any
18537  new_path="${new_path/%.exe/}"
18538
18539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540
18541  # First separate the path from the arguments. This will split at the first
18542  # space.
18543  complete="$FOUND_MAKE"
18544  path="${complete%% *}"
18545  tmp="$complete EOL"
18546  arguments="${tmp#* }"
18547
18548  # Input might be given as Windows format, start by converting to
18549  # unix format.
18550  new_path="$path"
18551
18552  windows_path="$new_path"
18553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554    unix_path=`$CYGPATH -u "$windows_path"`
18555    new_path="$unix_path"
18556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18558    new_path="$unix_path"
18559  fi
18560
18561
18562  # Now try to locate executable using which
18563  new_path=`$WHICH "$new_path" 2> /dev/null`
18564
18565  if test "x$new_path" = x; then
18566    # Oops. Which didn't find the executable.
18567    # The splitting of arguments from the executable at a space might have been incorrect,
18568    # since paths with space are more likely in Windows. Give it another try with the whole
18569    # argument.
18570    path="$complete"
18571    arguments="EOL"
18572    new_path="$path"
18573
18574  windows_path="$new_path"
18575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576    unix_path=`$CYGPATH -u "$windows_path"`
18577    new_path="$unix_path"
18578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580    new_path="$unix_path"
18581  fi
18582
18583
18584    new_path=`$WHICH "$new_path" 2> /dev/null`
18585    # bat and cmd files are not always considered executable in MSYS causing which
18586    # to not find them
18587    if test "x$new_path" = x \
18588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18590      new_path="$path"
18591
18592  windows_path="$new_path"
18593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18594    unix_path=`$CYGPATH -u "$windows_path"`
18595    new_path="$unix_path"
18596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18598    new_path="$unix_path"
18599  fi
18600
18601    fi
18602
18603    if test "x$new_path" = x; then
18604      # It's still not found. Now this is an unrecoverable error.
18605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18607      has_space=`$ECHO "$complete" | $GREP " "`
18608      if test "x$has_space" != x; then
18609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18611      fi
18612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18613    fi
18614  fi
18615
18616  # Now new_path has a complete unix path to the binary
18617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18618    # Keep paths in /bin as-is, but remove trailing .exe if any
18619    new_path="${new_path/%.exe/}"
18620    # Do not save /bin paths to all_fixpath_prefixes!
18621  else
18622    # Not in mixed or Windows style, start by that.
18623    new_path=`cmd //c echo $new_path`
18624
18625  input_path="$new_path"
18626  # Check if we need to convert this using DOS-style short mode. If the path
18627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18628  # take no chances and rewrite it.
18629  # Note: m4 eats our [], so we need to use [ and ] instead.
18630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18631  if test "x$has_forbidden_chars" != x; then
18632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18634  fi
18635
18636    # Output is in $new_path
18637
18638  windows_path="$new_path"
18639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18640    unix_path=`$CYGPATH -u "$windows_path"`
18641    new_path="$unix_path"
18642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18644    new_path="$unix_path"
18645  fi
18646
18647    # remove trailing .exe if any
18648    new_path="${new_path/%.exe/}"
18649
18650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18652  fi
18653
18654    else
18655      # We're on a unix platform. Hooray! :)
18656      # First separate the path from the arguments. This will split at the first
18657      # space.
18658      complete="$FOUND_MAKE"
18659      path="${complete%% *}"
18660      tmp="$complete EOL"
18661      arguments="${tmp#* }"
18662
18663      # Cannot rely on the command "which" here since it doesn't always work.
18664      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18665      if test -z "$is_absolute_path"; then
18666        # Path to executable is not absolute. Find it.
18667        IFS_save="$IFS"
18668        IFS=:
18669        for p in $PATH; do
18670          if test -f "$p/$path" && test -x "$p/$path"; then
18671            new_path="$p/$path"
18672            break
18673          fi
18674        done
18675        IFS="$IFS_save"
18676      else
18677        # This is an absolute path, we can use it without further modifications.
18678        new_path="$path"
18679      fi
18680
18681      if test "x$new_path" = x; then
18682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18683$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18684        has_space=`$ECHO "$complete" | $GREP " "`
18685        if test "x$has_space" != x; then
18686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18688        fi
18689        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18690      fi
18691    fi
18692
18693    # Now join together the path and the arguments once again
18694    if test "x$arguments" != xEOL; then
18695      new_complete="$new_path ${arguments% *}"
18696    else
18697      new_complete="$new_path"
18698    fi
18699
18700    if test "x$complete" != "x$new_complete"; then
18701      FOUND_MAKE="$new_complete"
18702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18703$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18704    fi
18705  fi
18706
18707        fi
18708      fi
18709    fi
18710  fi
18711
18712        if test "x$FOUND_MAKE" = x; then
18713          for ac_prog in make
18714do
18715  # Extract the first word of "$ac_prog", so it can be a program name with args.
18716set dummy $ac_prog; ac_word=$2
18717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18718$as_echo_n "checking for $ac_word... " >&6; }
18719if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18720  $as_echo_n "(cached) " >&6
18721else
18722  case $CHECK_TOOLSDIR_MAKE in
18723  [\\/]* | ?:[\\/]*)
18724  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18725  ;;
18726  *)
18727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18728for as_dir in $PATH
18729do
18730  IFS=$as_save_IFS
18731  test -z "$as_dir" && as_dir=.
18732    for ac_exec_ext in '' $ac_executable_extensions; do
18733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18734    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18736    break 2
18737  fi
18738done
18739  done
18740IFS=$as_save_IFS
18741
18742  ;;
18743esac
18744fi
18745CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18746if test -n "$CHECK_TOOLSDIR_MAKE"; then
18747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18748$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18749else
18750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18751$as_echo "no" >&6; }
18752fi
18753
18754
18755  test -n "$CHECK_TOOLSDIR_MAKE" && break
18756done
18757
18758
18759  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18760  DESCRIPTION="make in tools-dir"
18761
18762  # On Cygwin, we require a newer version of make than on other platforms
18763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764    MAKE_VERSION_EXPR="-e 4\."
18765    MAKE_REQUIRED_VERSION="4.0"
18766   else
18767    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18768    MAKE_REQUIRED_VERSION="3.81"
18769  fi
18770
18771  if test "x$MAKE_CANDIDATE" != x; then
18772    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18773$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18774    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18775    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18776    if test "x$IS_GNU_MAKE" = x; then
18777      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18778$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18779    else
18780      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18781      if test "x$IS_MODERN_MAKE" = x; then
18782        { $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
18783$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;}
18784      else
18785        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18786          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18787            MAKE_EXPECTED_ENV='cygwin'
18788          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18789            MAKE_EXPECTED_ENV='msys'
18790          else
18791            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18792          fi
18793          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18794          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18795        else
18796          # Not relevant for non-Windows
18797          IS_MAKE_CORRECT_ENV=true
18798        fi
18799        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18800          { $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
18801$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;}
18802        else
18803          FOUND_MAKE=$MAKE_CANDIDATE
18804
18805  # Only process if variable expands to non-empty
18806
18807  if test "x$FOUND_MAKE" != x; then
18808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809
18810  # First separate the path from the arguments. This will split at the first
18811  # space.
18812  complete="$FOUND_MAKE"
18813  path="${complete%% *}"
18814  tmp="$complete EOL"
18815  arguments="${tmp#* }"
18816
18817  # Input might be given as Windows format, start by converting to
18818  # unix format.
18819  new_path=`$CYGPATH -u "$path"`
18820
18821  # Now try to locate executable using which
18822  new_path=`$WHICH "$new_path" 2> /dev/null`
18823  # bat and cmd files are not always considered executable in cygwin causing which
18824  # to not find them
18825  if test "x$new_path" = x \
18826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828    new_path=`$CYGPATH -u "$path"`
18829  fi
18830  if test "x$new_path" = x; then
18831    # Oops. Which didn't find the executable.
18832    # The splitting of arguments from the executable at a space might have been incorrect,
18833    # since paths with space are more likely in Windows. Give it another try with the whole
18834    # argument.
18835    path="$complete"
18836    arguments="EOL"
18837    new_path=`$CYGPATH -u "$path"`
18838    new_path=`$WHICH "$new_path" 2> /dev/null`
18839    # bat and cmd files are not always considered executable in cygwin causing which
18840    # to not find them
18841    if test "x$new_path" = x \
18842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18844      new_path=`$CYGPATH -u "$path"`
18845    fi
18846    if test "x$new_path" = x; then
18847      # It's still not found. Now this is an unrecoverable error.
18848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18850      has_space=`$ECHO "$complete" | $GREP " "`
18851      if test "x$has_space" != x; then
18852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18854      fi
18855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856    fi
18857  fi
18858
18859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18862  # "foo.exe" is OK but "foo" is an error.
18863  #
18864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18865  # It is also a way to make sure we got the proper file name for the real test later on.
18866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18867  if test "x$test_shortpath" = x; then
18868    # Short path failed, file does not exist as specified.
18869    # Try adding .exe or .cmd
18870    if test -f "${new_path}.exe"; then
18871      input_to_shortpath="${new_path}.exe"
18872    elif test -f "${new_path}.cmd"; then
18873      input_to_shortpath="${new_path}.cmd"
18874    else
18875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18879      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18880    fi
18881  else
18882    input_to_shortpath="$new_path"
18883  fi
18884
18885  # Call helper function which possibly converts this using DOS-style short mode.
18886  # If so, the updated path is stored in $new_path.
18887  new_path="$input_to_shortpath"
18888
18889  input_path="$input_to_shortpath"
18890  # Check if we need to convert this using DOS-style short mode. If the path
18891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18892  # take no chances and rewrite it.
18893  # Note: m4 eats our [], so we need to use [ and ] instead.
18894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18895  if test "x$has_forbidden_chars" != x; then
18896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18900      # Going to short mode and back again did indeed matter. Since short mode is
18901      # case insensitive, let's make it lowercase to improve readability.
18902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18903      # Now convert it back to Unix-style (cygpath)
18904      input_path=`$CYGPATH -u "$shortmode_path"`
18905      new_path="$input_path"
18906    fi
18907  fi
18908
18909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18910  if test "x$test_cygdrive_prefix" = x; then
18911    # As a simple fix, exclude /usr/bin since it's not a real path.
18912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18914      # a path prefixed by /cygdrive for fixpath to work.
18915      new_path="$CYGWIN_ROOT_PATH$input_path"
18916    fi
18917  fi
18918
18919  # remove trailing .exe if any
18920  new_path="${new_path/%.exe/}"
18921
18922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18923
18924  # First separate the path from the arguments. This will split at the first
18925  # space.
18926  complete="$FOUND_MAKE"
18927  path="${complete%% *}"
18928  tmp="$complete EOL"
18929  arguments="${tmp#* }"
18930
18931  # Input might be given as Windows format, start by converting to
18932  # unix format.
18933  new_path="$path"
18934
18935  windows_path="$new_path"
18936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937    unix_path=`$CYGPATH -u "$windows_path"`
18938    new_path="$unix_path"
18939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18941    new_path="$unix_path"
18942  fi
18943
18944
18945  # Now try to locate executable using which
18946  new_path=`$WHICH "$new_path" 2> /dev/null`
18947
18948  if test "x$new_path" = x; then
18949    # Oops. Which didn't find the executable.
18950    # The splitting of arguments from the executable at a space might have been incorrect,
18951    # since paths with space are more likely in Windows. Give it another try with the whole
18952    # argument.
18953    path="$complete"
18954    arguments="EOL"
18955    new_path="$path"
18956
18957  windows_path="$new_path"
18958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959    unix_path=`$CYGPATH -u "$windows_path"`
18960    new_path="$unix_path"
18961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18963    new_path="$unix_path"
18964  fi
18965
18966
18967    new_path=`$WHICH "$new_path" 2> /dev/null`
18968    # bat and cmd files are not always considered executable in MSYS causing which
18969    # to not find them
18970    if test "x$new_path" = x \
18971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18973      new_path="$path"
18974
18975  windows_path="$new_path"
18976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18977    unix_path=`$CYGPATH -u "$windows_path"`
18978    new_path="$unix_path"
18979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18981    new_path="$unix_path"
18982  fi
18983
18984    fi
18985
18986    if test "x$new_path" = x; then
18987      # It's still not found. Now this is an unrecoverable error.
18988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18990      has_space=`$ECHO "$complete" | $GREP " "`
18991      if test "x$has_space" != x; then
18992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18994      fi
18995      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18996    fi
18997  fi
18998
18999  # Now new_path has a complete unix path to the binary
19000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19001    # Keep paths in /bin as-is, but remove trailing .exe if any
19002    new_path="${new_path/%.exe/}"
19003    # Do not save /bin paths to all_fixpath_prefixes!
19004  else
19005    # Not in mixed or Windows style, start by that.
19006    new_path=`cmd //c echo $new_path`
19007
19008  input_path="$new_path"
19009  # Check if we need to convert this using DOS-style short mode. If the path
19010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19011  # take no chances and rewrite it.
19012  # Note: m4 eats our [], so we need to use [ and ] instead.
19013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19014  if test "x$has_forbidden_chars" != x; then
19015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19017  fi
19018
19019    # Output is in $new_path
19020
19021  windows_path="$new_path"
19022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19023    unix_path=`$CYGPATH -u "$windows_path"`
19024    new_path="$unix_path"
19025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19027    new_path="$unix_path"
19028  fi
19029
19030    # remove trailing .exe if any
19031    new_path="${new_path/%.exe/}"
19032
19033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19035  fi
19036
19037    else
19038      # We're on a unix platform. Hooray! :)
19039      # First separate the path from the arguments. This will split at the first
19040      # space.
19041      complete="$FOUND_MAKE"
19042      path="${complete%% *}"
19043      tmp="$complete EOL"
19044      arguments="${tmp#* }"
19045
19046      # Cannot rely on the command "which" here since it doesn't always work.
19047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19048      if test -z "$is_absolute_path"; then
19049        # Path to executable is not absolute. Find it.
19050        IFS_save="$IFS"
19051        IFS=:
19052        for p in $PATH; do
19053          if test -f "$p/$path" && test -x "$p/$path"; then
19054            new_path="$p/$path"
19055            break
19056          fi
19057        done
19058        IFS="$IFS_save"
19059      else
19060        # This is an absolute path, we can use it without further modifications.
19061        new_path="$path"
19062      fi
19063
19064      if test "x$new_path" = x; then
19065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19067        has_space=`$ECHO "$complete" | $GREP " "`
19068        if test "x$has_space" != x; then
19069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19071        fi
19072        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19073      fi
19074    fi
19075
19076    # Now join together the path and the arguments once again
19077    if test "x$arguments" != xEOL; then
19078      new_complete="$new_path ${arguments% *}"
19079    else
19080      new_complete="$new_path"
19081    fi
19082
19083    if test "x$complete" != "x$new_complete"; then
19084      FOUND_MAKE="$new_complete"
19085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19086$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19087    fi
19088  fi
19089
19090        fi
19091      fi
19092    fi
19093  fi
19094
19095        fi
19096        PATH=$OLD_PATH
19097      fi
19098    fi
19099
19100    if test "x$FOUND_MAKE" = x; then
19101      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
19102    fi
19103
19104  else
19105    # The variable is set, but is it from the command line or the environment?
19106
19107    # Try to remove the string !MAKE! from our list.
19108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19110      # If it failed, the variable was not from the command line. Ignore it,
19111      # but warn the user (except for BASH, which is always set by the calling BASH).
19112      if test "xMAKE" != xBASH; then
19113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19114$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19115      fi
19116      # Try to locate tool using the code snippet
19117
19118    # Try our hardest to locate a correct version of GNU make
19119    for ac_prog in gmake
19120do
19121  # Extract the first word of "$ac_prog", so it can be a program name with args.
19122set dummy $ac_prog; ac_word=$2
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124$as_echo_n "checking for $ac_word... " >&6; }
19125if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19126  $as_echo_n "(cached) " >&6
19127else
19128  case $CHECK_GMAKE in
19129  [\\/]* | ?:[\\/]*)
19130  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19131  ;;
19132  *)
19133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134for as_dir in $PATH
19135do
19136  IFS=$as_save_IFS
19137  test -z "$as_dir" && as_dir=.
19138    for ac_exec_ext in '' $ac_executable_extensions; do
19139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142    break 2
19143  fi
19144done
19145  done
19146IFS=$as_save_IFS
19147
19148  ;;
19149esac
19150fi
19151CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19152if test -n "$CHECK_GMAKE"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19154$as_echo "$CHECK_GMAKE" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$CHECK_GMAKE" && break
19162done
19163
19164
19165  MAKE_CANDIDATE=""$CHECK_GMAKE""
19166  DESCRIPTION="gmake in PATH"
19167
19168  # On Cygwin, we require a newer version of make than on other platforms
19169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19170    MAKE_VERSION_EXPR="-e 4\."
19171    MAKE_REQUIRED_VERSION="4.0"
19172   else
19173    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19174    MAKE_REQUIRED_VERSION="3.81"
19175  fi
19176
19177  if test "x$MAKE_CANDIDATE" != x; then
19178    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19179$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19180    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19181    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19182    if test "x$IS_GNU_MAKE" = x; then
19183      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19184$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19185    else
19186      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19187      if test "x$IS_MODERN_MAKE" = x; then
19188        { $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
19189$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;}
19190      else
19191        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19192          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193            MAKE_EXPECTED_ENV='cygwin'
19194          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195            MAKE_EXPECTED_ENV='msys'
19196          else
19197            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19198          fi
19199          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19200          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19201        else
19202          # Not relevant for non-Windows
19203          IS_MAKE_CORRECT_ENV=true
19204        fi
19205        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19206          { $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
19207$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;}
19208        else
19209          FOUND_MAKE=$MAKE_CANDIDATE
19210
19211  # Only process if variable expands to non-empty
19212
19213  if test "x$FOUND_MAKE" != x; then
19214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215
19216  # First separate the path from the arguments. This will split at the first
19217  # space.
19218  complete="$FOUND_MAKE"
19219  path="${complete%% *}"
19220  tmp="$complete EOL"
19221  arguments="${tmp#* }"
19222
19223  # Input might be given as Windows format, start by converting to
19224  # unix format.
19225  new_path=`$CYGPATH -u "$path"`
19226
19227  # Now try to locate executable using which
19228  new_path=`$WHICH "$new_path" 2> /dev/null`
19229  # bat and cmd files are not always considered executable in cygwin causing which
19230  # to not find them
19231  if test "x$new_path" = x \
19232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19234    new_path=`$CYGPATH -u "$path"`
19235  fi
19236  if test "x$new_path" = x; then
19237    # Oops. Which didn't find the executable.
19238    # The splitting of arguments from the executable at a space might have been incorrect,
19239    # since paths with space are more likely in Windows. Give it another try with the whole
19240    # argument.
19241    path="$complete"
19242    arguments="EOL"
19243    new_path=`$CYGPATH -u "$path"`
19244    new_path=`$WHICH "$new_path" 2> /dev/null`
19245    # bat and cmd files are not always considered executable in cygwin causing which
19246    # to not find them
19247    if test "x$new_path" = x \
19248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19250      new_path=`$CYGPATH -u "$path"`
19251    fi
19252    if test "x$new_path" = x; then
19253      # It's still not found. Now this is an unrecoverable error.
19254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19256      has_space=`$ECHO "$complete" | $GREP " "`
19257      if test "x$has_space" != x; then
19258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19260      fi
19261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262    fi
19263  fi
19264
19265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19268  # "foo.exe" is OK but "foo" is an error.
19269  #
19270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19271  # It is also a way to make sure we got the proper file name for the real test later on.
19272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19273  if test "x$test_shortpath" = x; then
19274    # Short path failed, file does not exist as specified.
19275    # Try adding .exe or .cmd
19276    if test -f "${new_path}.exe"; then
19277      input_to_shortpath="${new_path}.exe"
19278    elif test -f "${new_path}.cmd"; then
19279      input_to_shortpath="${new_path}.cmd"
19280    else
19281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19282$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19285      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19286    fi
19287  else
19288    input_to_shortpath="$new_path"
19289  fi
19290
19291  # Call helper function which possibly converts this using DOS-style short mode.
19292  # If so, the updated path is stored in $new_path.
19293  new_path="$input_to_shortpath"
19294
19295  input_path="$input_to_shortpath"
19296  # Check if we need to convert this using DOS-style short mode. If the path
19297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19298  # take no chances and rewrite it.
19299  # Note: m4 eats our [], so we need to use [ and ] instead.
19300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19301  if test "x$has_forbidden_chars" != x; then
19302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19306      # Going to short mode and back again did indeed matter. Since short mode is
19307      # case insensitive, let's make it lowercase to improve readability.
19308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19309      # Now convert it back to Unix-style (cygpath)
19310      input_path=`$CYGPATH -u "$shortmode_path"`
19311      new_path="$input_path"
19312    fi
19313  fi
19314
19315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19316  if test "x$test_cygdrive_prefix" = x; then
19317    # As a simple fix, exclude /usr/bin since it's not a real path.
19318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19320      # a path prefixed by /cygdrive for fixpath to work.
19321      new_path="$CYGWIN_ROOT_PATH$input_path"
19322    fi
19323  fi
19324
19325  # remove trailing .exe if any
19326  new_path="${new_path/%.exe/}"
19327
19328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19329
19330  # First separate the path from the arguments. This will split at the first
19331  # space.
19332  complete="$FOUND_MAKE"
19333  path="${complete%% *}"
19334  tmp="$complete EOL"
19335  arguments="${tmp#* }"
19336
19337  # Input might be given as Windows format, start by converting to
19338  # unix format.
19339  new_path="$path"
19340
19341  windows_path="$new_path"
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343    unix_path=`$CYGPATH -u "$windows_path"`
19344    new_path="$unix_path"
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347    new_path="$unix_path"
19348  fi
19349
19350
19351  # Now try to locate executable using which
19352  new_path=`$WHICH "$new_path" 2> /dev/null`
19353
19354  if test "x$new_path" = x; then
19355    # Oops. Which didn't find the executable.
19356    # The splitting of arguments from the executable at a space might have been incorrect,
19357    # since paths with space are more likely in Windows. Give it another try with the whole
19358    # argument.
19359    path="$complete"
19360    arguments="EOL"
19361    new_path="$path"
19362
19363  windows_path="$new_path"
19364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19365    unix_path=`$CYGPATH -u "$windows_path"`
19366    new_path="$unix_path"
19367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19369    new_path="$unix_path"
19370  fi
19371
19372
19373    new_path=`$WHICH "$new_path" 2> /dev/null`
19374    # bat and cmd files are not always considered executable in MSYS causing which
19375    # to not find them
19376    if test "x$new_path" = x \
19377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19379      new_path="$path"
19380
19381  windows_path="$new_path"
19382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19383    unix_path=`$CYGPATH -u "$windows_path"`
19384    new_path="$unix_path"
19385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19387    new_path="$unix_path"
19388  fi
19389
19390    fi
19391
19392    if test "x$new_path" = x; then
19393      # It's still not found. Now this is an unrecoverable error.
19394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19396      has_space=`$ECHO "$complete" | $GREP " "`
19397      if test "x$has_space" != x; then
19398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19400      fi
19401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19402    fi
19403  fi
19404
19405  # Now new_path has a complete unix path to the binary
19406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19407    # Keep paths in /bin as-is, but remove trailing .exe if any
19408    new_path="${new_path/%.exe/}"
19409    # Do not save /bin paths to all_fixpath_prefixes!
19410  else
19411    # Not in mixed or Windows style, start by that.
19412    new_path=`cmd //c echo $new_path`
19413
19414  input_path="$new_path"
19415  # Check if we need to convert this using DOS-style short mode. If the path
19416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19417  # take no chances and rewrite it.
19418  # Note: m4 eats our [], so we need to use [ and ] instead.
19419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19420  if test "x$has_forbidden_chars" != x; then
19421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19423  fi
19424
19425    # Output is in $new_path
19426
19427  windows_path="$new_path"
19428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19429    unix_path=`$CYGPATH -u "$windows_path"`
19430    new_path="$unix_path"
19431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19433    new_path="$unix_path"
19434  fi
19435
19436    # remove trailing .exe if any
19437    new_path="${new_path/%.exe/}"
19438
19439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19441  fi
19442
19443    else
19444      # We're on a unix platform. Hooray! :)
19445      # First separate the path from the arguments. This will split at the first
19446      # space.
19447      complete="$FOUND_MAKE"
19448      path="${complete%% *}"
19449      tmp="$complete EOL"
19450      arguments="${tmp#* }"
19451
19452      # Cannot rely on the command "which" here since it doesn't always work.
19453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19454      if test -z "$is_absolute_path"; then
19455        # Path to executable is not absolute. Find it.
19456        IFS_save="$IFS"
19457        IFS=:
19458        for p in $PATH; do
19459          if test -f "$p/$path" && test -x "$p/$path"; then
19460            new_path="$p/$path"
19461            break
19462          fi
19463        done
19464        IFS="$IFS_save"
19465      else
19466        # This is an absolute path, we can use it without further modifications.
19467        new_path="$path"
19468      fi
19469
19470      if test "x$new_path" = x; then
19471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19472$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19473        has_space=`$ECHO "$complete" | $GREP " "`
19474        if test "x$has_space" != x; then
19475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19477        fi
19478        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19479      fi
19480    fi
19481
19482    # Now join together the path and the arguments once again
19483    if test "x$arguments" != xEOL; then
19484      new_complete="$new_path ${arguments% *}"
19485    else
19486      new_complete="$new_path"
19487    fi
19488
19489    if test "x$complete" != "x$new_complete"; then
19490      FOUND_MAKE="$new_complete"
19491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19492$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19493    fi
19494  fi
19495
19496        fi
19497      fi
19498    fi
19499  fi
19500
19501
19502    if test "x$FOUND_MAKE" = x; then
19503      for ac_prog in make
19504do
19505  # Extract the first word of "$ac_prog", so it can be a program name with args.
19506set dummy $ac_prog; ac_word=$2
19507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19508$as_echo_n "checking for $ac_word... " >&6; }
19509if ${ac_cv_path_CHECK_MAKE+:} false; then :
19510  $as_echo_n "(cached) " >&6
19511else
19512  case $CHECK_MAKE in
19513  [\\/]* | ?:[\\/]*)
19514  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19515  ;;
19516  *)
19517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19518for as_dir in $PATH
19519do
19520  IFS=$as_save_IFS
19521  test -z "$as_dir" && as_dir=.
19522    for ac_exec_ext in '' $ac_executable_extensions; do
19523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19524    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19526    break 2
19527  fi
19528done
19529  done
19530IFS=$as_save_IFS
19531
19532  ;;
19533esac
19534fi
19535CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19536if test -n "$CHECK_MAKE"; then
19537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19538$as_echo "$CHECK_MAKE" >&6; }
19539else
19540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19541$as_echo "no" >&6; }
19542fi
19543
19544
19545  test -n "$CHECK_MAKE" && break
19546done
19547
19548
19549  MAKE_CANDIDATE=""$CHECK_MAKE""
19550  DESCRIPTION="make in PATH"
19551
19552  # On Cygwin, we require a newer version of make than on other platforms
19553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554    MAKE_VERSION_EXPR="-e 4\."
19555    MAKE_REQUIRED_VERSION="4.0"
19556   else
19557    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19558    MAKE_REQUIRED_VERSION="3.81"
19559  fi
19560
19561  if test "x$MAKE_CANDIDATE" != x; then
19562    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19563$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19564    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19565    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19566    if test "x$IS_GNU_MAKE" = x; then
19567      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19568$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19569    else
19570      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19571      if test "x$IS_MODERN_MAKE" = x; then
19572        { $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
19573$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;}
19574      else
19575        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19576          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577            MAKE_EXPECTED_ENV='cygwin'
19578          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19579            MAKE_EXPECTED_ENV='msys'
19580          else
19581            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19582          fi
19583          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19584          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19585        else
19586          # Not relevant for non-Windows
19587          IS_MAKE_CORRECT_ENV=true
19588        fi
19589        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19590          { $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
19591$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;}
19592        else
19593          FOUND_MAKE=$MAKE_CANDIDATE
19594
19595  # Only process if variable expands to non-empty
19596
19597  if test "x$FOUND_MAKE" != x; then
19598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599
19600  # First separate the path from the arguments. This will split at the first
19601  # space.
19602  complete="$FOUND_MAKE"
19603  path="${complete%% *}"
19604  tmp="$complete EOL"
19605  arguments="${tmp#* }"
19606
19607  # Input might be given as Windows format, start by converting to
19608  # unix format.
19609  new_path=`$CYGPATH -u "$path"`
19610
19611  # Now try to locate executable using which
19612  new_path=`$WHICH "$new_path" 2> /dev/null`
19613  # bat and cmd files are not always considered executable in cygwin causing which
19614  # to not find them
19615  if test "x$new_path" = x \
19616      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19617      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19618    new_path=`$CYGPATH -u "$path"`
19619  fi
19620  if test "x$new_path" = x; then
19621    # Oops. Which didn't find the executable.
19622    # The splitting of arguments from the executable at a space might have been incorrect,
19623    # since paths with space are more likely in Windows. Give it another try with the whole
19624    # argument.
19625    path="$complete"
19626    arguments="EOL"
19627    new_path=`$CYGPATH -u "$path"`
19628    new_path=`$WHICH "$new_path" 2> /dev/null`
19629    # bat and cmd files are not always considered executable in cygwin causing which
19630    # to not find them
19631    if test "x$new_path" = x \
19632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19634      new_path=`$CYGPATH -u "$path"`
19635    fi
19636    if test "x$new_path" = x; then
19637      # It's still not found. Now this is an unrecoverable error.
19638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19640      has_space=`$ECHO "$complete" | $GREP " "`
19641      if test "x$has_space" != x; then
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19644      fi
19645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646    fi
19647  fi
19648
19649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19652  # "foo.exe" is OK but "foo" is an error.
19653  #
19654  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19655  # It is also a way to make sure we got the proper file name for the real test later on.
19656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19657  if test "x$test_shortpath" = x; then
19658    # Short path failed, file does not exist as specified.
19659    # Try adding .exe or .cmd
19660    if test -f "${new_path}.exe"; then
19661      input_to_shortpath="${new_path}.exe"
19662    elif test -f "${new_path}.cmd"; then
19663      input_to_shortpath="${new_path}.cmd"
19664    else
19665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19670    fi
19671  else
19672    input_to_shortpath="$new_path"
19673  fi
19674
19675  # Call helper function which possibly converts this using DOS-style short mode.
19676  # If so, the updated path is stored in $new_path.
19677  new_path="$input_to_shortpath"
19678
19679  input_path="$input_to_shortpath"
19680  # Check if we need to convert this using DOS-style short mode. If the path
19681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19682  # take no chances and rewrite it.
19683  # Note: m4 eats our [], so we need to use [ and ] instead.
19684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19685  if test "x$has_forbidden_chars" != x; then
19686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19690      # Going to short mode and back again did indeed matter. Since short mode is
19691      # case insensitive, let's make it lowercase to improve readability.
19692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19693      # Now convert it back to Unix-style (cygpath)
19694      input_path=`$CYGPATH -u "$shortmode_path"`
19695      new_path="$input_path"
19696    fi
19697  fi
19698
19699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19700  if test "x$test_cygdrive_prefix" = x; then
19701    # As a simple fix, exclude /usr/bin since it's not a real path.
19702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19704      # a path prefixed by /cygdrive for fixpath to work.
19705      new_path="$CYGWIN_ROOT_PATH$input_path"
19706    fi
19707  fi
19708
19709  # remove trailing .exe if any
19710  new_path="${new_path/%.exe/}"
19711
19712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19713
19714  # First separate the path from the arguments. This will split at the first
19715  # space.
19716  complete="$FOUND_MAKE"
19717  path="${complete%% *}"
19718  tmp="$complete EOL"
19719  arguments="${tmp#* }"
19720
19721  # Input might be given as Windows format, start by converting to
19722  # unix format.
19723  new_path="$path"
19724
19725  windows_path="$new_path"
19726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727    unix_path=`$CYGPATH -u "$windows_path"`
19728    new_path="$unix_path"
19729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19731    new_path="$unix_path"
19732  fi
19733
19734
19735  # Now try to locate executable using which
19736  new_path=`$WHICH "$new_path" 2> /dev/null`
19737
19738  if test "x$new_path" = x; then
19739    # Oops. Which didn't find the executable.
19740    # The splitting of arguments from the executable at a space might have been incorrect,
19741    # since paths with space are more likely in Windows. Give it another try with the whole
19742    # argument.
19743    path="$complete"
19744    arguments="EOL"
19745    new_path="$path"
19746
19747  windows_path="$new_path"
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749    unix_path=`$CYGPATH -u "$windows_path"`
19750    new_path="$unix_path"
19751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19753    new_path="$unix_path"
19754  fi
19755
19756
19757    new_path=`$WHICH "$new_path" 2> /dev/null`
19758    # bat and cmd files are not always considered executable in MSYS causing which
19759    # to not find them
19760    if test "x$new_path" = x \
19761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19763      new_path="$path"
19764
19765  windows_path="$new_path"
19766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19767    unix_path=`$CYGPATH -u "$windows_path"`
19768    new_path="$unix_path"
19769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19771    new_path="$unix_path"
19772  fi
19773
19774    fi
19775
19776    if test "x$new_path" = x; then
19777      # It's still not found. Now this is an unrecoverable error.
19778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19779$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19780      has_space=`$ECHO "$complete" | $GREP " "`
19781      if test "x$has_space" != x; then
19782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19784      fi
19785      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19786    fi
19787  fi
19788
19789  # Now new_path has a complete unix path to the binary
19790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19791    # Keep paths in /bin as-is, but remove trailing .exe if any
19792    new_path="${new_path/%.exe/}"
19793    # Do not save /bin paths to all_fixpath_prefixes!
19794  else
19795    # Not in mixed or Windows style, start by that.
19796    new_path=`cmd //c echo $new_path`
19797
19798  input_path="$new_path"
19799  # Check if we need to convert this using DOS-style short mode. If the path
19800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19801  # take no chances and rewrite it.
19802  # Note: m4 eats our [], so we need to use [ and ] instead.
19803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19804  if test "x$has_forbidden_chars" != x; then
19805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19807  fi
19808
19809    # Output is in $new_path
19810
19811  windows_path="$new_path"
19812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19813    unix_path=`$CYGPATH -u "$windows_path"`
19814    new_path="$unix_path"
19815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19817    new_path="$unix_path"
19818  fi
19819
19820    # remove trailing .exe if any
19821    new_path="${new_path/%.exe/}"
19822
19823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19825  fi
19826
19827    else
19828      # We're on a unix platform. Hooray! :)
19829      # First separate the path from the arguments. This will split at the first
19830      # space.
19831      complete="$FOUND_MAKE"
19832      path="${complete%% *}"
19833      tmp="$complete EOL"
19834      arguments="${tmp#* }"
19835
19836      # Cannot rely on the command "which" here since it doesn't always work.
19837      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19838      if test -z "$is_absolute_path"; then
19839        # Path to executable is not absolute. Find it.
19840        IFS_save="$IFS"
19841        IFS=:
19842        for p in $PATH; do
19843          if test -f "$p/$path" && test -x "$p/$path"; then
19844            new_path="$p/$path"
19845            break
19846          fi
19847        done
19848        IFS="$IFS_save"
19849      else
19850        # This is an absolute path, we can use it without further modifications.
19851        new_path="$path"
19852      fi
19853
19854      if test "x$new_path" = x; then
19855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19857        has_space=`$ECHO "$complete" | $GREP " "`
19858        if test "x$has_space" != x; then
19859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19861        fi
19862        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19863      fi
19864    fi
19865
19866    # Now join together the path and the arguments once again
19867    if test "x$arguments" != xEOL; then
19868      new_complete="$new_path ${arguments% *}"
19869    else
19870      new_complete="$new_path"
19871    fi
19872
19873    if test "x$complete" != "x$new_complete"; then
19874      FOUND_MAKE="$new_complete"
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19876$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19877    fi
19878  fi
19879
19880        fi
19881      fi
19882    fi
19883  fi
19884
19885    fi
19886
19887    if test "x$FOUND_MAKE" = x; then
19888      if test "x$TOOLCHAIN_PATH" != x; then
19889        # We have a toolchain path, check that as well before giving up.
19890        OLD_PATH=$PATH
19891        PATH=$TOOLCHAIN_PATH:$PATH
19892        for ac_prog in gmake
19893do
19894  # Extract the first word of "$ac_prog", so it can be a program name with args.
19895set dummy $ac_prog; ac_word=$2
19896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19897$as_echo_n "checking for $ac_word... " >&6; }
19898if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19899  $as_echo_n "(cached) " >&6
19900else
19901  case $CHECK_TOOLSDIR_GMAKE in
19902  [\\/]* | ?:[\\/]*)
19903  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19904  ;;
19905  *)
19906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19907for as_dir in $PATH
19908do
19909  IFS=$as_save_IFS
19910  test -z "$as_dir" && as_dir=.
19911    for ac_exec_ext in '' $ac_executable_extensions; do
19912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19913    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19915    break 2
19916  fi
19917done
19918  done
19919IFS=$as_save_IFS
19920
19921  ;;
19922esac
19923fi
19924CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19925if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19927$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19928else
19929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19930$as_echo "no" >&6; }
19931fi
19932
19933
19934  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19935done
19936
19937
19938  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19939  DESCRIPTION="gmake in tools-dir"
19940
19941  # On Cygwin, we require a newer version of make than on other platforms
19942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943    MAKE_VERSION_EXPR="-e 4\."
19944    MAKE_REQUIRED_VERSION="4.0"
19945   else
19946    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19947    MAKE_REQUIRED_VERSION="3.81"
19948  fi
19949
19950  if test "x$MAKE_CANDIDATE" != x; then
19951    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19952$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19953    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19954    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19955    if test "x$IS_GNU_MAKE" = x; then
19956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19957$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19958    else
19959      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19960      if test "x$IS_MODERN_MAKE" = x; then
19961        { $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
19962$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;}
19963      else
19964        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19965          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966            MAKE_EXPECTED_ENV='cygwin'
19967          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968            MAKE_EXPECTED_ENV='msys'
19969          else
19970            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19971          fi
19972          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19973          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19974        else
19975          # Not relevant for non-Windows
19976          IS_MAKE_CORRECT_ENV=true
19977        fi
19978        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19979          { $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
19980$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;}
19981        else
19982          FOUND_MAKE=$MAKE_CANDIDATE
19983
19984  # Only process if variable expands to non-empty
19985
19986  if test "x$FOUND_MAKE" != x; then
19987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988
19989  # First separate the path from the arguments. This will split at the first
19990  # space.
19991  complete="$FOUND_MAKE"
19992  path="${complete%% *}"
19993  tmp="$complete EOL"
19994  arguments="${tmp#* }"
19995
19996  # Input might be given as Windows format, start by converting to
19997  # unix format.
19998  new_path=`$CYGPATH -u "$path"`
19999
20000  # Now try to locate executable using which
20001  new_path=`$WHICH "$new_path" 2> /dev/null`
20002  # bat and cmd files are not always considered executable in cygwin causing which
20003  # to not find them
20004  if test "x$new_path" = x \
20005      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007    new_path=`$CYGPATH -u "$path"`
20008  fi
20009  if test "x$new_path" = x; then
20010    # Oops. Which didn't find the executable.
20011    # The splitting of arguments from the executable at a space might have been incorrect,
20012    # since paths with space are more likely in Windows. Give it another try with the whole
20013    # argument.
20014    path="$complete"
20015    arguments="EOL"
20016    new_path=`$CYGPATH -u "$path"`
20017    new_path=`$WHICH "$new_path" 2> /dev/null`
20018    # bat and cmd files are not always considered executable in cygwin causing which
20019    # to not find them
20020    if test "x$new_path" = x \
20021        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20022        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20023      new_path=`$CYGPATH -u "$path"`
20024    fi
20025    if test "x$new_path" = x; then
20026      # It's still not found. Now this is an unrecoverable error.
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20028$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20029      has_space=`$ECHO "$complete" | $GREP " "`
20030      if test "x$has_space" != x; then
20031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20033      fi
20034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035    fi
20036  fi
20037
20038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20041  # "foo.exe" is OK but "foo" is an error.
20042  #
20043  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20044  # It is also a way to make sure we got the proper file name for the real test later on.
20045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20046  if test "x$test_shortpath" = x; then
20047    # Short path failed, file does not exist as specified.
20048    # Try adding .exe or .cmd
20049    if test -f "${new_path}.exe"; then
20050      input_to_shortpath="${new_path}.exe"
20051    elif test -f "${new_path}.cmd"; then
20052      input_to_shortpath="${new_path}.cmd"
20053    else
20054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20055$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20056      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20057$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20059    fi
20060  else
20061    input_to_shortpath="$new_path"
20062  fi
20063
20064  # Call helper function which possibly converts this using DOS-style short mode.
20065  # If so, the updated path is stored in $new_path.
20066  new_path="$input_to_shortpath"
20067
20068  input_path="$input_to_shortpath"
20069  # Check if we need to convert this using DOS-style short mode. If the path
20070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20071  # take no chances and rewrite it.
20072  # Note: m4 eats our [], so we need to use [ and ] instead.
20073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20074  if test "x$has_forbidden_chars" != x; then
20075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20079      # Going to short mode and back again did indeed matter. Since short mode is
20080      # case insensitive, let's make it lowercase to improve readability.
20081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20082      # Now convert it back to Unix-style (cygpath)
20083      input_path=`$CYGPATH -u "$shortmode_path"`
20084      new_path="$input_path"
20085    fi
20086  fi
20087
20088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20089  if test "x$test_cygdrive_prefix" = x; then
20090    # As a simple fix, exclude /usr/bin since it's not a real path.
20091    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20093      # a path prefixed by /cygdrive for fixpath to work.
20094      new_path="$CYGWIN_ROOT_PATH$input_path"
20095    fi
20096  fi
20097
20098  # remove trailing .exe if any
20099  new_path="${new_path/%.exe/}"
20100
20101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102
20103  # First separate the path from the arguments. This will split at the first
20104  # space.
20105  complete="$FOUND_MAKE"
20106  path="${complete%% *}"
20107  tmp="$complete EOL"
20108  arguments="${tmp#* }"
20109
20110  # Input might be given as Windows format, start by converting to
20111  # unix format.
20112  new_path="$path"
20113
20114  windows_path="$new_path"
20115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116    unix_path=`$CYGPATH -u "$windows_path"`
20117    new_path="$unix_path"
20118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20120    new_path="$unix_path"
20121  fi
20122
20123
20124  # Now try to locate executable using which
20125  new_path=`$WHICH "$new_path" 2> /dev/null`
20126
20127  if test "x$new_path" = x; then
20128    # Oops. Which didn't find the executable.
20129    # The splitting of arguments from the executable at a space might have been incorrect,
20130    # since paths with space are more likely in Windows. Give it another try with the whole
20131    # argument.
20132    path="$complete"
20133    arguments="EOL"
20134    new_path="$path"
20135
20136  windows_path="$new_path"
20137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138    unix_path=`$CYGPATH -u "$windows_path"`
20139    new_path="$unix_path"
20140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142    new_path="$unix_path"
20143  fi
20144
20145
20146    new_path=`$WHICH "$new_path" 2> /dev/null`
20147    # bat and cmd files are not always considered executable in MSYS causing which
20148    # to not find them
20149    if test "x$new_path" = x \
20150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20152      new_path="$path"
20153
20154  windows_path="$new_path"
20155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20156    unix_path=`$CYGPATH -u "$windows_path"`
20157    new_path="$unix_path"
20158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20160    new_path="$unix_path"
20161  fi
20162
20163    fi
20164
20165    if test "x$new_path" = x; then
20166      # It's still not found. Now this is an unrecoverable error.
20167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20168$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20169      has_space=`$ECHO "$complete" | $GREP " "`
20170      if test "x$has_space" != x; then
20171        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20172$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20173      fi
20174      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20175    fi
20176  fi
20177
20178  # Now new_path has a complete unix path to the binary
20179  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20180    # Keep paths in /bin as-is, but remove trailing .exe if any
20181    new_path="${new_path/%.exe/}"
20182    # Do not save /bin paths to all_fixpath_prefixes!
20183  else
20184    # Not in mixed or Windows style, start by that.
20185    new_path=`cmd //c echo $new_path`
20186
20187  input_path="$new_path"
20188  # Check if we need to convert this using DOS-style short mode. If the path
20189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20190  # take no chances and rewrite it.
20191  # Note: m4 eats our [], so we need to use [ and ] instead.
20192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20193  if test "x$has_forbidden_chars" != x; then
20194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20196  fi
20197
20198    # Output is in $new_path
20199
20200  windows_path="$new_path"
20201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20202    unix_path=`$CYGPATH -u "$windows_path"`
20203    new_path="$unix_path"
20204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20206    new_path="$unix_path"
20207  fi
20208
20209    # remove trailing .exe if any
20210    new_path="${new_path/%.exe/}"
20211
20212    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20213    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20214  fi
20215
20216    else
20217      # We're on a unix platform. Hooray! :)
20218      # First separate the path from the arguments. This will split at the first
20219      # space.
20220      complete="$FOUND_MAKE"
20221      path="${complete%% *}"
20222      tmp="$complete EOL"
20223      arguments="${tmp#* }"
20224
20225      # Cannot rely on the command "which" here since it doesn't always work.
20226      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20227      if test -z "$is_absolute_path"; then
20228        # Path to executable is not absolute. Find it.
20229        IFS_save="$IFS"
20230        IFS=:
20231        for p in $PATH; do
20232          if test -f "$p/$path" && test -x "$p/$path"; then
20233            new_path="$p/$path"
20234            break
20235          fi
20236        done
20237        IFS="$IFS_save"
20238      else
20239        # This is an absolute path, we can use it without further modifications.
20240        new_path="$path"
20241      fi
20242
20243      if test "x$new_path" = x; then
20244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20246        has_space=`$ECHO "$complete" | $GREP " "`
20247        if test "x$has_space" != x; then
20248          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20250        fi
20251        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20252      fi
20253    fi
20254
20255    # Now join together the path and the arguments once again
20256    if test "x$arguments" != xEOL; then
20257      new_complete="$new_path ${arguments% *}"
20258    else
20259      new_complete="$new_path"
20260    fi
20261
20262    if test "x$complete" != "x$new_complete"; then
20263      FOUND_MAKE="$new_complete"
20264      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20265$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20266    fi
20267  fi
20268
20269        fi
20270      fi
20271    fi
20272  fi
20273
20274        if test "x$FOUND_MAKE" = x; then
20275          for ac_prog in make
20276do
20277  # Extract the first word of "$ac_prog", so it can be a program name with args.
20278set dummy $ac_prog; ac_word=$2
20279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20280$as_echo_n "checking for $ac_word... " >&6; }
20281if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20282  $as_echo_n "(cached) " >&6
20283else
20284  case $CHECK_TOOLSDIR_MAKE in
20285  [\\/]* | ?:[\\/]*)
20286  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20287  ;;
20288  *)
20289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20290for as_dir in $PATH
20291do
20292  IFS=$as_save_IFS
20293  test -z "$as_dir" && as_dir=.
20294    for ac_exec_ext in '' $ac_executable_extensions; do
20295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20296    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20298    break 2
20299  fi
20300done
20301  done
20302IFS=$as_save_IFS
20303
20304  ;;
20305esac
20306fi
20307CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20308if test -n "$CHECK_TOOLSDIR_MAKE"; then
20309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20310$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20311else
20312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20313$as_echo "no" >&6; }
20314fi
20315
20316
20317  test -n "$CHECK_TOOLSDIR_MAKE" && break
20318done
20319
20320
20321  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20322  DESCRIPTION="make in tools-dir"
20323
20324  # On Cygwin, we require a newer version of make than on other platforms
20325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20326    MAKE_VERSION_EXPR="-e 4\."
20327    MAKE_REQUIRED_VERSION="4.0"
20328   else
20329    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20330    MAKE_REQUIRED_VERSION="3.81"
20331  fi
20332
20333  if test "x$MAKE_CANDIDATE" != x; then
20334    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20335$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20336    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20337    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20338    if test "x$IS_GNU_MAKE" = x; then
20339      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20340$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20341    else
20342      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20343      if test "x$IS_MODERN_MAKE" = x; then
20344        { $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
20345$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;}
20346      else
20347        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20348          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20349            MAKE_EXPECTED_ENV='cygwin'
20350          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20351            MAKE_EXPECTED_ENV='msys'
20352          else
20353            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20354          fi
20355          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20356          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20357        else
20358          # Not relevant for non-Windows
20359          IS_MAKE_CORRECT_ENV=true
20360        fi
20361        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20362          { $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
20363$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;}
20364        else
20365          FOUND_MAKE=$MAKE_CANDIDATE
20366
20367  # Only process if variable expands to non-empty
20368
20369  if test "x$FOUND_MAKE" != x; then
20370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371
20372  # First separate the path from the arguments. This will split at the first
20373  # space.
20374  complete="$FOUND_MAKE"
20375  path="${complete%% *}"
20376  tmp="$complete EOL"
20377  arguments="${tmp#* }"
20378
20379  # Input might be given as Windows format, start by converting to
20380  # unix format.
20381  new_path=`$CYGPATH -u "$path"`
20382
20383  # Now try to locate executable using which
20384  new_path=`$WHICH "$new_path" 2> /dev/null`
20385  # bat and cmd files are not always considered executable in cygwin causing which
20386  # to not find them
20387  if test "x$new_path" = x \
20388      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390    new_path=`$CYGPATH -u "$path"`
20391  fi
20392  if test "x$new_path" = x; then
20393    # Oops. Which didn't find the executable.
20394    # The splitting of arguments from the executable at a space might have been incorrect,
20395    # since paths with space are more likely in Windows. Give it another try with the whole
20396    # argument.
20397    path="$complete"
20398    arguments="EOL"
20399    new_path=`$CYGPATH -u "$path"`
20400    new_path=`$WHICH "$new_path" 2> /dev/null`
20401    # bat and cmd files are not always considered executable in cygwin causing which
20402    # to not find them
20403    if test "x$new_path" = x \
20404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20406      new_path=`$CYGPATH -u "$path"`
20407    fi
20408    if test "x$new_path" = x; then
20409      # It's still not found. Now this is an unrecoverable error.
20410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20412      has_space=`$ECHO "$complete" | $GREP " "`
20413      if test "x$has_space" != x; then
20414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20416      fi
20417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418    fi
20419  fi
20420
20421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20424  # "foo.exe" is OK but "foo" is an error.
20425  #
20426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20427  # It is also a way to make sure we got the proper file name for the real test later on.
20428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20429  if test "x$test_shortpath" = x; then
20430    # Short path failed, file does not exist as specified.
20431    # Try adding .exe or .cmd
20432    if test -f "${new_path}.exe"; then
20433      input_to_shortpath="${new_path}.exe"
20434    elif test -f "${new_path}.cmd"; then
20435      input_to_shortpath="${new_path}.cmd"
20436    else
20437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20442    fi
20443  else
20444    input_to_shortpath="$new_path"
20445  fi
20446
20447  # Call helper function which possibly converts this using DOS-style short mode.
20448  # If so, the updated path is stored in $new_path.
20449  new_path="$input_to_shortpath"
20450
20451  input_path="$input_to_shortpath"
20452  # Check if we need to convert this using DOS-style short mode. If the path
20453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20454  # take no chances and rewrite it.
20455  # Note: m4 eats our [], so we need to use [ and ] instead.
20456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20457  if test "x$has_forbidden_chars" != x; then
20458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20462      # Going to short mode and back again did indeed matter. Since short mode is
20463      # case insensitive, let's make it lowercase to improve readability.
20464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20465      # Now convert it back to Unix-style (cygpath)
20466      input_path=`$CYGPATH -u "$shortmode_path"`
20467      new_path="$input_path"
20468    fi
20469  fi
20470
20471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20472  if test "x$test_cygdrive_prefix" = x; then
20473    # As a simple fix, exclude /usr/bin since it's not a real path.
20474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20476      # a path prefixed by /cygdrive for fixpath to work.
20477      new_path="$CYGWIN_ROOT_PATH$input_path"
20478    fi
20479  fi
20480
20481  # remove trailing .exe if any
20482  new_path="${new_path/%.exe/}"
20483
20484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20485
20486  # First separate the path from the arguments. This will split at the first
20487  # space.
20488  complete="$FOUND_MAKE"
20489  path="${complete%% *}"
20490  tmp="$complete EOL"
20491  arguments="${tmp#* }"
20492
20493  # Input might be given as Windows format, start by converting to
20494  # unix format.
20495  new_path="$path"
20496
20497  windows_path="$new_path"
20498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20499    unix_path=`$CYGPATH -u "$windows_path"`
20500    new_path="$unix_path"
20501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20503    new_path="$unix_path"
20504  fi
20505
20506
20507  # Now try to locate executable using which
20508  new_path=`$WHICH "$new_path" 2> /dev/null`
20509
20510  if test "x$new_path" = x; then
20511    # Oops. Which didn't find the executable.
20512    # The splitting of arguments from the executable at a space might have been incorrect,
20513    # since paths with space are more likely in Windows. Give it another try with the whole
20514    # argument.
20515    path="$complete"
20516    arguments="EOL"
20517    new_path="$path"
20518
20519  windows_path="$new_path"
20520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20521    unix_path=`$CYGPATH -u "$windows_path"`
20522    new_path="$unix_path"
20523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20525    new_path="$unix_path"
20526  fi
20527
20528
20529    new_path=`$WHICH "$new_path" 2> /dev/null`
20530    # bat and cmd files are not always considered executable in MSYS causing which
20531    # to not find them
20532    if test "x$new_path" = x \
20533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20535      new_path="$path"
20536
20537  windows_path="$new_path"
20538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539    unix_path=`$CYGPATH -u "$windows_path"`
20540    new_path="$unix_path"
20541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543    new_path="$unix_path"
20544  fi
20545
20546    fi
20547
20548    if test "x$new_path" = x; then
20549      # It's still not found. Now this is an unrecoverable error.
20550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20552      has_space=`$ECHO "$complete" | $GREP " "`
20553      if test "x$has_space" != x; then
20554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20556      fi
20557      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20558    fi
20559  fi
20560
20561  # Now new_path has a complete unix path to the binary
20562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20563    # Keep paths in /bin as-is, but remove trailing .exe if any
20564    new_path="${new_path/%.exe/}"
20565    # Do not save /bin paths to all_fixpath_prefixes!
20566  else
20567    # Not in mixed or Windows style, start by that.
20568    new_path=`cmd //c echo $new_path`
20569
20570  input_path="$new_path"
20571  # Check if we need to convert this using DOS-style short mode. If the path
20572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20573  # take no chances and rewrite it.
20574  # Note: m4 eats our [], so we need to use [ and ] instead.
20575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20576  if test "x$has_forbidden_chars" != x; then
20577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20579  fi
20580
20581    # Output is in $new_path
20582
20583  windows_path="$new_path"
20584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20585    unix_path=`$CYGPATH -u "$windows_path"`
20586    new_path="$unix_path"
20587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20589    new_path="$unix_path"
20590  fi
20591
20592    # remove trailing .exe if any
20593    new_path="${new_path/%.exe/}"
20594
20595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20597  fi
20598
20599    else
20600      # We're on a unix platform. Hooray! :)
20601      # First separate the path from the arguments. This will split at the first
20602      # space.
20603      complete="$FOUND_MAKE"
20604      path="${complete%% *}"
20605      tmp="$complete EOL"
20606      arguments="${tmp#* }"
20607
20608      # Cannot rely on the command "which" here since it doesn't always work.
20609      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20610      if test -z "$is_absolute_path"; then
20611        # Path to executable is not absolute. Find it.
20612        IFS_save="$IFS"
20613        IFS=:
20614        for p in $PATH; do
20615          if test -f "$p/$path" && test -x "$p/$path"; then
20616            new_path="$p/$path"
20617            break
20618          fi
20619        done
20620        IFS="$IFS_save"
20621      else
20622        # This is an absolute path, we can use it without further modifications.
20623        new_path="$path"
20624      fi
20625
20626      if test "x$new_path" = x; then
20627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20629        has_space=`$ECHO "$complete" | $GREP " "`
20630        if test "x$has_space" != x; then
20631          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20633        fi
20634        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20635      fi
20636    fi
20637
20638    # Now join together the path and the arguments once again
20639    if test "x$arguments" != xEOL; then
20640      new_complete="$new_path ${arguments% *}"
20641    else
20642      new_complete="$new_path"
20643    fi
20644
20645    if test "x$complete" != "x$new_complete"; then
20646      FOUND_MAKE="$new_complete"
20647      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20648$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20649    fi
20650  fi
20651
20652        fi
20653      fi
20654    fi
20655  fi
20656
20657        fi
20658        PATH=$OLD_PATH
20659      fi
20660    fi
20661
20662    if test "x$FOUND_MAKE" = x; then
20663      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
20664    fi
20665
20666    else
20667      # If it succeeded, then it was overridden by the user. We will use it
20668      # for the tool.
20669
20670      # First remove it from the list of overridden variables, so we can test
20671      # for unknown variables in the end.
20672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20673
20674      # Check if we try to supply an empty value
20675      if test "x$MAKE" = x; then
20676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20677$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20679$as_echo_n "checking for MAKE... " >&6; }
20680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20681$as_echo "disabled" >&6; }
20682      else
20683        # Check if the provided tool contains a complete path.
20684        tool_specified="$MAKE"
20685        tool_basename="${tool_specified##*/}"
20686        if test "x$tool_basename" = "x$tool_specified"; then
20687          # A command without a complete path is provided, search $PATH.
20688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20689$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20690          # Extract the first word of "$tool_basename", so it can be a program name with args.
20691set dummy $tool_basename; ac_word=$2
20692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20693$as_echo_n "checking for $ac_word... " >&6; }
20694if ${ac_cv_path_MAKE+:} false; then :
20695  $as_echo_n "(cached) " >&6
20696else
20697  case $MAKE in
20698  [\\/]* | ?:[\\/]*)
20699  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20700  ;;
20701  *)
20702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20703for as_dir in $PATH
20704do
20705  IFS=$as_save_IFS
20706  test -z "$as_dir" && as_dir=.
20707    for ac_exec_ext in '' $ac_executable_extensions; do
20708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20709    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20711    break 2
20712  fi
20713done
20714  done
20715IFS=$as_save_IFS
20716
20717  ;;
20718esac
20719fi
20720MAKE=$ac_cv_path_MAKE
20721if test -n "$MAKE"; then
20722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20723$as_echo "$MAKE" >&6; }
20724else
20725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20726$as_echo "no" >&6; }
20727fi
20728
20729
20730          if test "x$MAKE" = x; then
20731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20732          fi
20733        else
20734          # Otherwise we believe it is a complete path. Use it as it is.
20735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20736$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20738$as_echo_n "checking for MAKE... " >&6; }
20739          if test ! -x "$tool_specified"; then
20740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20741$as_echo "not found" >&6; }
20742            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20743          fi
20744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20745$as_echo "$tool_specified" >&6; }
20746        fi
20747      fi
20748    fi
20749
20750    # If MAKE was set by user, verify the version
20751
20752  MAKE_CANDIDATE=""$MAKE""
20753  DESCRIPTION="user supplied MAKE=$MAKE"
20754
20755  # On Cygwin, we require a newer version of make than on other platforms
20756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757    MAKE_VERSION_EXPR="-e 4\."
20758    MAKE_REQUIRED_VERSION="4.0"
20759   else
20760    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20761    MAKE_REQUIRED_VERSION="3.81"
20762  fi
20763
20764  if test "x$MAKE_CANDIDATE" != x; then
20765    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20766$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20767    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20768    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20769    if test "x$IS_GNU_MAKE" = x; then
20770      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20771$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20772    else
20773      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20774      if test "x$IS_MODERN_MAKE" = x; then
20775        { $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
20776$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;}
20777      else
20778        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20779          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780            MAKE_EXPECTED_ENV='cygwin'
20781          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20782            MAKE_EXPECTED_ENV='msys'
20783          else
20784            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20785          fi
20786          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20787          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20788        else
20789          # Not relevant for non-Windows
20790          IS_MAKE_CORRECT_ENV=true
20791        fi
20792        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20793          { $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
20794$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;}
20795        else
20796          FOUND_MAKE=$MAKE_CANDIDATE
20797
20798  # Only process if variable expands to non-empty
20799
20800  if test "x$FOUND_MAKE" != x; then
20801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20802
20803  # First separate the path from the arguments. This will split at the first
20804  # space.
20805  complete="$FOUND_MAKE"
20806  path="${complete%% *}"
20807  tmp="$complete EOL"
20808  arguments="${tmp#* }"
20809
20810  # Input might be given as Windows format, start by converting to
20811  # unix format.
20812  new_path=`$CYGPATH -u "$path"`
20813
20814  # Now try to locate executable using which
20815  new_path=`$WHICH "$new_path" 2> /dev/null`
20816  # bat and cmd files are not always considered executable in cygwin causing which
20817  # to not find them
20818  if test "x$new_path" = x \
20819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20821    new_path=`$CYGPATH -u "$path"`
20822  fi
20823  if test "x$new_path" = x; then
20824    # Oops. Which didn't find the executable.
20825    # The splitting of arguments from the executable at a space might have been incorrect,
20826    # since paths with space are more likely in Windows. Give it another try with the whole
20827    # argument.
20828    path="$complete"
20829    arguments="EOL"
20830    new_path=`$CYGPATH -u "$path"`
20831    new_path=`$WHICH "$new_path" 2> /dev/null`
20832    # bat and cmd files are not always considered executable in cygwin causing which
20833    # to not find them
20834    if test "x$new_path" = x \
20835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20837      new_path=`$CYGPATH -u "$path"`
20838    fi
20839    if test "x$new_path" = x; then
20840      # It's still not found. Now this is an unrecoverable error.
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20843      has_space=`$ECHO "$complete" | $GREP " "`
20844      if test "x$has_space" != x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20847      fi
20848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849    fi
20850  fi
20851
20852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20855  # "foo.exe" is OK but "foo" is an error.
20856  #
20857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20858  # It is also a way to make sure we got the proper file name for the real test later on.
20859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20860  if test "x$test_shortpath" = x; then
20861    # Short path failed, file does not exist as specified.
20862    # Try adding .exe or .cmd
20863    if test -f "${new_path}.exe"; then
20864      input_to_shortpath="${new_path}.exe"
20865    elif test -f "${new_path}.cmd"; then
20866      input_to_shortpath="${new_path}.cmd"
20867    else
20868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20872      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20873    fi
20874  else
20875    input_to_shortpath="$new_path"
20876  fi
20877
20878  # Call helper function which possibly converts this using DOS-style short mode.
20879  # If so, the updated path is stored in $new_path.
20880  new_path="$input_to_shortpath"
20881
20882  input_path="$input_to_shortpath"
20883  # Check if we need to convert this using DOS-style short mode. If the path
20884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20885  # take no chances and rewrite it.
20886  # Note: m4 eats our [], so we need to use [ and ] instead.
20887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20888  if test "x$has_forbidden_chars" != x; then
20889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20893      # Going to short mode and back again did indeed matter. Since short mode is
20894      # case insensitive, let's make it lowercase to improve readability.
20895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20896      # Now convert it back to Unix-style (cygpath)
20897      input_path=`$CYGPATH -u "$shortmode_path"`
20898      new_path="$input_path"
20899    fi
20900  fi
20901
20902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20903  if test "x$test_cygdrive_prefix" = x; then
20904    # As a simple fix, exclude /usr/bin since it's not a real path.
20905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20907      # a path prefixed by /cygdrive for fixpath to work.
20908      new_path="$CYGWIN_ROOT_PATH$input_path"
20909    fi
20910  fi
20911
20912  # remove trailing .exe if any
20913  new_path="${new_path/%.exe/}"
20914
20915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20916
20917  # First separate the path from the arguments. This will split at the first
20918  # space.
20919  complete="$FOUND_MAKE"
20920  path="${complete%% *}"
20921  tmp="$complete EOL"
20922  arguments="${tmp#* }"
20923
20924  # Input might be given as Windows format, start by converting to
20925  # unix format.
20926  new_path="$path"
20927
20928  windows_path="$new_path"
20929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930    unix_path=`$CYGPATH -u "$windows_path"`
20931    new_path="$unix_path"
20932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934    new_path="$unix_path"
20935  fi
20936
20937
20938  # Now try to locate executable using which
20939  new_path=`$WHICH "$new_path" 2> /dev/null`
20940
20941  if test "x$new_path" = x; then
20942    # Oops. Which didn't find the executable.
20943    # The splitting of arguments from the executable at a space might have been incorrect,
20944    # since paths with space are more likely in Windows. Give it another try with the whole
20945    # argument.
20946    path="$complete"
20947    arguments="EOL"
20948    new_path="$path"
20949
20950  windows_path="$new_path"
20951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952    unix_path=`$CYGPATH -u "$windows_path"`
20953    new_path="$unix_path"
20954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20956    new_path="$unix_path"
20957  fi
20958
20959
20960    new_path=`$WHICH "$new_path" 2> /dev/null`
20961    # bat and cmd files are not always considered executable in MSYS causing which
20962    # to not find them
20963    if test "x$new_path" = x \
20964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20966      new_path="$path"
20967
20968  windows_path="$new_path"
20969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20970    unix_path=`$CYGPATH -u "$windows_path"`
20971    new_path="$unix_path"
20972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20974    new_path="$unix_path"
20975  fi
20976
20977    fi
20978
20979    if test "x$new_path" = x; then
20980      # It's still not found. Now this is an unrecoverable error.
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20983      has_space=`$ECHO "$complete" | $GREP " "`
20984      if test "x$has_space" != x; then
20985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20987      fi
20988      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20989    fi
20990  fi
20991
20992  # Now new_path has a complete unix path to the binary
20993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20994    # Keep paths in /bin as-is, but remove trailing .exe if any
20995    new_path="${new_path/%.exe/}"
20996    # Do not save /bin paths to all_fixpath_prefixes!
20997  else
20998    # Not in mixed or Windows style, start by that.
20999    new_path=`cmd //c echo $new_path`
21000
21001  input_path="$new_path"
21002  # Check if we need to convert this using DOS-style short mode. If the path
21003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21004  # take no chances and rewrite it.
21005  # Note: m4 eats our [], so we need to use [ and ] instead.
21006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21007  if test "x$has_forbidden_chars" != x; then
21008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21010  fi
21011
21012    # Output is in $new_path
21013
21014  windows_path="$new_path"
21015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21016    unix_path=`$CYGPATH -u "$windows_path"`
21017    new_path="$unix_path"
21018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21020    new_path="$unix_path"
21021  fi
21022
21023    # remove trailing .exe if any
21024    new_path="${new_path/%.exe/}"
21025
21026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21028  fi
21029
21030    else
21031      # We're on a unix platform. Hooray! :)
21032      # First separate the path from the arguments. This will split at the first
21033      # space.
21034      complete="$FOUND_MAKE"
21035      path="${complete%% *}"
21036      tmp="$complete EOL"
21037      arguments="${tmp#* }"
21038
21039      # Cannot rely on the command "which" here since it doesn't always work.
21040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21041      if test -z "$is_absolute_path"; then
21042        # Path to executable is not absolute. Find it.
21043        IFS_save="$IFS"
21044        IFS=:
21045        for p in $PATH; do
21046          if test -f "$p/$path" && test -x "$p/$path"; then
21047            new_path="$p/$path"
21048            break
21049          fi
21050        done
21051        IFS="$IFS_save"
21052      else
21053        # This is an absolute path, we can use it without further modifications.
21054        new_path="$path"
21055      fi
21056
21057      if test "x$new_path" = x; then
21058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21060        has_space=`$ECHO "$complete" | $GREP " "`
21061        if test "x$has_space" != x; then
21062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21064        fi
21065        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21066      fi
21067    fi
21068
21069    # Now join together the path and the arguments once again
21070    if test "x$arguments" != xEOL; then
21071      new_complete="$new_path ${arguments% *}"
21072    else
21073      new_complete="$new_path"
21074    fi
21075
21076    if test "x$complete" != "x$new_complete"; then
21077      FOUND_MAKE="$new_complete"
21078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21079$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21080    fi
21081  fi
21082
21083        fi
21084      fi
21085    fi
21086  fi
21087
21088    if test "x$FOUND_MAKE" = x; then
21089      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21090    fi
21091
21092  fi
21093
21094
21095  MAKE=$FOUND_MAKE
21096
21097  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21098$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21099
21100
21101  # Check if make supports the output sync option and if so, setup using it.
21102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21103$as_echo_n "checking if make --output-sync is supported... " >&6; }
21104  if $MAKE --version -O > /dev/null 2>&1; then
21105    OUTPUT_SYNC_SUPPORTED=true
21106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21107$as_echo "yes" >&6; }
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21109$as_echo_n "checking for output-sync value... " >&6; }
21110
21111# Check whether --with-output-sync was given.
21112if test "${with_output_sync+set}" = set; then :
21113  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21114fi
21115
21116    if test "x$OUTPUT_SYNC" = "x"; then
21117      OUTPUT_SYNC=none
21118    fi
21119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21120$as_echo "$OUTPUT_SYNC" >&6; }
21121    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21122      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21123    fi
21124  else
21125    OUTPUT_SYNC_SUPPORTED=false
21126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21127$as_echo "no" >&6; }
21128  fi
21129
21130
21131
21132
21133
21134
21135  # Test if find supports -delete
21136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21137$as_echo_n "checking if find supports -delete... " >&6; }
21138  FIND_DELETE="-delete"
21139
21140  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21141
21142  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21143
21144  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21145  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21146    # No, it does not.
21147    $RM $DELETEDIR/TestIfFindSupportsDelete
21148    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21149      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21150      FIND_DELETE="-print | $XARGS $RM"
21151    else
21152      FIND_DELETE="-exec $RM \{\} \+"
21153    fi
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21155$as_echo "no" >&6; }
21156  else
21157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21158$as_echo "yes" >&6; }
21159  fi
21160  $RMDIR $DELETEDIR
21161
21162
21163
21164  # Test which kind of tar was found
21165  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21166    TAR_TYPE="gnu"
21167  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21168    TAR_TYPE="bsd"
21169  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21170    TAR_TYPE="solaris"
21171  fi
21172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21173$as_echo_n "checking what type of tar was found... " >&6; }
21174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21175$as_echo "$TAR_TYPE" >&6; }
21176
21177  TAR_CREATE_FILE_PARAM=""
21178
21179  if test "x$TAR_TYPE" = "xgnu"; then
21180    TAR_INCLUDE_PARAM="T"
21181    TAR_SUPPORTS_TRANSFORM="true"
21182    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21183      # When using gnu tar for Solaris targets, need to use compatibility mode
21184      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21185    fi
21186  else
21187    TAR_INCLUDE_PARAM="I"
21188    TAR_SUPPORTS_TRANSFORM="false"
21189  fi
21190
21191
21192
21193
21194
21195
21196  # These tools might not be installed by default,
21197  # need hint on how to install them.
21198
21199
21200
21201  # Publish this variable in the help.
21202
21203
21204  if [ -z "${UNZIP+x}" ]; then
21205    # The variable is not set by user, try to locate tool using the code snippet
21206    for ac_prog in unzip
21207do
21208  # Extract the first word of "$ac_prog", so it can be a program name with args.
21209set dummy $ac_prog; ac_word=$2
21210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21211$as_echo_n "checking for $ac_word... " >&6; }
21212if ${ac_cv_path_UNZIP+:} false; then :
21213  $as_echo_n "(cached) " >&6
21214else
21215  case $UNZIP in
21216  [\\/]* | ?:[\\/]*)
21217  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21218  ;;
21219  *)
21220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21221for as_dir in $PATH
21222do
21223  IFS=$as_save_IFS
21224  test -z "$as_dir" && as_dir=.
21225    for ac_exec_ext in '' $ac_executable_extensions; do
21226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21227    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21229    break 2
21230  fi
21231done
21232  done
21233IFS=$as_save_IFS
21234
21235  ;;
21236esac
21237fi
21238UNZIP=$ac_cv_path_UNZIP
21239if test -n "$UNZIP"; then
21240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21241$as_echo "$UNZIP" >&6; }
21242else
21243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21244$as_echo "no" >&6; }
21245fi
21246
21247
21248  test -n "$UNZIP" && break
21249done
21250
21251  else
21252    # The variable is set, but is it from the command line or the environment?
21253
21254    # Try to remove the string !UNZIP! from our list.
21255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21257      # If it failed, the variable was not from the command line. Ignore it,
21258      # but warn the user (except for BASH, which is always set by the calling BASH).
21259      if test "xUNZIP" != xBASH; then
21260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21261$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21262      fi
21263      # Try to locate tool using the code snippet
21264      for ac_prog in unzip
21265do
21266  # Extract the first word of "$ac_prog", so it can be a program name with args.
21267set dummy $ac_prog; ac_word=$2
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269$as_echo_n "checking for $ac_word... " >&6; }
21270if ${ac_cv_path_UNZIP+:} false; then :
21271  $as_echo_n "(cached) " >&6
21272else
21273  case $UNZIP in
21274  [\\/]* | ?:[\\/]*)
21275  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21276  ;;
21277  *)
21278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279for as_dir in $PATH
21280do
21281  IFS=$as_save_IFS
21282  test -z "$as_dir" && as_dir=.
21283    for ac_exec_ext in '' $ac_executable_extensions; do
21284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21285    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287    break 2
21288  fi
21289done
21290  done
21291IFS=$as_save_IFS
21292
21293  ;;
21294esac
21295fi
21296UNZIP=$ac_cv_path_UNZIP
21297if test -n "$UNZIP"; then
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21299$as_echo "$UNZIP" >&6; }
21300else
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302$as_echo "no" >&6; }
21303fi
21304
21305
21306  test -n "$UNZIP" && break
21307done
21308
21309    else
21310      # If it succeeded, then it was overridden by the user. We will use it
21311      # for the tool.
21312
21313      # First remove it from the list of overridden variables, so we can test
21314      # for unknown variables in the end.
21315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21316
21317      # Check if we try to supply an empty value
21318      if test "x$UNZIP" = x; then
21319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21320$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21322$as_echo_n "checking for UNZIP... " >&6; }
21323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21324$as_echo "disabled" >&6; }
21325      else
21326        # Check if the provided tool contains a complete path.
21327        tool_specified="$UNZIP"
21328        tool_basename="${tool_specified##*/}"
21329        if test "x$tool_basename" = "x$tool_specified"; then
21330          # A command without a complete path is provided, search $PATH.
21331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21332$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21333          # Extract the first word of "$tool_basename", so it can be a program name with args.
21334set dummy $tool_basename; ac_word=$2
21335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21336$as_echo_n "checking for $ac_word... " >&6; }
21337if ${ac_cv_path_UNZIP+:} false; then :
21338  $as_echo_n "(cached) " >&6
21339else
21340  case $UNZIP in
21341  [\\/]* | ?:[\\/]*)
21342  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21343  ;;
21344  *)
21345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21346for as_dir in $PATH
21347do
21348  IFS=$as_save_IFS
21349  test -z "$as_dir" && as_dir=.
21350    for ac_exec_ext in '' $ac_executable_extensions; do
21351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21352    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21354    break 2
21355  fi
21356done
21357  done
21358IFS=$as_save_IFS
21359
21360  ;;
21361esac
21362fi
21363UNZIP=$ac_cv_path_UNZIP
21364if test -n "$UNZIP"; then
21365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21366$as_echo "$UNZIP" >&6; }
21367else
21368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21369$as_echo "no" >&6; }
21370fi
21371
21372
21373          if test "x$UNZIP" = x; then
21374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21375          fi
21376        else
21377          # Otherwise we believe it is a complete path. Use it as it is.
21378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21379$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21381$as_echo_n "checking for UNZIP... " >&6; }
21382          if test ! -x "$tool_specified"; then
21383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21384$as_echo "not found" >&6; }
21385            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21386          fi
21387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21388$as_echo "$tool_specified" >&6; }
21389        fi
21390      fi
21391    fi
21392
21393  fi
21394
21395
21396
21397  if test "x$UNZIP" = x; then
21398    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21399  fi
21400
21401
21402
21403
21404
21405  # Publish this variable in the help.
21406
21407
21408  if [ -z "${ZIP+x}" ]; then
21409    # The variable is not set by user, try to locate tool using the code snippet
21410    for ac_prog in zip
21411do
21412  # Extract the first word of "$ac_prog", so it can be a program name with args.
21413set dummy $ac_prog; ac_word=$2
21414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21415$as_echo_n "checking for $ac_word... " >&6; }
21416if ${ac_cv_path_ZIP+:} false; then :
21417  $as_echo_n "(cached) " >&6
21418else
21419  case $ZIP in
21420  [\\/]* | ?:[\\/]*)
21421  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21422  ;;
21423  *)
21424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425for as_dir in $PATH
21426do
21427  IFS=$as_save_IFS
21428  test -z "$as_dir" && as_dir=.
21429    for ac_exec_ext in '' $ac_executable_extensions; do
21430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21431    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433    break 2
21434  fi
21435done
21436  done
21437IFS=$as_save_IFS
21438
21439  ;;
21440esac
21441fi
21442ZIP=$ac_cv_path_ZIP
21443if test -n "$ZIP"; then
21444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21445$as_echo "$ZIP" >&6; }
21446else
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448$as_echo "no" >&6; }
21449fi
21450
21451
21452  test -n "$ZIP" && break
21453done
21454
21455  else
21456    # The variable is set, but is it from the command line or the environment?
21457
21458    # Try to remove the string !ZIP! from our list.
21459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21461      # If it failed, the variable was not from the command line. Ignore it,
21462      # but warn the user (except for BASH, which is always set by the calling BASH).
21463      if test "xZIP" != xBASH; then
21464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21465$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21466      fi
21467      # Try to locate tool using the code snippet
21468      for ac_prog in zip
21469do
21470  # Extract the first word of "$ac_prog", so it can be a program name with args.
21471set dummy $ac_prog; ac_word=$2
21472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21473$as_echo_n "checking for $ac_word... " >&6; }
21474if ${ac_cv_path_ZIP+:} false; then :
21475  $as_echo_n "(cached) " >&6
21476else
21477  case $ZIP in
21478  [\\/]* | ?:[\\/]*)
21479  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21480  ;;
21481  *)
21482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21483for as_dir in $PATH
21484do
21485  IFS=$as_save_IFS
21486  test -z "$as_dir" && as_dir=.
21487    for ac_exec_ext in '' $ac_executable_extensions; do
21488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21489    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21491    break 2
21492  fi
21493done
21494  done
21495IFS=$as_save_IFS
21496
21497  ;;
21498esac
21499fi
21500ZIP=$ac_cv_path_ZIP
21501if test -n "$ZIP"; then
21502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21503$as_echo "$ZIP" >&6; }
21504else
21505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21506$as_echo "no" >&6; }
21507fi
21508
21509
21510  test -n "$ZIP" && break
21511done
21512
21513    else
21514      # If it succeeded, then it was overridden by the user. We will use it
21515      # for the tool.
21516
21517      # First remove it from the list of overridden variables, so we can test
21518      # for unknown variables in the end.
21519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21520
21521      # Check if we try to supply an empty value
21522      if test "x$ZIP" = x; then
21523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21524$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21526$as_echo_n "checking for ZIP... " >&6; }
21527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21528$as_echo "disabled" >&6; }
21529      else
21530        # Check if the provided tool contains a complete path.
21531        tool_specified="$ZIP"
21532        tool_basename="${tool_specified##*/}"
21533        if test "x$tool_basename" = "x$tool_specified"; then
21534          # A command without a complete path is provided, search $PATH.
21535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21536$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21537          # Extract the first word of "$tool_basename", so it can be a program name with args.
21538set dummy $tool_basename; ac_word=$2
21539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21540$as_echo_n "checking for $ac_word... " >&6; }
21541if ${ac_cv_path_ZIP+:} false; then :
21542  $as_echo_n "(cached) " >&6
21543else
21544  case $ZIP in
21545  [\\/]* | ?:[\\/]*)
21546  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21547  ;;
21548  *)
21549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21550for as_dir in $PATH
21551do
21552  IFS=$as_save_IFS
21553  test -z "$as_dir" && as_dir=.
21554    for ac_exec_ext in '' $ac_executable_extensions; do
21555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21556    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21558    break 2
21559  fi
21560done
21561  done
21562IFS=$as_save_IFS
21563
21564  ;;
21565esac
21566fi
21567ZIP=$ac_cv_path_ZIP
21568if test -n "$ZIP"; then
21569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21570$as_echo "$ZIP" >&6; }
21571else
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21573$as_echo "no" >&6; }
21574fi
21575
21576
21577          if test "x$ZIP" = x; then
21578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21579          fi
21580        else
21581          # Otherwise we believe it is a complete path. Use it as it is.
21582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21583$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21585$as_echo_n "checking for ZIP... " >&6; }
21586          if test ! -x "$tool_specified"; then
21587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21588$as_echo "not found" >&6; }
21589            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21590          fi
21591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21592$as_echo "$tool_specified" >&6; }
21593        fi
21594      fi
21595    fi
21596
21597  fi
21598
21599
21600
21601  if test "x$ZIP" = x; then
21602    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21603  fi
21604
21605
21606
21607  # Non-required basic tools
21608
21609
21610
21611  # Publish this variable in the help.
21612
21613
21614  if [ -z "${LDD+x}" ]; then
21615    # The variable is not set by user, try to locate tool using the code snippet
21616    for ac_prog in ldd
21617do
21618  # Extract the first word of "$ac_prog", so it can be a program name with args.
21619set dummy $ac_prog; ac_word=$2
21620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21621$as_echo_n "checking for $ac_word... " >&6; }
21622if ${ac_cv_path_LDD+:} false; then :
21623  $as_echo_n "(cached) " >&6
21624else
21625  case $LDD in
21626  [\\/]* | ?:[\\/]*)
21627  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21628  ;;
21629  *)
21630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21631for as_dir in $PATH
21632do
21633  IFS=$as_save_IFS
21634  test -z "$as_dir" && as_dir=.
21635    for ac_exec_ext in '' $ac_executable_extensions; do
21636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21637    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21639    break 2
21640  fi
21641done
21642  done
21643IFS=$as_save_IFS
21644
21645  ;;
21646esac
21647fi
21648LDD=$ac_cv_path_LDD
21649if test -n "$LDD"; then
21650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21651$as_echo "$LDD" >&6; }
21652else
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21654$as_echo "no" >&6; }
21655fi
21656
21657
21658  test -n "$LDD" && break
21659done
21660
21661  else
21662    # The variable is set, but is it from the command line or the environment?
21663
21664    # Try to remove the string !LDD! from our list.
21665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21667      # If it failed, the variable was not from the command line. Ignore it,
21668      # but warn the user (except for BASH, which is always set by the calling BASH).
21669      if test "xLDD" != xBASH; then
21670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21671$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21672      fi
21673      # Try to locate tool using the code snippet
21674      for ac_prog in ldd
21675do
21676  # Extract the first word of "$ac_prog", so it can be a program name with args.
21677set dummy $ac_prog; ac_word=$2
21678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21679$as_echo_n "checking for $ac_word... " >&6; }
21680if ${ac_cv_path_LDD+:} false; then :
21681  $as_echo_n "(cached) " >&6
21682else
21683  case $LDD in
21684  [\\/]* | ?:[\\/]*)
21685  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21686  ;;
21687  *)
21688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21689for as_dir in $PATH
21690do
21691  IFS=$as_save_IFS
21692  test -z "$as_dir" && as_dir=.
21693    for ac_exec_ext in '' $ac_executable_extensions; do
21694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21695    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21697    break 2
21698  fi
21699done
21700  done
21701IFS=$as_save_IFS
21702
21703  ;;
21704esac
21705fi
21706LDD=$ac_cv_path_LDD
21707if test -n "$LDD"; then
21708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21709$as_echo "$LDD" >&6; }
21710else
21711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21712$as_echo "no" >&6; }
21713fi
21714
21715
21716  test -n "$LDD" && break
21717done
21718
21719    else
21720      # If it succeeded, then it was overridden by the user. We will use it
21721      # for the tool.
21722
21723      # First remove it from the list of overridden variables, so we can test
21724      # for unknown variables in the end.
21725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21726
21727      # Check if we try to supply an empty value
21728      if test "x$LDD" = x; then
21729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21730$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21732$as_echo_n "checking for LDD... " >&6; }
21733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21734$as_echo "disabled" >&6; }
21735      else
21736        # Check if the provided tool contains a complete path.
21737        tool_specified="$LDD"
21738        tool_basename="${tool_specified##*/}"
21739        if test "x$tool_basename" = "x$tool_specified"; then
21740          # A command without a complete path is provided, search $PATH.
21741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21742$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21743          # Extract the first word of "$tool_basename", so it can be a program name with args.
21744set dummy $tool_basename; ac_word=$2
21745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21746$as_echo_n "checking for $ac_word... " >&6; }
21747if ${ac_cv_path_LDD+:} false; then :
21748  $as_echo_n "(cached) " >&6
21749else
21750  case $LDD in
21751  [\\/]* | ?:[\\/]*)
21752  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21753  ;;
21754  *)
21755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21756for as_dir in $PATH
21757do
21758  IFS=$as_save_IFS
21759  test -z "$as_dir" && as_dir=.
21760    for ac_exec_ext in '' $ac_executable_extensions; do
21761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21762    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21764    break 2
21765  fi
21766done
21767  done
21768IFS=$as_save_IFS
21769
21770  ;;
21771esac
21772fi
21773LDD=$ac_cv_path_LDD
21774if test -n "$LDD"; then
21775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21776$as_echo "$LDD" >&6; }
21777else
21778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21779$as_echo "no" >&6; }
21780fi
21781
21782
21783          if test "x$LDD" = x; then
21784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21785          fi
21786        else
21787          # Otherwise we believe it is a complete path. Use it as it is.
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21789$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21791$as_echo_n "checking for LDD... " >&6; }
21792          if test ! -x "$tool_specified"; then
21793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21794$as_echo "not found" >&6; }
21795            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21796          fi
21797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21798$as_echo "$tool_specified" >&6; }
21799        fi
21800      fi
21801    fi
21802
21803  fi
21804
21805
21806  if test "x$LDD" = "x"; then
21807    # List shared lib dependencies is used for
21808    # debug output and checking for forbidden dependencies.
21809    # We can build without it.
21810    LDD="true"
21811  fi
21812
21813
21814  # Publish this variable in the help.
21815
21816
21817  if [ -z "${OTOOL+x}" ]; then
21818    # The variable is not set by user, try to locate tool using the code snippet
21819    for ac_prog in otool
21820do
21821  # Extract the first word of "$ac_prog", so it can be a program name with args.
21822set dummy $ac_prog; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if ${ac_cv_path_OTOOL+:} false; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  case $OTOOL in
21829  [\\/]* | ?:[\\/]*)
21830  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21831  ;;
21832  *)
21833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21834for as_dir in $PATH
21835do
21836  IFS=$as_save_IFS
21837  test -z "$as_dir" && as_dir=.
21838    for ac_exec_ext in '' $ac_executable_extensions; do
21839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21840    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21842    break 2
21843  fi
21844done
21845  done
21846IFS=$as_save_IFS
21847
21848  ;;
21849esac
21850fi
21851OTOOL=$ac_cv_path_OTOOL
21852if test -n "$OTOOL"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21854$as_echo "$OTOOL" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861  test -n "$OTOOL" && break
21862done
21863
21864  else
21865    # The variable is set, but is it from the command line or the environment?
21866
21867    # Try to remove the string !OTOOL! from our list.
21868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21870      # If it failed, the variable was not from the command line. Ignore it,
21871      # but warn the user (except for BASH, which is always set by the calling BASH).
21872      if test "xOTOOL" != xBASH; then
21873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21874$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21875      fi
21876      # Try to locate tool using the code snippet
21877      for ac_prog in otool
21878do
21879  # Extract the first word of "$ac_prog", so it can be a program name with args.
21880set dummy $ac_prog; ac_word=$2
21881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21882$as_echo_n "checking for $ac_word... " >&6; }
21883if ${ac_cv_path_OTOOL+:} false; then :
21884  $as_echo_n "(cached) " >&6
21885else
21886  case $OTOOL in
21887  [\\/]* | ?:[\\/]*)
21888  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21889  ;;
21890  *)
21891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21892for as_dir in $PATH
21893do
21894  IFS=$as_save_IFS
21895  test -z "$as_dir" && as_dir=.
21896    for ac_exec_ext in '' $ac_executable_extensions; do
21897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21898    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21900    break 2
21901  fi
21902done
21903  done
21904IFS=$as_save_IFS
21905
21906  ;;
21907esac
21908fi
21909OTOOL=$ac_cv_path_OTOOL
21910if test -n "$OTOOL"; then
21911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21912$as_echo "$OTOOL" >&6; }
21913else
21914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21915$as_echo "no" >&6; }
21916fi
21917
21918
21919  test -n "$OTOOL" && break
21920done
21921
21922    else
21923      # If it succeeded, then it was overridden by the user. We will use it
21924      # for the tool.
21925
21926      # First remove it from the list of overridden variables, so we can test
21927      # for unknown variables in the end.
21928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21929
21930      # Check if we try to supply an empty value
21931      if test "x$OTOOL" = x; then
21932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21933$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21935$as_echo_n "checking for OTOOL... " >&6; }
21936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21937$as_echo "disabled" >&6; }
21938      else
21939        # Check if the provided tool contains a complete path.
21940        tool_specified="$OTOOL"
21941        tool_basename="${tool_specified##*/}"
21942        if test "x$tool_basename" = "x$tool_specified"; then
21943          # A command without a complete path is provided, search $PATH.
21944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21945$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21946          # Extract the first word of "$tool_basename", so it can be a program name with args.
21947set dummy $tool_basename; ac_word=$2
21948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21949$as_echo_n "checking for $ac_word... " >&6; }
21950if ${ac_cv_path_OTOOL+:} false; then :
21951  $as_echo_n "(cached) " >&6
21952else
21953  case $OTOOL in
21954  [\\/]* | ?:[\\/]*)
21955  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21956  ;;
21957  *)
21958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21959for as_dir in $PATH
21960do
21961  IFS=$as_save_IFS
21962  test -z "$as_dir" && as_dir=.
21963    for ac_exec_ext in '' $ac_executable_extensions; do
21964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21965    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21967    break 2
21968  fi
21969done
21970  done
21971IFS=$as_save_IFS
21972
21973  ;;
21974esac
21975fi
21976OTOOL=$ac_cv_path_OTOOL
21977if test -n "$OTOOL"; then
21978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21979$as_echo "$OTOOL" >&6; }
21980else
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21982$as_echo "no" >&6; }
21983fi
21984
21985
21986          if test "x$OTOOL" = x; then
21987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21988          fi
21989        else
21990          # Otherwise we believe it is a complete path. Use it as it is.
21991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21992$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21994$as_echo_n "checking for OTOOL... " >&6; }
21995          if test ! -x "$tool_specified"; then
21996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21997$as_echo "not found" >&6; }
21998            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21999          fi
22000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22001$as_echo "$tool_specified" >&6; }
22002        fi
22003      fi
22004    fi
22005
22006  fi
22007
22008
22009  if test "x$OTOOL" = "x"; then
22010    OTOOL="true"
22011  fi
22012
22013
22014  # Publish this variable in the help.
22015
22016
22017  if [ -z "${READELF+x}" ]; then
22018    # The variable is not set by user, try to locate tool using the code snippet
22019    for ac_prog in greadelf readelf
22020do
22021  # Extract the first word of "$ac_prog", so it can be a program name with args.
22022set dummy $ac_prog; ac_word=$2
22023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22024$as_echo_n "checking for $ac_word... " >&6; }
22025if ${ac_cv_path_READELF+:} false; then :
22026  $as_echo_n "(cached) " >&6
22027else
22028  case $READELF in
22029  [\\/]* | ?:[\\/]*)
22030  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22031  ;;
22032  *)
22033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22034for as_dir in $PATH
22035do
22036  IFS=$as_save_IFS
22037  test -z "$as_dir" && as_dir=.
22038    for ac_exec_ext in '' $ac_executable_extensions; do
22039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22040    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22042    break 2
22043  fi
22044done
22045  done
22046IFS=$as_save_IFS
22047
22048  ;;
22049esac
22050fi
22051READELF=$ac_cv_path_READELF
22052if test -n "$READELF"; then
22053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22054$as_echo "$READELF" >&6; }
22055else
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22057$as_echo "no" >&6; }
22058fi
22059
22060
22061  test -n "$READELF" && break
22062done
22063
22064  else
22065    # The variable is set, but is it from the command line or the environment?
22066
22067    # Try to remove the string !READELF! from our list.
22068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22070      # If it failed, the variable was not from the command line. Ignore it,
22071      # but warn the user (except for BASH, which is always set by the calling BASH).
22072      if test "xREADELF" != xBASH; then
22073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22074$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22075      fi
22076      # Try to locate tool using the code snippet
22077      for ac_prog in greadelf readelf
22078do
22079  # Extract the first word of "$ac_prog", so it can be a program name with args.
22080set dummy $ac_prog; ac_word=$2
22081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22082$as_echo_n "checking for $ac_word... " >&6; }
22083if ${ac_cv_path_READELF+:} false; then :
22084  $as_echo_n "(cached) " >&6
22085else
22086  case $READELF in
22087  [\\/]* | ?:[\\/]*)
22088  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22089  ;;
22090  *)
22091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22092for as_dir in $PATH
22093do
22094  IFS=$as_save_IFS
22095  test -z "$as_dir" && as_dir=.
22096    for ac_exec_ext in '' $ac_executable_extensions; do
22097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22098    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22100    break 2
22101  fi
22102done
22103  done
22104IFS=$as_save_IFS
22105
22106  ;;
22107esac
22108fi
22109READELF=$ac_cv_path_READELF
22110if test -n "$READELF"; then
22111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22112$as_echo "$READELF" >&6; }
22113else
22114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22115$as_echo "no" >&6; }
22116fi
22117
22118
22119  test -n "$READELF" && break
22120done
22121
22122    else
22123      # If it succeeded, then it was overridden by the user. We will use it
22124      # for the tool.
22125
22126      # First remove it from the list of overridden variables, so we can test
22127      # for unknown variables in the end.
22128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22129
22130      # Check if we try to supply an empty value
22131      if test "x$READELF" = x; then
22132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22133$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22135$as_echo_n "checking for READELF... " >&6; }
22136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22137$as_echo "disabled" >&6; }
22138      else
22139        # Check if the provided tool contains a complete path.
22140        tool_specified="$READELF"
22141        tool_basename="${tool_specified##*/}"
22142        if test "x$tool_basename" = "x$tool_specified"; then
22143          # A command without a complete path is provided, search $PATH.
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22145$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22146          # Extract the first word of "$tool_basename", so it can be a program name with args.
22147set dummy $tool_basename; ac_word=$2
22148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22149$as_echo_n "checking for $ac_word... " >&6; }
22150if ${ac_cv_path_READELF+:} false; then :
22151  $as_echo_n "(cached) " >&6
22152else
22153  case $READELF in
22154  [\\/]* | ?:[\\/]*)
22155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22156  ;;
22157  *)
22158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159for as_dir in $PATH
22160do
22161  IFS=$as_save_IFS
22162  test -z "$as_dir" && as_dir=.
22163    for ac_exec_ext in '' $ac_executable_extensions; do
22164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22167    break 2
22168  fi
22169done
22170  done
22171IFS=$as_save_IFS
22172
22173  ;;
22174esac
22175fi
22176READELF=$ac_cv_path_READELF
22177if test -n "$READELF"; then
22178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22179$as_echo "$READELF" >&6; }
22180else
22181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22182$as_echo "no" >&6; }
22183fi
22184
22185
22186          if test "x$READELF" = x; then
22187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22188          fi
22189        else
22190          # Otherwise we believe it is a complete path. Use it as it is.
22191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22192$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22194$as_echo_n "checking for READELF... " >&6; }
22195          if test ! -x "$tool_specified"; then
22196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22197$as_echo "not found" >&6; }
22198            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22199          fi
22200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22201$as_echo "$tool_specified" >&6; }
22202        fi
22203      fi
22204    fi
22205
22206  fi
22207
22208
22209
22210
22211  # Publish this variable in the help.
22212
22213
22214  if [ -z "${HG+x}" ]; then
22215    # The variable is not set by user, try to locate tool using the code snippet
22216    for ac_prog in hg
22217do
22218  # Extract the first word of "$ac_prog", so it can be a program name with args.
22219set dummy $ac_prog; ac_word=$2
22220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22221$as_echo_n "checking for $ac_word... " >&6; }
22222if ${ac_cv_path_HG+:} false; then :
22223  $as_echo_n "(cached) " >&6
22224else
22225  case $HG in
22226  [\\/]* | ?:[\\/]*)
22227  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22228  ;;
22229  *)
22230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22231for as_dir in $PATH
22232do
22233  IFS=$as_save_IFS
22234  test -z "$as_dir" && as_dir=.
22235    for ac_exec_ext in '' $ac_executable_extensions; do
22236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22237    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22239    break 2
22240  fi
22241done
22242  done
22243IFS=$as_save_IFS
22244
22245  ;;
22246esac
22247fi
22248HG=$ac_cv_path_HG
22249if test -n "$HG"; then
22250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22251$as_echo "$HG" >&6; }
22252else
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22254$as_echo "no" >&6; }
22255fi
22256
22257
22258  test -n "$HG" && break
22259done
22260
22261  else
22262    # The variable is set, but is it from the command line or the environment?
22263
22264    # Try to remove the string !HG! from our list.
22265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22267      # If it failed, the variable was not from the command line. Ignore it,
22268      # but warn the user (except for BASH, which is always set by the calling BASH).
22269      if test "xHG" != xBASH; then
22270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22271$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22272      fi
22273      # Try to locate tool using the code snippet
22274      for ac_prog in hg
22275do
22276  # Extract the first word of "$ac_prog", so it can be a program name with args.
22277set dummy $ac_prog; ac_word=$2
22278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22279$as_echo_n "checking for $ac_word... " >&6; }
22280if ${ac_cv_path_HG+:} false; then :
22281  $as_echo_n "(cached) " >&6
22282else
22283  case $HG in
22284  [\\/]* | ?:[\\/]*)
22285  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22286  ;;
22287  *)
22288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22289for as_dir in $PATH
22290do
22291  IFS=$as_save_IFS
22292  test -z "$as_dir" && as_dir=.
22293    for ac_exec_ext in '' $ac_executable_extensions; do
22294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22295    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22297    break 2
22298  fi
22299done
22300  done
22301IFS=$as_save_IFS
22302
22303  ;;
22304esac
22305fi
22306HG=$ac_cv_path_HG
22307if test -n "$HG"; then
22308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22309$as_echo "$HG" >&6; }
22310else
22311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22312$as_echo "no" >&6; }
22313fi
22314
22315
22316  test -n "$HG" && break
22317done
22318
22319    else
22320      # If it succeeded, then it was overridden by the user. We will use it
22321      # for the tool.
22322
22323      # First remove it from the list of overridden variables, so we can test
22324      # for unknown variables in the end.
22325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22326
22327      # Check if we try to supply an empty value
22328      if test "x$HG" = x; then
22329        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22330$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22332$as_echo_n "checking for HG... " >&6; }
22333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22334$as_echo "disabled" >&6; }
22335      else
22336        # Check if the provided tool contains a complete path.
22337        tool_specified="$HG"
22338        tool_basename="${tool_specified##*/}"
22339        if test "x$tool_basename" = "x$tool_specified"; then
22340          # A command without a complete path is provided, search $PATH.
22341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22342$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22343          # Extract the first word of "$tool_basename", so it can be a program name with args.
22344set dummy $tool_basename; ac_word=$2
22345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22346$as_echo_n "checking for $ac_word... " >&6; }
22347if ${ac_cv_path_HG+:} false; then :
22348  $as_echo_n "(cached) " >&6
22349else
22350  case $HG in
22351  [\\/]* | ?:[\\/]*)
22352  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22353  ;;
22354  *)
22355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22356for as_dir in $PATH
22357do
22358  IFS=$as_save_IFS
22359  test -z "$as_dir" && as_dir=.
22360    for ac_exec_ext in '' $ac_executable_extensions; do
22361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22362    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22364    break 2
22365  fi
22366done
22367  done
22368IFS=$as_save_IFS
22369
22370  ;;
22371esac
22372fi
22373HG=$ac_cv_path_HG
22374if test -n "$HG"; then
22375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22376$as_echo "$HG" >&6; }
22377else
22378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22379$as_echo "no" >&6; }
22380fi
22381
22382
22383          if test "x$HG" = x; then
22384            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22385          fi
22386        else
22387          # Otherwise we believe it is a complete path. Use it as it is.
22388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22389$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22390          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22391$as_echo_n "checking for HG... " >&6; }
22392          if test ! -x "$tool_specified"; then
22393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22394$as_echo "not found" >&6; }
22395            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22396          fi
22397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22398$as_echo "$tool_specified" >&6; }
22399        fi
22400      fi
22401    fi
22402
22403  fi
22404
22405
22406
22407
22408  # Publish this variable in the help.
22409
22410
22411  if [ -z "${STAT+x}" ]; then
22412    # The variable is not set by user, try to locate tool using the code snippet
22413    for ac_prog in stat
22414do
22415  # Extract the first word of "$ac_prog", so it can be a program name with args.
22416set dummy $ac_prog; ac_word=$2
22417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22418$as_echo_n "checking for $ac_word... " >&6; }
22419if ${ac_cv_path_STAT+:} false; then :
22420  $as_echo_n "(cached) " >&6
22421else
22422  case $STAT in
22423  [\\/]* | ?:[\\/]*)
22424  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22425  ;;
22426  *)
22427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22428for as_dir in $PATH
22429do
22430  IFS=$as_save_IFS
22431  test -z "$as_dir" && as_dir=.
22432    for ac_exec_ext in '' $ac_executable_extensions; do
22433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22434    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22436    break 2
22437  fi
22438done
22439  done
22440IFS=$as_save_IFS
22441
22442  ;;
22443esac
22444fi
22445STAT=$ac_cv_path_STAT
22446if test -n "$STAT"; then
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22448$as_echo "$STAT" >&6; }
22449else
22450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22451$as_echo "no" >&6; }
22452fi
22453
22454
22455  test -n "$STAT" && break
22456done
22457
22458  else
22459    # The variable is set, but is it from the command line or the environment?
22460
22461    # Try to remove the string !STAT! from our list.
22462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22464      # If it failed, the variable was not from the command line. Ignore it,
22465      # but warn the user (except for BASH, which is always set by the calling BASH).
22466      if test "xSTAT" != xBASH; then
22467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22468$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22469      fi
22470      # Try to locate tool using the code snippet
22471      for ac_prog in stat
22472do
22473  # Extract the first word of "$ac_prog", so it can be a program name with args.
22474set dummy $ac_prog; ac_word=$2
22475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22476$as_echo_n "checking for $ac_word... " >&6; }
22477if ${ac_cv_path_STAT+:} false; then :
22478  $as_echo_n "(cached) " >&6
22479else
22480  case $STAT in
22481  [\\/]* | ?:[\\/]*)
22482  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22483  ;;
22484  *)
22485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22494    break 2
22495  fi
22496done
22497  done
22498IFS=$as_save_IFS
22499
22500  ;;
22501esac
22502fi
22503STAT=$ac_cv_path_STAT
22504if test -n "$STAT"; then
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22506$as_echo "$STAT" >&6; }
22507else
22508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22509$as_echo "no" >&6; }
22510fi
22511
22512
22513  test -n "$STAT" && break
22514done
22515
22516    else
22517      # If it succeeded, then it was overridden by the user. We will use it
22518      # for the tool.
22519
22520      # First remove it from the list of overridden variables, so we can test
22521      # for unknown variables in the end.
22522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22523
22524      # Check if we try to supply an empty value
22525      if test "x$STAT" = x; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22527$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22529$as_echo_n "checking for STAT... " >&6; }
22530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22531$as_echo "disabled" >&6; }
22532      else
22533        # Check if the provided tool contains a complete path.
22534        tool_specified="$STAT"
22535        tool_basename="${tool_specified##*/}"
22536        if test "x$tool_basename" = "x$tool_specified"; then
22537          # A command without a complete path is provided, search $PATH.
22538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22539$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22540          # Extract the first word of "$tool_basename", so it can be a program name with args.
22541set dummy $tool_basename; ac_word=$2
22542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22543$as_echo_n "checking for $ac_word... " >&6; }
22544if ${ac_cv_path_STAT+:} false; then :
22545  $as_echo_n "(cached) " >&6
22546else
22547  case $STAT in
22548  [\\/]* | ?:[\\/]*)
22549  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22550  ;;
22551  *)
22552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22553for as_dir in $PATH
22554do
22555  IFS=$as_save_IFS
22556  test -z "$as_dir" && as_dir=.
22557    for ac_exec_ext in '' $ac_executable_extensions; do
22558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22559    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22561    break 2
22562  fi
22563done
22564  done
22565IFS=$as_save_IFS
22566
22567  ;;
22568esac
22569fi
22570STAT=$ac_cv_path_STAT
22571if test -n "$STAT"; then
22572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22573$as_echo "$STAT" >&6; }
22574else
22575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22576$as_echo "no" >&6; }
22577fi
22578
22579
22580          if test "x$STAT" = x; then
22581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22582          fi
22583        else
22584          # Otherwise we believe it is a complete path. Use it as it is.
22585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22586$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22588$as_echo_n "checking for STAT... " >&6; }
22589          if test ! -x "$tool_specified"; then
22590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22591$as_echo "not found" >&6; }
22592            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22593          fi
22594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22595$as_echo "$tool_specified" >&6; }
22596        fi
22597      fi
22598    fi
22599
22600  fi
22601
22602
22603
22604
22605  # Publish this variable in the help.
22606
22607
22608  if [ -z "${TIME+x}" ]; then
22609    # The variable is not set by user, try to locate tool using the code snippet
22610    for ac_prog in time
22611do
22612  # Extract the first word of "$ac_prog", so it can be a program name with args.
22613set dummy $ac_prog; ac_word=$2
22614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22615$as_echo_n "checking for $ac_word... " >&6; }
22616if ${ac_cv_path_TIME+:} false; then :
22617  $as_echo_n "(cached) " >&6
22618else
22619  case $TIME in
22620  [\\/]* | ?:[\\/]*)
22621  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22622  ;;
22623  *)
22624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22625for as_dir in $PATH
22626do
22627  IFS=$as_save_IFS
22628  test -z "$as_dir" && as_dir=.
22629    for ac_exec_ext in '' $ac_executable_extensions; do
22630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22631    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22633    break 2
22634  fi
22635done
22636  done
22637IFS=$as_save_IFS
22638
22639  ;;
22640esac
22641fi
22642TIME=$ac_cv_path_TIME
22643if test -n "$TIME"; then
22644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22645$as_echo "$TIME" >&6; }
22646else
22647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22648$as_echo "no" >&6; }
22649fi
22650
22651
22652  test -n "$TIME" && break
22653done
22654
22655  else
22656    # The variable is set, but is it from the command line or the environment?
22657
22658    # Try to remove the string !TIME! from our list.
22659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22661      # If it failed, the variable was not from the command line. Ignore it,
22662      # but warn the user (except for BASH, which is always set by the calling BASH).
22663      if test "xTIME" != xBASH; then
22664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22665$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22666      fi
22667      # Try to locate tool using the code snippet
22668      for ac_prog in time
22669do
22670  # Extract the first word of "$ac_prog", so it can be a program name with args.
22671set dummy $ac_prog; ac_word=$2
22672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22673$as_echo_n "checking for $ac_word... " >&6; }
22674if ${ac_cv_path_TIME+:} false; then :
22675  $as_echo_n "(cached) " >&6
22676else
22677  case $TIME in
22678  [\\/]* | ?:[\\/]*)
22679  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22680  ;;
22681  *)
22682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22683for as_dir in $PATH
22684do
22685  IFS=$as_save_IFS
22686  test -z "$as_dir" && as_dir=.
22687    for ac_exec_ext in '' $ac_executable_extensions; do
22688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22689    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22691    break 2
22692  fi
22693done
22694  done
22695IFS=$as_save_IFS
22696
22697  ;;
22698esac
22699fi
22700TIME=$ac_cv_path_TIME
22701if test -n "$TIME"; then
22702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22703$as_echo "$TIME" >&6; }
22704else
22705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22706$as_echo "no" >&6; }
22707fi
22708
22709
22710  test -n "$TIME" && break
22711done
22712
22713    else
22714      # If it succeeded, then it was overridden by the user. We will use it
22715      # for the tool.
22716
22717      # First remove it from the list of overridden variables, so we can test
22718      # for unknown variables in the end.
22719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22720
22721      # Check if we try to supply an empty value
22722      if test "x$TIME" = x; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22724$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22726$as_echo_n "checking for TIME... " >&6; }
22727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22728$as_echo "disabled" >&6; }
22729      else
22730        # Check if the provided tool contains a complete path.
22731        tool_specified="$TIME"
22732        tool_basename="${tool_specified##*/}"
22733        if test "x$tool_basename" = "x$tool_specified"; then
22734          # A command without a complete path is provided, search $PATH.
22735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22736$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22737          # Extract the first word of "$tool_basename", so it can be a program name with args.
22738set dummy $tool_basename; ac_word=$2
22739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22740$as_echo_n "checking for $ac_word... " >&6; }
22741if ${ac_cv_path_TIME+:} false; then :
22742  $as_echo_n "(cached) " >&6
22743else
22744  case $TIME in
22745  [\\/]* | ?:[\\/]*)
22746  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22747  ;;
22748  *)
22749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22750for as_dir in $PATH
22751do
22752  IFS=$as_save_IFS
22753  test -z "$as_dir" && as_dir=.
22754    for ac_exec_ext in '' $ac_executable_extensions; do
22755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22756    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22758    break 2
22759  fi
22760done
22761  done
22762IFS=$as_save_IFS
22763
22764  ;;
22765esac
22766fi
22767TIME=$ac_cv_path_TIME
22768if test -n "$TIME"; then
22769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22770$as_echo "$TIME" >&6; }
22771else
22772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22773$as_echo "no" >&6; }
22774fi
22775
22776
22777          if test "x$TIME" = x; then
22778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22779          fi
22780        else
22781          # Otherwise we believe it is a complete path. Use it as it is.
22782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22783$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22785$as_echo_n "checking for TIME... " >&6; }
22786          if test ! -x "$tool_specified"; then
22787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22788$as_echo "not found" >&6; }
22789            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22790          fi
22791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22792$as_echo "$tool_specified" >&6; }
22793        fi
22794      fi
22795    fi
22796
22797  fi
22798
22799
22800
22801
22802  # Publish this variable in the help.
22803
22804
22805  if [ -z "${DTRACE+x}" ]; then
22806    # The variable is not set by user, try to locate tool using the code snippet
22807    for ac_prog in dtrace
22808do
22809  # Extract the first word of "$ac_prog", so it can be a program name with args.
22810set dummy $ac_prog; ac_word=$2
22811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22812$as_echo_n "checking for $ac_word... " >&6; }
22813if ${ac_cv_path_DTRACE+:} false; then :
22814  $as_echo_n "(cached) " >&6
22815else
22816  case $DTRACE in
22817  [\\/]* | ?:[\\/]*)
22818  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22819  ;;
22820  *)
22821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22822for as_dir in $PATH
22823do
22824  IFS=$as_save_IFS
22825  test -z "$as_dir" && as_dir=.
22826    for ac_exec_ext in '' $ac_executable_extensions; do
22827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22828    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22830    break 2
22831  fi
22832done
22833  done
22834IFS=$as_save_IFS
22835
22836  ;;
22837esac
22838fi
22839DTRACE=$ac_cv_path_DTRACE
22840if test -n "$DTRACE"; then
22841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22842$as_echo "$DTRACE" >&6; }
22843else
22844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22845$as_echo "no" >&6; }
22846fi
22847
22848
22849  test -n "$DTRACE" && break
22850done
22851
22852  else
22853    # The variable is set, but is it from the command line or the environment?
22854
22855    # Try to remove the string !DTRACE! from our list.
22856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22858      # If it failed, the variable was not from the command line. Ignore it,
22859      # but warn the user (except for BASH, which is always set by the calling BASH).
22860      if test "xDTRACE" != xBASH; then
22861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22862$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22863      fi
22864      # Try to locate tool using the code snippet
22865      for ac_prog in dtrace
22866do
22867  # Extract the first word of "$ac_prog", so it can be a program name with args.
22868set dummy $ac_prog; ac_word=$2
22869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22870$as_echo_n "checking for $ac_word... " >&6; }
22871if ${ac_cv_path_DTRACE+:} false; then :
22872  $as_echo_n "(cached) " >&6
22873else
22874  case $DTRACE in
22875  [\\/]* | ?:[\\/]*)
22876  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22877  ;;
22878  *)
22879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22880for as_dir in $PATH
22881do
22882  IFS=$as_save_IFS
22883  test -z "$as_dir" && as_dir=.
22884    for ac_exec_ext in '' $ac_executable_extensions; do
22885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22886    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22888    break 2
22889  fi
22890done
22891  done
22892IFS=$as_save_IFS
22893
22894  ;;
22895esac
22896fi
22897DTRACE=$ac_cv_path_DTRACE
22898if test -n "$DTRACE"; then
22899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22900$as_echo "$DTRACE" >&6; }
22901else
22902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22903$as_echo "no" >&6; }
22904fi
22905
22906
22907  test -n "$DTRACE" && break
22908done
22909
22910    else
22911      # If it succeeded, then it was overridden by the user. We will use it
22912      # for the tool.
22913
22914      # First remove it from the list of overridden variables, so we can test
22915      # for unknown variables in the end.
22916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22917
22918      # Check if we try to supply an empty value
22919      if test "x$DTRACE" = x; then
22920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22921$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22923$as_echo_n "checking for DTRACE... " >&6; }
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22925$as_echo "disabled" >&6; }
22926      else
22927        # Check if the provided tool contains a complete path.
22928        tool_specified="$DTRACE"
22929        tool_basename="${tool_specified##*/}"
22930        if test "x$tool_basename" = "x$tool_specified"; then
22931          # A command without a complete path is provided, search $PATH.
22932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22933$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22934          # Extract the first word of "$tool_basename", so it can be a program name with args.
22935set dummy $tool_basename; ac_word=$2
22936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22937$as_echo_n "checking for $ac_word... " >&6; }
22938if ${ac_cv_path_DTRACE+:} false; then :
22939  $as_echo_n "(cached) " >&6
22940else
22941  case $DTRACE in
22942  [\\/]* | ?:[\\/]*)
22943  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22944  ;;
22945  *)
22946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22947for as_dir in $PATH
22948do
22949  IFS=$as_save_IFS
22950  test -z "$as_dir" && as_dir=.
22951    for ac_exec_ext in '' $ac_executable_extensions; do
22952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22953    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22955    break 2
22956  fi
22957done
22958  done
22959IFS=$as_save_IFS
22960
22961  ;;
22962esac
22963fi
22964DTRACE=$ac_cv_path_DTRACE
22965if test -n "$DTRACE"; then
22966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22967$as_echo "$DTRACE" >&6; }
22968else
22969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22970$as_echo "no" >&6; }
22971fi
22972
22973
22974          if test "x$DTRACE" = x; then
22975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22976          fi
22977        else
22978          # Otherwise we believe it is a complete path. Use it as it is.
22979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22980$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22982$as_echo_n "checking for DTRACE... " >&6; }
22983          if test ! -x "$tool_specified"; then
22984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22985$as_echo "not found" >&6; }
22986            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22987          fi
22988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22989$as_echo "$tool_specified" >&6; }
22990        fi
22991      fi
22992    fi
22993
22994  fi
22995
22996
22997
22998
22999  # Publish this variable in the help.
23000
23001
23002  if [ -z "${PATCH+x}" ]; then
23003    # The variable is not set by user, try to locate tool using the code snippet
23004    for ac_prog in gpatch patch
23005do
23006  # Extract the first word of "$ac_prog", so it can be a program name with args.
23007set dummy $ac_prog; ac_word=$2
23008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23009$as_echo_n "checking for $ac_word... " >&6; }
23010if ${ac_cv_path_PATCH+:} false; then :
23011  $as_echo_n "(cached) " >&6
23012else
23013  case $PATCH in
23014  [\\/]* | ?:[\\/]*)
23015  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23016  ;;
23017  *)
23018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23019for as_dir in $PATH
23020do
23021  IFS=$as_save_IFS
23022  test -z "$as_dir" && as_dir=.
23023    for ac_exec_ext in '' $ac_executable_extensions; do
23024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23025    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23027    break 2
23028  fi
23029done
23030  done
23031IFS=$as_save_IFS
23032
23033  ;;
23034esac
23035fi
23036PATCH=$ac_cv_path_PATCH
23037if test -n "$PATCH"; then
23038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23039$as_echo "$PATCH" >&6; }
23040else
23041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23042$as_echo "no" >&6; }
23043fi
23044
23045
23046  test -n "$PATCH" && break
23047done
23048
23049  else
23050    # The variable is set, but is it from the command line or the environment?
23051
23052    # Try to remove the string !PATCH! from our list.
23053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23055      # If it failed, the variable was not from the command line. Ignore it,
23056      # but warn the user (except for BASH, which is always set by the calling BASH).
23057      if test "xPATCH" != xBASH; then
23058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23059$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23060      fi
23061      # Try to locate tool using the code snippet
23062      for ac_prog in gpatch patch
23063do
23064  # Extract the first word of "$ac_prog", so it can be a program name with args.
23065set dummy $ac_prog; ac_word=$2
23066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23067$as_echo_n "checking for $ac_word... " >&6; }
23068if ${ac_cv_path_PATCH+:} false; then :
23069  $as_echo_n "(cached) " >&6
23070else
23071  case $PATCH in
23072  [\\/]* | ?:[\\/]*)
23073  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23074  ;;
23075  *)
23076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23077for as_dir in $PATH
23078do
23079  IFS=$as_save_IFS
23080  test -z "$as_dir" && as_dir=.
23081    for ac_exec_ext in '' $ac_executable_extensions; do
23082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23083    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23085    break 2
23086  fi
23087done
23088  done
23089IFS=$as_save_IFS
23090
23091  ;;
23092esac
23093fi
23094PATCH=$ac_cv_path_PATCH
23095if test -n "$PATCH"; then
23096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23097$as_echo "$PATCH" >&6; }
23098else
23099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23100$as_echo "no" >&6; }
23101fi
23102
23103
23104  test -n "$PATCH" && break
23105done
23106
23107    else
23108      # If it succeeded, then it was overridden by the user. We will use it
23109      # for the tool.
23110
23111      # First remove it from the list of overridden variables, so we can test
23112      # for unknown variables in the end.
23113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23114
23115      # Check if we try to supply an empty value
23116      if test "x$PATCH" = x; then
23117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23118$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23120$as_echo_n "checking for PATCH... " >&6; }
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23122$as_echo "disabled" >&6; }
23123      else
23124        # Check if the provided tool contains a complete path.
23125        tool_specified="$PATCH"
23126        tool_basename="${tool_specified##*/}"
23127        if test "x$tool_basename" = "x$tool_specified"; then
23128          # A command without a complete path is provided, search $PATH.
23129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23130$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23131          # Extract the first word of "$tool_basename", so it can be a program name with args.
23132set dummy $tool_basename; ac_word=$2
23133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23134$as_echo_n "checking for $ac_word... " >&6; }
23135if ${ac_cv_path_PATCH+:} false; then :
23136  $as_echo_n "(cached) " >&6
23137else
23138  case $PATCH in
23139  [\\/]* | ?:[\\/]*)
23140  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23141  ;;
23142  *)
23143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23144for as_dir in $PATH
23145do
23146  IFS=$as_save_IFS
23147  test -z "$as_dir" && as_dir=.
23148    for ac_exec_ext in '' $ac_executable_extensions; do
23149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23150    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23152    break 2
23153  fi
23154done
23155  done
23156IFS=$as_save_IFS
23157
23158  ;;
23159esac
23160fi
23161PATCH=$ac_cv_path_PATCH
23162if test -n "$PATCH"; then
23163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23164$as_echo "$PATCH" >&6; }
23165else
23166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23167$as_echo "no" >&6; }
23168fi
23169
23170
23171          if test "x$PATCH" = x; then
23172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23173          fi
23174        else
23175          # Otherwise we believe it is a complete path. Use it as it is.
23176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23177$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23179$as_echo_n "checking for PATCH... " >&6; }
23180          if test ! -x "$tool_specified"; then
23181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23182$as_echo "not found" >&6; }
23183            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23184          fi
23185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23186$as_echo "$tool_specified" >&6; }
23187        fi
23188      fi
23189    fi
23190
23191  fi
23192
23193
23194  # Check if it's GNU time
23195  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23196  if test "x$IS_GNU_TIME" != x; then
23197    IS_GNU_TIME=yes
23198  else
23199    IS_GNU_TIME=no
23200  fi
23201
23202
23203  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23204
23205
23206
23207  # Publish this variable in the help.
23208
23209
23210  if [ -z "${DSYMUTIL+x}" ]; then
23211    # The variable is not set by user, try to locate tool using the code snippet
23212    for ac_prog in dsymutil
23213do
23214  # Extract the first word of "$ac_prog", so it can be a program name with args.
23215set dummy $ac_prog; ac_word=$2
23216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23217$as_echo_n "checking for $ac_word... " >&6; }
23218if ${ac_cv_path_DSYMUTIL+:} false; then :
23219  $as_echo_n "(cached) " >&6
23220else
23221  case $DSYMUTIL in
23222  [\\/]* | ?:[\\/]*)
23223  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23224  ;;
23225  *)
23226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23227for as_dir in $PATH
23228do
23229  IFS=$as_save_IFS
23230  test -z "$as_dir" && as_dir=.
23231    for ac_exec_ext in '' $ac_executable_extensions; do
23232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23233    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23235    break 2
23236  fi
23237done
23238  done
23239IFS=$as_save_IFS
23240
23241  ;;
23242esac
23243fi
23244DSYMUTIL=$ac_cv_path_DSYMUTIL
23245if test -n "$DSYMUTIL"; then
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23247$as_echo "$DSYMUTIL" >&6; }
23248else
23249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23250$as_echo "no" >&6; }
23251fi
23252
23253
23254  test -n "$DSYMUTIL" && break
23255done
23256
23257  else
23258    # The variable is set, but is it from the command line or the environment?
23259
23260    # Try to remove the string !DSYMUTIL! from our list.
23261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23263      # If it failed, the variable was not from the command line. Ignore it,
23264      # but warn the user (except for BASH, which is always set by the calling BASH).
23265      if test "xDSYMUTIL" != xBASH; then
23266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23267$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23268      fi
23269      # Try to locate tool using the code snippet
23270      for ac_prog in dsymutil
23271do
23272  # Extract the first word of "$ac_prog", so it can be a program name with args.
23273set dummy $ac_prog; ac_word=$2
23274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23275$as_echo_n "checking for $ac_word... " >&6; }
23276if ${ac_cv_path_DSYMUTIL+:} false; then :
23277  $as_echo_n "(cached) " >&6
23278else
23279  case $DSYMUTIL in
23280  [\\/]* | ?:[\\/]*)
23281  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23282  ;;
23283  *)
23284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23285for as_dir in $PATH
23286do
23287  IFS=$as_save_IFS
23288  test -z "$as_dir" && as_dir=.
23289    for ac_exec_ext in '' $ac_executable_extensions; do
23290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23291    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23293    break 2
23294  fi
23295done
23296  done
23297IFS=$as_save_IFS
23298
23299  ;;
23300esac
23301fi
23302DSYMUTIL=$ac_cv_path_DSYMUTIL
23303if test -n "$DSYMUTIL"; then
23304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23305$as_echo "$DSYMUTIL" >&6; }
23306else
23307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23308$as_echo "no" >&6; }
23309fi
23310
23311
23312  test -n "$DSYMUTIL" && break
23313done
23314
23315    else
23316      # If it succeeded, then it was overridden by the user. We will use it
23317      # for the tool.
23318
23319      # First remove it from the list of overridden variables, so we can test
23320      # for unknown variables in the end.
23321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23322
23323      # Check if we try to supply an empty value
23324      if test "x$DSYMUTIL" = x; then
23325        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23326$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23328$as_echo_n "checking for DSYMUTIL... " >&6; }
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23330$as_echo "disabled" >&6; }
23331      else
23332        # Check if the provided tool contains a complete path.
23333        tool_specified="$DSYMUTIL"
23334        tool_basename="${tool_specified##*/}"
23335        if test "x$tool_basename" = "x$tool_specified"; then
23336          # A command without a complete path is provided, search $PATH.
23337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23338$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23339          # Extract the first word of "$tool_basename", so it can be a program name with args.
23340set dummy $tool_basename; ac_word=$2
23341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23342$as_echo_n "checking for $ac_word... " >&6; }
23343if ${ac_cv_path_DSYMUTIL+:} false; then :
23344  $as_echo_n "(cached) " >&6
23345else
23346  case $DSYMUTIL in
23347  [\\/]* | ?:[\\/]*)
23348  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23349  ;;
23350  *)
23351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23352for as_dir in $PATH
23353do
23354  IFS=$as_save_IFS
23355  test -z "$as_dir" && as_dir=.
23356    for ac_exec_ext in '' $ac_executable_extensions; do
23357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23358    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23360    break 2
23361  fi
23362done
23363  done
23364IFS=$as_save_IFS
23365
23366  ;;
23367esac
23368fi
23369DSYMUTIL=$ac_cv_path_DSYMUTIL
23370if test -n "$DSYMUTIL"; then
23371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23372$as_echo "$DSYMUTIL" >&6; }
23373else
23374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23375$as_echo "no" >&6; }
23376fi
23377
23378
23379          if test "x$DSYMUTIL" = x; then
23380            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23381          fi
23382        else
23383          # Otherwise we believe it is a complete path. Use it as it is.
23384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23385$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23386          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23387$as_echo_n "checking for DSYMUTIL... " >&6; }
23388          if test ! -x "$tool_specified"; then
23389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23390$as_echo "not found" >&6; }
23391            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23392          fi
23393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23394$as_echo "$tool_specified" >&6; }
23395        fi
23396      fi
23397    fi
23398
23399  fi
23400
23401
23402
23403  if test "x$DSYMUTIL" = x; then
23404    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23405  fi
23406
23407
23408
23409
23410
23411  # Publish this variable in the help.
23412
23413
23414  if [ -z "${XATTR+x}" ]; then
23415    # The variable is not set by user, try to locate tool using the code snippet
23416    for ac_prog in xattr
23417do
23418  # Extract the first word of "$ac_prog", so it can be a program name with args.
23419set dummy $ac_prog; ac_word=$2
23420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23421$as_echo_n "checking for $ac_word... " >&6; }
23422if ${ac_cv_path_XATTR+:} false; then :
23423  $as_echo_n "(cached) " >&6
23424else
23425  case $XATTR in
23426  [\\/]* | ?:[\\/]*)
23427  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23428  ;;
23429  *)
23430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23431for as_dir in $PATH
23432do
23433  IFS=$as_save_IFS
23434  test -z "$as_dir" && as_dir=.
23435    for ac_exec_ext in '' $ac_executable_extensions; do
23436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23437    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23439    break 2
23440  fi
23441done
23442  done
23443IFS=$as_save_IFS
23444
23445  ;;
23446esac
23447fi
23448XATTR=$ac_cv_path_XATTR
23449if test -n "$XATTR"; then
23450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23451$as_echo "$XATTR" >&6; }
23452else
23453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23454$as_echo "no" >&6; }
23455fi
23456
23457
23458  test -n "$XATTR" && break
23459done
23460
23461  else
23462    # The variable is set, but is it from the command line or the environment?
23463
23464    # Try to remove the string !XATTR! from our list.
23465    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23466    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23467      # If it failed, the variable was not from the command line. Ignore it,
23468      # but warn the user (except for BASH, which is always set by the calling BASH).
23469      if test "xXATTR" != xBASH; then
23470        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23471$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23472      fi
23473      # Try to locate tool using the code snippet
23474      for ac_prog in xattr
23475do
23476  # Extract the first word of "$ac_prog", so it can be a program name with args.
23477set dummy $ac_prog; ac_word=$2
23478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23479$as_echo_n "checking for $ac_word... " >&6; }
23480if ${ac_cv_path_XATTR+:} false; then :
23481  $as_echo_n "(cached) " >&6
23482else
23483  case $XATTR in
23484  [\\/]* | ?:[\\/]*)
23485  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23486  ;;
23487  *)
23488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23489for as_dir in $PATH
23490do
23491  IFS=$as_save_IFS
23492  test -z "$as_dir" && as_dir=.
23493    for ac_exec_ext in '' $ac_executable_extensions; do
23494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23495    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23497    break 2
23498  fi
23499done
23500  done
23501IFS=$as_save_IFS
23502
23503  ;;
23504esac
23505fi
23506XATTR=$ac_cv_path_XATTR
23507if test -n "$XATTR"; then
23508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23509$as_echo "$XATTR" >&6; }
23510else
23511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23512$as_echo "no" >&6; }
23513fi
23514
23515
23516  test -n "$XATTR" && break
23517done
23518
23519    else
23520      # If it succeeded, then it was overridden by the user. We will use it
23521      # for the tool.
23522
23523      # First remove it from the list of overridden variables, so we can test
23524      # for unknown variables in the end.
23525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23526
23527      # Check if we try to supply an empty value
23528      if test "x$XATTR" = x; then
23529        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23530$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23532$as_echo_n "checking for XATTR... " >&6; }
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23534$as_echo "disabled" >&6; }
23535      else
23536        # Check if the provided tool contains a complete path.
23537        tool_specified="$XATTR"
23538        tool_basename="${tool_specified##*/}"
23539        if test "x$tool_basename" = "x$tool_specified"; then
23540          # A command without a complete path is provided, search $PATH.
23541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23542$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23543          # Extract the first word of "$tool_basename", so it can be a program name with args.
23544set dummy $tool_basename; ac_word=$2
23545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23546$as_echo_n "checking for $ac_word... " >&6; }
23547if ${ac_cv_path_XATTR+:} false; then :
23548  $as_echo_n "(cached) " >&6
23549else
23550  case $XATTR in
23551  [\\/]* | ?:[\\/]*)
23552  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23553  ;;
23554  *)
23555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23556for as_dir in $PATH
23557do
23558  IFS=$as_save_IFS
23559  test -z "$as_dir" && as_dir=.
23560    for ac_exec_ext in '' $ac_executable_extensions; do
23561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23562    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23564    break 2
23565  fi
23566done
23567  done
23568IFS=$as_save_IFS
23569
23570  ;;
23571esac
23572fi
23573XATTR=$ac_cv_path_XATTR
23574if test -n "$XATTR"; then
23575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23576$as_echo "$XATTR" >&6; }
23577else
23578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23579$as_echo "no" >&6; }
23580fi
23581
23582
23583          if test "x$XATTR" = x; then
23584            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23585          fi
23586        else
23587          # Otherwise we believe it is a complete path. Use it as it is.
23588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23589$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23591$as_echo_n "checking for XATTR... " >&6; }
23592          if test ! -x "$tool_specified"; then
23593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23594$as_echo "not found" >&6; }
23595            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23596          fi
23597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23598$as_echo "$tool_specified" >&6; }
23599        fi
23600      fi
23601    fi
23602
23603  fi
23604
23605
23606
23607  if test "x$XATTR" = x; then
23608    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23609  fi
23610
23611
23612
23613
23614  # Publish this variable in the help.
23615
23616
23617  if [ -z "${CODESIGN+x}" ]; then
23618    # The variable is not set by user, try to locate tool using the code snippet
23619    for ac_prog in codesign
23620do
23621  # Extract the first word of "$ac_prog", so it can be a program name with args.
23622set dummy $ac_prog; ac_word=$2
23623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23624$as_echo_n "checking for $ac_word... " >&6; }
23625if ${ac_cv_path_CODESIGN+:} false; then :
23626  $as_echo_n "(cached) " >&6
23627else
23628  case $CODESIGN in
23629  [\\/]* | ?:[\\/]*)
23630  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23631  ;;
23632  *)
23633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23634for as_dir in $PATH
23635do
23636  IFS=$as_save_IFS
23637  test -z "$as_dir" && as_dir=.
23638    for ac_exec_ext in '' $ac_executable_extensions; do
23639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23640    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23642    break 2
23643  fi
23644done
23645  done
23646IFS=$as_save_IFS
23647
23648  ;;
23649esac
23650fi
23651CODESIGN=$ac_cv_path_CODESIGN
23652if test -n "$CODESIGN"; then
23653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23654$as_echo "$CODESIGN" >&6; }
23655else
23656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23657$as_echo "no" >&6; }
23658fi
23659
23660
23661  test -n "$CODESIGN" && break
23662done
23663
23664  else
23665    # The variable is set, but is it from the command line or the environment?
23666
23667    # Try to remove the string !CODESIGN! from our list.
23668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23670      # If it failed, the variable was not from the command line. Ignore it,
23671      # but warn the user (except for BASH, which is always set by the calling BASH).
23672      if test "xCODESIGN" != xBASH; then
23673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23674$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23675      fi
23676      # Try to locate tool using the code snippet
23677      for ac_prog in codesign
23678do
23679  # Extract the first word of "$ac_prog", so it can be a program name with args.
23680set dummy $ac_prog; ac_word=$2
23681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23682$as_echo_n "checking for $ac_word... " >&6; }
23683if ${ac_cv_path_CODESIGN+:} false; then :
23684  $as_echo_n "(cached) " >&6
23685else
23686  case $CODESIGN in
23687  [\\/]* | ?:[\\/]*)
23688  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23689  ;;
23690  *)
23691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23692for as_dir in $PATH
23693do
23694  IFS=$as_save_IFS
23695  test -z "$as_dir" && as_dir=.
23696    for ac_exec_ext in '' $ac_executable_extensions; do
23697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23698    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23700    break 2
23701  fi
23702done
23703  done
23704IFS=$as_save_IFS
23705
23706  ;;
23707esac
23708fi
23709CODESIGN=$ac_cv_path_CODESIGN
23710if test -n "$CODESIGN"; then
23711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23712$as_echo "$CODESIGN" >&6; }
23713else
23714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23715$as_echo "no" >&6; }
23716fi
23717
23718
23719  test -n "$CODESIGN" && break
23720done
23721
23722    else
23723      # If it succeeded, then it was overridden by the user. We will use it
23724      # for the tool.
23725
23726      # First remove it from the list of overridden variables, so we can test
23727      # for unknown variables in the end.
23728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23729
23730      # Check if we try to supply an empty value
23731      if test "x$CODESIGN" = x; then
23732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23733$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23735$as_echo_n "checking for CODESIGN... " >&6; }
23736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23737$as_echo "disabled" >&6; }
23738      else
23739        # Check if the provided tool contains a complete path.
23740        tool_specified="$CODESIGN"
23741        tool_basename="${tool_specified##*/}"
23742        if test "x$tool_basename" = "x$tool_specified"; then
23743          # A command without a complete path is provided, search $PATH.
23744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23745$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23746          # Extract the first word of "$tool_basename", so it can be a program name with args.
23747set dummy $tool_basename; ac_word=$2
23748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23749$as_echo_n "checking for $ac_word... " >&6; }
23750if ${ac_cv_path_CODESIGN+:} false; then :
23751  $as_echo_n "(cached) " >&6
23752else
23753  case $CODESIGN in
23754  [\\/]* | ?:[\\/]*)
23755  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23756  ;;
23757  *)
23758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23759for as_dir in $PATH
23760do
23761  IFS=$as_save_IFS
23762  test -z "$as_dir" && as_dir=.
23763    for ac_exec_ext in '' $ac_executable_extensions; do
23764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23765    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23767    break 2
23768  fi
23769done
23770  done
23771IFS=$as_save_IFS
23772
23773  ;;
23774esac
23775fi
23776CODESIGN=$ac_cv_path_CODESIGN
23777if test -n "$CODESIGN"; then
23778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23779$as_echo "$CODESIGN" >&6; }
23780else
23781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23782$as_echo "no" >&6; }
23783fi
23784
23785
23786          if test "x$CODESIGN" = x; then
23787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23788          fi
23789        else
23790          # Otherwise we believe it is a complete path. Use it as it is.
23791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23792$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23794$as_echo_n "checking for CODESIGN... " >&6; }
23795          if test ! -x "$tool_specified"; then
23796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23797$as_echo "not found" >&6; }
23798            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23799          fi
23800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23801$as_echo "$tool_specified" >&6; }
23802        fi
23803      fi
23804    fi
23805
23806  fi
23807
23808
23809    if test "x$CODESIGN" != "x"; then
23810      # Verify that the openjdk_codesign certificate is present
23811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23812$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23813      $RM codesign-testfile
23814      $TOUCH codesign-testfile
23815      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23816      $RM codesign-testfile
23817      if test "x$CODESIGN" = x; then
23818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23819$as_echo "no" >&6; }
23820      else
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23822$as_echo "yes" >&6; }
23823      fi
23824    fi
23825
23826
23827
23828  # Publish this variable in the help.
23829
23830
23831  if [ -z "${SETFILE+x}" ]; then
23832    # The variable is not set by user, try to locate tool using the code snippet
23833    for ac_prog in SetFile
23834do
23835  # Extract the first word of "$ac_prog", so it can be a program name with args.
23836set dummy $ac_prog; ac_word=$2
23837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23838$as_echo_n "checking for $ac_word... " >&6; }
23839if ${ac_cv_path_SETFILE+:} false; then :
23840  $as_echo_n "(cached) " >&6
23841else
23842  case $SETFILE in
23843  [\\/]* | ?:[\\/]*)
23844  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23845  ;;
23846  *)
23847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23848for as_dir in $PATH
23849do
23850  IFS=$as_save_IFS
23851  test -z "$as_dir" && as_dir=.
23852    for ac_exec_ext in '' $ac_executable_extensions; do
23853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23854    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23856    break 2
23857  fi
23858done
23859  done
23860IFS=$as_save_IFS
23861
23862  ;;
23863esac
23864fi
23865SETFILE=$ac_cv_path_SETFILE
23866if test -n "$SETFILE"; then
23867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23868$as_echo "$SETFILE" >&6; }
23869else
23870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23871$as_echo "no" >&6; }
23872fi
23873
23874
23875  test -n "$SETFILE" && break
23876done
23877
23878  else
23879    # The variable is set, but is it from the command line or the environment?
23880
23881    # Try to remove the string !SETFILE! from our list.
23882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23884      # If it failed, the variable was not from the command line. Ignore it,
23885      # but warn the user (except for BASH, which is always set by the calling BASH).
23886      if test "xSETFILE" != xBASH; then
23887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23888$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23889      fi
23890      # Try to locate tool using the code snippet
23891      for ac_prog in SetFile
23892do
23893  # Extract the first word of "$ac_prog", so it can be a program name with args.
23894set dummy $ac_prog; ac_word=$2
23895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23896$as_echo_n "checking for $ac_word... " >&6; }
23897if ${ac_cv_path_SETFILE+:} false; then :
23898  $as_echo_n "(cached) " >&6
23899else
23900  case $SETFILE in
23901  [\\/]* | ?:[\\/]*)
23902  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23903  ;;
23904  *)
23905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23906for as_dir in $PATH
23907do
23908  IFS=$as_save_IFS
23909  test -z "$as_dir" && as_dir=.
23910    for ac_exec_ext in '' $ac_executable_extensions; do
23911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23912    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23914    break 2
23915  fi
23916done
23917  done
23918IFS=$as_save_IFS
23919
23920  ;;
23921esac
23922fi
23923SETFILE=$ac_cv_path_SETFILE
23924if test -n "$SETFILE"; then
23925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23926$as_echo "$SETFILE" >&6; }
23927else
23928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23929$as_echo "no" >&6; }
23930fi
23931
23932
23933  test -n "$SETFILE" && break
23934done
23935
23936    else
23937      # If it succeeded, then it was overridden by the user. We will use it
23938      # for the tool.
23939
23940      # First remove it from the list of overridden variables, so we can test
23941      # for unknown variables in the end.
23942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23943
23944      # Check if we try to supply an empty value
23945      if test "x$SETFILE" = x; then
23946        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23947$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23949$as_echo_n "checking for SETFILE... " >&6; }
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23951$as_echo "disabled" >&6; }
23952      else
23953        # Check if the provided tool contains a complete path.
23954        tool_specified="$SETFILE"
23955        tool_basename="${tool_specified##*/}"
23956        if test "x$tool_basename" = "x$tool_specified"; then
23957          # A command without a complete path is provided, search $PATH.
23958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23959$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23960          # Extract the first word of "$tool_basename", so it can be a program name with args.
23961set dummy $tool_basename; ac_word=$2
23962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23963$as_echo_n "checking for $ac_word... " >&6; }
23964if ${ac_cv_path_SETFILE+:} false; then :
23965  $as_echo_n "(cached) " >&6
23966else
23967  case $SETFILE in
23968  [\\/]* | ?:[\\/]*)
23969  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23970  ;;
23971  *)
23972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23973for as_dir in $PATH
23974do
23975  IFS=$as_save_IFS
23976  test -z "$as_dir" && as_dir=.
23977    for ac_exec_ext in '' $ac_executable_extensions; do
23978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23979    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23981    break 2
23982  fi
23983done
23984  done
23985IFS=$as_save_IFS
23986
23987  ;;
23988esac
23989fi
23990SETFILE=$ac_cv_path_SETFILE
23991if test -n "$SETFILE"; then
23992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23993$as_echo "$SETFILE" >&6; }
23994else
23995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23996$as_echo "no" >&6; }
23997fi
23998
23999
24000          if test "x$SETFILE" = x; then
24001            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24002          fi
24003        else
24004          # Otherwise we believe it is a complete path. Use it as it is.
24005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24006$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24007          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24008$as_echo_n "checking for SETFILE... " >&6; }
24009          if test ! -x "$tool_specified"; then
24010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24011$as_echo "not found" >&6; }
24012            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24013          fi
24014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24015$as_echo "$tool_specified" >&6; }
24016        fi
24017      fi
24018    fi
24019
24020  fi
24021
24022
24023
24024  if test "x$SETFILE" = x; then
24025    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24026  fi
24027
24028
24029  fi
24030
24031
24032  # Test if bash supports pipefail.
24033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24034$as_echo_n "checking if bash supports pipefail... " >&6; }
24035  if ${BASH} -c 'set -o pipefail'; then
24036    BASH_ARGS="$BASH_ARGS -o pipefail"
24037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24038$as_echo "yes" >&6; }
24039  else
24040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24041$as_echo "no" >&6; }
24042  fi
24043
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24045$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24046  if ${BASH} -e -c 'true'; then
24047    BASH_ARGS="$BASH_ARGS -e"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24049$as_echo "yes" >&6; }
24050  else
24051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24052$as_echo "no" >&6; }
24053  fi
24054
24055
24056
24057
24058# Check if pkg-config is available.
24059
24060
24061if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24062	if test -n "$ac_tool_prefix"; then
24063  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24064set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24066$as_echo_n "checking for $ac_word... " >&6; }
24067if ${ac_cv_path_PKG_CONFIG+:} false; then :
24068  $as_echo_n "(cached) " >&6
24069else
24070  case $PKG_CONFIG in
24071  [\\/]* | ?:[\\/]*)
24072  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24073  ;;
24074  *)
24075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24076for as_dir in $PATH
24077do
24078  IFS=$as_save_IFS
24079  test -z "$as_dir" && as_dir=.
24080    for ac_exec_ext in '' $ac_executable_extensions; do
24081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24082    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24084    break 2
24085  fi
24086done
24087  done
24088IFS=$as_save_IFS
24089
24090  ;;
24091esac
24092fi
24093PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24094if test -n "$PKG_CONFIG"; then
24095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24096$as_echo "$PKG_CONFIG" >&6; }
24097else
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24099$as_echo "no" >&6; }
24100fi
24101
24102
24103fi
24104if test -z "$ac_cv_path_PKG_CONFIG"; then
24105  ac_pt_PKG_CONFIG=$PKG_CONFIG
24106  # Extract the first word of "pkg-config", so it can be a program name with args.
24107set dummy pkg-config; ac_word=$2
24108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24109$as_echo_n "checking for $ac_word... " >&6; }
24110if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24111  $as_echo_n "(cached) " >&6
24112else
24113  case $ac_pt_PKG_CONFIG in
24114  [\\/]* | ?:[\\/]*)
24115  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24116  ;;
24117  *)
24118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24119for as_dir in $PATH
24120do
24121  IFS=$as_save_IFS
24122  test -z "$as_dir" && as_dir=.
24123    for ac_exec_ext in '' $ac_executable_extensions; do
24124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24125    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24127    break 2
24128  fi
24129done
24130  done
24131IFS=$as_save_IFS
24132
24133  ;;
24134esac
24135fi
24136ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24137if test -n "$ac_pt_PKG_CONFIG"; then
24138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24139$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24140else
24141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24142$as_echo "no" >&6; }
24143fi
24144
24145  if test "x$ac_pt_PKG_CONFIG" = x; then
24146    PKG_CONFIG=""
24147  else
24148    case $cross_compiling:$ac_tool_warned in
24149yes:)
24150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24152ac_tool_warned=yes ;;
24153esac
24154    PKG_CONFIG=$ac_pt_PKG_CONFIG
24155  fi
24156else
24157  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24158fi
24159
24160fi
24161if test -n "$PKG_CONFIG"; then
24162	_pkg_min_version=0.9.0
24163	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24164$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24165	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24166		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24167$as_echo "yes" >&6; }
24168	else
24169		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24170$as_echo "no" >&6; }
24171		PKG_CONFIG=""
24172	fi
24173
24174fi
24175
24176# After basic tools have been setup, we can check build os specific details.
24177
24178  ###############################################################################
24179
24180  # Note that this is the build platform OS version!
24181
24182  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24183  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24184  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24185  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24186
24187
24188
24189
24190
24191# Misc basic settings
24192
24193
24194# Check whether --with-default-make-target was given.
24195if test "${with_default_make_target+set}" = set; then :
24196  withval=$with_default_make_target;
24197fi
24198
24199  if test "x$with_default_make_target" = "x" \
24200      || test "x$with_default_make_target" = "xyes"; then
24201    DEFAULT_MAKE_TARGET="exploded-image"
24202  elif test "x$with_default_make_target" = "xno"; then
24203    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24204  else
24205    DEFAULT_MAKE_TARGET="$with_default_make_target"
24206  fi
24207
24208
24209
24210
24211###############################################################################
24212#
24213# Determine OpenJDK variants, options and version numbers.
24214#
24215###############################################################################
24216
24217# We need build & target for this.
24218
24219  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24220  # We always build headless support.
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24222$as_echo_n "checking headful support... " >&6; }
24223  # Check whether --enable-headful was given.
24224if test "${enable_headful+set}" = set; then :
24225  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24226else
24227  SUPPORT_HEADFUL=yes
24228fi
24229
24230
24231  SUPPORT_HEADLESS=yes
24232  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24233
24234  if test "x$SUPPORT_HEADFUL" = xyes; then
24235    # We are building both headful and headless.
24236    headful_msg="include support for both headful and headless"
24237  fi
24238
24239  if test "x$SUPPORT_HEADFUL" = xno; then
24240    # Thus we are building headless only.
24241    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24242    headful_msg="headless only"
24243  fi
24244
24245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24246$as_echo "$headful_msg" >&6; }
24247
24248
24249
24250
24251
24252  # Choose cacerts source file
24253
24254# Check whether --with-cacerts-file was given.
24255if test "${with_cacerts_file+set}" = set; then :
24256  withval=$with_cacerts_file;
24257fi
24258
24259  if test "x$with_cacerts_file" != x; then
24260    CACERTS_FILE=$with_cacerts_file
24261  fi
24262
24263
24264  # Enable or disable unlimited crypto
24265  # Check whether --enable-unlimited-crypto was given.
24266if test "${enable_unlimited_crypto+set}" = set; then :
24267  enableval=$enable_unlimited_crypto;
24268else
24269  enable_unlimited_crypto=no
24270fi
24271
24272  if test "x$enable_unlimited_crypto" = "xyes"; then
24273    UNLIMITED_CRYPTO=true
24274  else
24275    UNLIMITED_CRYPTO=false
24276  fi
24277
24278
24279  # Should we build the serviceability agent (SA)?
24280  INCLUDE_SA=true
24281  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24282    INCLUDE_SA=false
24283  fi
24284  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24285    INCLUDE_SA=false
24286  fi
24287
24288
24289  # Compress jars
24290  COMPRESS_JARS=false
24291
24292
24293
24294  # Setup default copyright year. Mostly overridden when building close to a new year.
24295
24296# Check whether --with-copyright-year was given.
24297if test "${with_copyright_year+set}" = set; then :
24298  withval=$with_copyright_year;
24299fi
24300
24301  if test "x$with_copyright_year" = xyes; then
24302    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24303  elif test "x$with_copyright_year" != x; then
24304    COPYRIGHT_YEAR="$with_copyright_year"
24305  else
24306    COPYRIGHT_YEAR=`$DATE +'%Y'`
24307  fi
24308
24309
24310
24311  # Check whether --enable-keep-packaged-modules was given.
24312if test "${enable_keep_packaged_modules+set}" = set; then :
24313  enableval=$enable_keep_packaged_modules;
24314fi
24315
24316
24317  if test "x$enable_keep_packaged_modules" = "xyes"; then
24318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24319$as_echo_n "checking if packaged modules are kept... " >&6; }
24320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24321$as_echo "yes" >&6; }
24322    JLINK_KEEP_PACKAGED_MODULES=true
24323  elif test "x$enable_keep_packaged_modules" = "xno"; then
24324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24325$as_echo_n "checking if packaged modules are kept... " >&6; }
24326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24327$as_echo "no" >&6; }
24328    JLINK_KEEP_PACKAGED_MODULES=false
24329  elif test "x$enable_keep_packaged_modules" = "x"; then
24330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24331$as_echo "yes (default)" >&6; }
24332    JLINK_KEEP_PACKAGED_MODULES=true
24333  else
24334    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24335  fi
24336
24337
24338
24339
24340  # Warn user that old version arguments are deprecated.
24341
24342
24343# Check whether --with-milestone was given.
24344if test "${with_milestone+set}" = set; then :
24345  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24346$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24347fi
24348
24349
24350
24351
24352# Check whether --with-update-version was given.
24353if test "${with_update_version+set}" = set; then :
24354  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24355$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24356fi
24357
24358
24359
24360
24361# Check whether --with-user-release-suffix was given.
24362if test "${with_user_release_suffix+set}" = set; then :
24363  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
24364$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24365fi
24366
24367
24368
24369
24370# Check whether --with-build-number was given.
24371if test "${with_build_number+set}" = set; then :
24372  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24373$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24374fi
24375
24376
24377
24378  # Source the version numbers file
24379  . $AUTOCONF_DIR/version-numbers
24380
24381  # Some non-version number information is set in that file
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391  # Override version from arguments
24392
24393  # If --with-version-string is set, process it first. It is possible to
24394  # override parts with more specific flags, since these are processed later.
24395
24396# Check whether --with-version-string was given.
24397if test "${with_version_string+set}" = set; then :
24398  withval=$with_version_string;
24399fi
24400
24401  if test "x$with_version_string" = xyes; then
24402    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24403  elif test "x$with_version_string" != x; then
24404    # Additional [] needed to keep m4 from mangling shell constructs.
24405    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24406      VERSION_MAJOR=${BASH_REMATCH[1]}
24407      VERSION_MINOR=${BASH_REMATCH[3]}
24408      VERSION_SECURITY=${BASH_REMATCH[5]}
24409      VERSION_PATCH=${BASH_REMATCH[7]}
24410      VERSION_PRE=${BASH_REMATCH[9]}
24411      version_plus_separator=${BASH_REMATCH[11]}
24412      VERSION_BUILD=${BASH_REMATCH[12]}
24413      VERSION_OPT=${BASH_REMATCH[14]}
24414      # Unspecified numerical fields are interpreted as 0.
24415      if test "x$VERSION_MINOR" = x; then
24416        VERSION_MINOR=0
24417      fi
24418      if test "x$VERSION_SECURITY" = x; then
24419        VERSION_SECURITY=0
24420      fi
24421      if test "x$VERSION_PATCH" = x; then
24422        VERSION_PATCH=0
24423      fi
24424      if test "x$version_plus_separator" != x \
24425          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24426        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24427      fi
24428      # Stop the version part process from setting default values.
24429      # We still allow them to explicitely override though.
24430      NO_DEFAULT_VERSION_PARTS=true
24431    else
24432      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24433    fi
24434  fi
24435
24436
24437# Check whether --with-version-pre was given.
24438if test "${with_version_pre+set}" = set; then :
24439  withval=$with_version_pre; with_version_pre_present=true
24440else
24441  with_version_pre_present=false
24442fi
24443
24444
24445  if test "x$with_version_pre_present" = xtrue; then
24446    if test "x$with_version_pre" = xyes; then
24447      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24448    elif test "x$with_version_pre" = xno; then
24449      # Interpret --without-* as empty string instead of the literal "no"
24450      VERSION_PRE=
24451    else
24452      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24453       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24454      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24456$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24457      fi
24458    fi
24459  else
24460    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24461      # Default is to use "internal" as pre
24462      VERSION_PRE="internal"
24463    fi
24464  fi
24465
24466
24467# Check whether --with-version-opt was given.
24468if test "${with_version_opt+set}" = set; then :
24469  withval=$with_version_opt; with_version_opt_present=true
24470else
24471  with_version_opt_present=false
24472fi
24473
24474
24475  if test "x$with_version_opt_present" = xtrue; then
24476    if test "x$with_version_opt" = xyes; then
24477      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24478    elif test "x$with_version_opt" = xno; then
24479      # Interpret --without-* as empty string instead of the literal "no"
24480      VERSION_OPT=
24481    else
24482      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24483       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24484      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24486$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24487      fi
24488    fi
24489  else
24490    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24491      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24492      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24493      # Outer [ ] to quote m4.
24494       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24495      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24496    fi
24497  fi
24498
24499
24500# Check whether --with-version-build was given.
24501if test "${with_version_build+set}" = set; then :
24502  withval=$with_version_build; with_version_build_present=true
24503else
24504  with_version_build_present=false
24505fi
24506
24507
24508  if test "x$with_version_build_present" = xtrue; then
24509    if test "x$with_version_build" = xyes; then
24510      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24511    elif test "x$with_version_build" = xno; then
24512      # Interpret --without-* as empty string instead of the literal "no"
24513      VERSION_BUILD=
24514    elif test "x$with_version_build" = x; then
24515      VERSION_BUILD=
24516    else
24517
24518  # Additional [] needed to keep m4 from mangling shell constructs.
24519  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24520    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24521  fi
24522  # Extract the version number without leading zeros.
24523  cleaned_value=${BASH_REMATCH[1]}
24524  if test "x$cleaned_value" = x; then
24525    # Special case for zero
24526    cleaned_value=${BASH_REMATCH[2]}
24527  fi
24528
24529  if test $cleaned_value -gt 255; then
24530    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24531  fi
24532  if test "x$cleaned_value" != "x$with_version_build"; then
24533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24534$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24535  fi
24536  VERSION_BUILD=$cleaned_value
24537
24538    fi
24539  else
24540    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24541      # Default is to not have a build number.
24542      VERSION_BUILD=""
24543      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24544      VERSION_BUILD=0
24545    fi
24546  fi
24547
24548
24549# Check whether --with-version-major was given.
24550if test "${with_version_major+set}" = set; then :
24551  withval=$with_version_major; with_version_major_present=true
24552else
24553  with_version_major_present=false
24554fi
24555
24556
24557  if test "x$with_version_major_present" = xtrue; then
24558    if test "x$with_version_major" = xyes; then
24559      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24560    else
24561
24562  # Additional [] needed to keep m4 from mangling shell constructs.
24563  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24564    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24565  fi
24566  # Extract the version number without leading zeros.
24567  cleaned_value=${BASH_REMATCH[1]}
24568  if test "x$cleaned_value" = x; then
24569    # Special case for zero
24570    cleaned_value=${BASH_REMATCH[2]}
24571  fi
24572
24573  if test $cleaned_value -gt 255; then
24574    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24575  fi
24576  if test "x$cleaned_value" != "x$with_version_major"; then
24577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24578$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24579  fi
24580  VERSION_MAJOR=$cleaned_value
24581
24582    fi
24583  else
24584    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24585      # Default is to get value from version-numbers
24586      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24587    fi
24588  fi
24589
24590
24591# Check whether --with-version-minor was given.
24592if test "${with_version_minor+set}" = set; then :
24593  withval=$with_version_minor; with_version_minor_present=true
24594else
24595  with_version_minor_present=false
24596fi
24597
24598
24599  if test "x$with_version_minor_present" = xtrue; then
24600    if test "x$with_version_minor" = xyes; then
24601      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24602    elif test "x$with_version_minor" = xno; then
24603      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24604      VERSION_MINOR=0
24605    elif test "x$with_version_minor" = x; then
24606      VERSION_MINOR=0
24607    else
24608
24609  # Additional [] needed to keep m4 from mangling shell constructs.
24610  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24611    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24612  fi
24613  # Extract the version number without leading zeros.
24614  cleaned_value=${BASH_REMATCH[1]}
24615  if test "x$cleaned_value" = x; then
24616    # Special case for zero
24617    cleaned_value=${BASH_REMATCH[2]}
24618  fi
24619
24620  if test $cleaned_value -gt 255; then
24621    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24622  fi
24623  if test "x$cleaned_value" != "x$with_version_minor"; then
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24625$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24626  fi
24627  VERSION_MINOR=$cleaned_value
24628
24629    fi
24630  else
24631    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24632      # Default is 0, if unspecified
24633      VERSION_MINOR=0
24634    fi
24635  fi
24636
24637
24638# Check whether --with-version-security was given.
24639if test "${with_version_security+set}" = set; then :
24640  withval=$with_version_security; with_version_security_present=true
24641else
24642  with_version_security_present=false
24643fi
24644
24645
24646  if test "x$with_version_security_present" = xtrue; then
24647    if test "x$with_version_security" = xyes; then
24648      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24649    elif test "x$with_version_security" = xno; then
24650      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24651      VERSION_SECURITY=0
24652    elif test "x$with_version_security" = x; then
24653      VERSION_SECURITY=0
24654    else
24655
24656  # Additional [] needed to keep m4 from mangling shell constructs.
24657  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24658    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24659  fi
24660  # Extract the version number without leading zeros.
24661  cleaned_value=${BASH_REMATCH[1]}
24662  if test "x$cleaned_value" = x; then
24663    # Special case for zero
24664    cleaned_value=${BASH_REMATCH[2]}
24665  fi
24666
24667  if test $cleaned_value -gt 255; then
24668    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24669  fi
24670  if test "x$cleaned_value" != "x$with_version_security"; then
24671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24672$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24673  fi
24674  VERSION_SECURITY=$cleaned_value
24675
24676    fi
24677  else
24678    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24679      # Default is 0, if unspecified
24680      VERSION_SECURITY=0
24681    fi
24682  fi
24683
24684
24685# Check whether --with-version-patch was given.
24686if test "${with_version_patch+set}" = set; then :
24687  withval=$with_version_patch; with_version_patch_present=true
24688else
24689  with_version_patch_present=false
24690fi
24691
24692
24693  if test "x$with_version_patch_present" = xtrue; then
24694    if test "x$with_version_patch" = xyes; then
24695      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24696    elif test "x$with_version_patch" = xno; then
24697      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24698      VERSION_PATCH=0
24699    elif test "x$with_version_patch" = x; then
24700      VERSION_PATCH=0
24701    else
24702
24703  # Additional [] needed to keep m4 from mangling shell constructs.
24704  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24705    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24706  fi
24707  # Extract the version number without leading zeros.
24708  cleaned_value=${BASH_REMATCH[1]}
24709  if test "x$cleaned_value" = x; then
24710    # Special case for zero
24711    cleaned_value=${BASH_REMATCH[2]}
24712  fi
24713
24714  if test $cleaned_value -gt 255; then
24715    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24716  fi
24717  if test "x$cleaned_value" != "x$with_version_patch"; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24719$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24720  fi
24721  VERSION_PATCH=$cleaned_value
24722
24723    fi
24724  else
24725    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24726      # Default is 0, if unspecified
24727      VERSION_PATCH=0
24728    fi
24729  fi
24730
24731  # Calculate derived version properties
24732
24733  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24734  if test "x$VERSION_PRE" = x; then
24735    VERSION_IS_GA=true
24736  else
24737    VERSION_IS_GA=false
24738  fi
24739
24740  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24741  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24742
24743  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24744  # Strip trailing zeroes from stripped_version_number
24745  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24746  VERSION_NUMBER=$stripped_version_number
24747
24748  # The complete version string, with additional build information
24749  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24750    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24751  else
24752    # If either build or opt is set, we need a + separator
24753    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24754  fi
24755
24756  # The short version string, just VERSION_NUMBER and PRE, if present.
24757  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24758
24759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24760$as_echo_n "checking for version string... " >&6; }
24761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24762$as_echo "$VERSION_STRING" >&6; }
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778###############################################################################
24779#
24780# Setup BootJDK, used to bootstrap the build.
24781#
24782###############################################################################
24783
24784
24785  BOOT_JDK_FOUND=no
24786
24787# Check whether --with-boot-jdk was given.
24788if test "${with_boot_jdk+set}" = set; then :
24789  withval=$with_boot_jdk;
24790fi
24791
24792
24793  # We look for the Boot JDK through various means, going from more certain to
24794  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24795  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24796  # must check if this is indeed valid; otherwise we'll continue looking.
24797
24798  # Test: Is bootjdk explicitely set by command line arguments?
24799
24800  if test "x$BOOT_JDK_FOUND" = xno; then
24801    # Now execute the test
24802
24803  if test "x$with_boot_jdk" != x; then
24804    BOOT_JDK=$with_boot_jdk
24805    BOOT_JDK_FOUND=maybe
24806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24807$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24808  fi
24809
24810
24811    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24812    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24813      # Do we have a bin/java?
24814      if test ! -x "$BOOT_JDK/bin/java"; then
24815        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24817        BOOT_JDK_FOUND=no
24818      else
24819        # Do we have a bin/javac?
24820        if test ! -x "$BOOT_JDK/bin/javac"; then
24821          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24823          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24824$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24825          BOOT_JDK_FOUND=no
24826        else
24827          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24828          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24829
24830          # Extra M4 quote needed to protect [] in grep expression.
24831          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24832          if test "x$FOUND_CORRECT_VERSION" = x; then
24833            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24835            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24836$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24837            BOOT_JDK_FOUND=no
24838          else
24839            # We're done! :-)
24840            BOOT_JDK_FOUND=yes
24841
24842  # Only process if variable expands to non-empty
24843
24844  if test "x$BOOT_JDK" != x; then
24845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846
24847  # Input might be given as Windows format, start by converting to
24848  # unix format.
24849  path="$BOOT_JDK"
24850  new_path=`$CYGPATH -u "$path"`
24851
24852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24855  # "foo.exe" is OK but "foo" is an error.
24856  #
24857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24858  # It is also a way to make sure we got the proper file name for the real test later on.
24859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24860  if test "x$test_shortpath" = x; then
24861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24862$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24863    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24864  fi
24865
24866  # Call helper function which possibly converts this using DOS-style short mode.
24867  # If so, the updated path is stored in $new_path.
24868
24869  input_path="$new_path"
24870  # Check if we need to convert this using DOS-style short mode. If the path
24871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24872  # take no chances and rewrite it.
24873  # Note: m4 eats our [], so we need to use [ and ] instead.
24874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24875  if test "x$has_forbidden_chars" != x; then
24876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24880      # Going to short mode and back again did indeed matter. Since short mode is
24881      # case insensitive, let's make it lowercase to improve readability.
24882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883      # Now convert it back to Unix-style (cygpath)
24884      input_path=`$CYGPATH -u "$shortmode_path"`
24885      new_path="$input_path"
24886    fi
24887  fi
24888
24889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24890  if test "x$test_cygdrive_prefix" = x; then
24891    # As a simple fix, exclude /usr/bin since it's not a real path.
24892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24894      # a path prefixed by /cygdrive for fixpath to work.
24895      new_path="$CYGWIN_ROOT_PATH$input_path"
24896    fi
24897  fi
24898
24899
24900  if test "x$path" != "x$new_path"; then
24901    BOOT_JDK="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904  fi
24905
24906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907
24908  path="$BOOT_JDK"
24909  has_colon=`$ECHO $path | $GREP ^.:`
24910  new_path="$path"
24911  if test "x$has_colon" = x; then
24912    # Not in mixed or Windows style, start by that.
24913    new_path=`cmd //c echo $path`
24914  fi
24915
24916
24917  input_path="$new_path"
24918  # Check if we need to convert this using DOS-style short mode. If the path
24919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920  # take no chances and rewrite it.
24921  # Note: m4 eats our [], so we need to use [ and ] instead.
24922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24923  if test "x$has_forbidden_chars" != x; then
24924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926  fi
24927
24928
24929  windows_path="$new_path"
24930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931    unix_path=`$CYGPATH -u "$windows_path"`
24932    new_path="$unix_path"
24933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24935    new_path="$unix_path"
24936  fi
24937
24938  if test "x$path" != "x$new_path"; then
24939    BOOT_JDK="$new_path"
24940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24942  fi
24943
24944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24946
24947    else
24948      # We're on a unix platform. Hooray! :)
24949      path="$BOOT_JDK"
24950      has_space=`$ECHO "$path" | $GREP " "`
24951      if test "x$has_space" != x; then
24952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24955      fi
24956
24957      # Use eval to expand a potential ~
24958      eval path="$path"
24959      if test ! -f "$path" && test ! -d "$path"; then
24960        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24961      fi
24962
24963      if test -d "$path"; then
24964        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24965      else
24966        dir="`$DIRNAME "$path"`"
24967        base="`$BASENAME "$path"`"
24968        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24969      fi
24970    fi
24971  fi
24972
24973            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24974$as_echo_n "checking for Boot JDK... " >&6; }
24975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24976$as_echo "$BOOT_JDK" >&6; }
24977            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24978$as_echo_n "checking Boot JDK version... " >&6; }
24979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24981$as_echo "$BOOT_JDK_VERSION" >&6; }
24982          fi # end check jdk version
24983        fi # end check javac
24984      fi # end check java
24985    fi # end check boot jdk found
24986  fi
24987
24988  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24989    # Having specified an argument which is incorrect will produce an instant failure;
24990    # we should not go on looking
24991    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24992  fi
24993
24994  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24995
24996  if test "x$BOOT_JDK_FOUND" = xno; then
24997    # Now execute the test
24998
24999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25000    # First check at user selected default
25001
25002  if test "x$BOOT_JDK_FOUND" = xno; then
25003    # Now execute the test
25004
25005  if test -x /usr/libexec/java_home; then
25006    BOOT_JDK=`/usr/libexec/java_home `
25007    BOOT_JDK_FOUND=maybe
25008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25009$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25010  fi
25011
25012
25013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25015      # Do we have a bin/java?
25016      if test ! -x "$BOOT_JDK/bin/java"; then
25017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25019        BOOT_JDK_FOUND=no
25020      else
25021        # Do we have a bin/javac?
25022        if test ! -x "$BOOT_JDK/bin/javac"; then
25023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25027          BOOT_JDK_FOUND=no
25028        else
25029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25031
25032          # Extra M4 quote needed to protect [] in grep expression.
25033          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25034          if test "x$FOUND_CORRECT_VERSION" = x; then
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25039            BOOT_JDK_FOUND=no
25040          else
25041            # We're done! :-)
25042            BOOT_JDK_FOUND=yes
25043
25044  # Only process if variable expands to non-empty
25045
25046  if test "x$BOOT_JDK" != x; then
25047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25048
25049  # Input might be given as Windows format, start by converting to
25050  # unix format.
25051  path="$BOOT_JDK"
25052  new_path=`$CYGPATH -u "$path"`
25053
25054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25057  # "foo.exe" is OK but "foo" is an error.
25058  #
25059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25060  # It is also a way to make sure we got the proper file name for the real test later on.
25061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25062  if test "x$test_shortpath" = x; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25066  fi
25067
25068  # Call helper function which possibly converts this using DOS-style short mode.
25069  # If so, the updated path is stored in $new_path.
25070
25071  input_path="$new_path"
25072  # Check if we need to convert this using DOS-style short mode. If the path
25073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25074  # take no chances and rewrite it.
25075  # Note: m4 eats our [], so we need to use [ and ] instead.
25076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25077  if test "x$has_forbidden_chars" != x; then
25078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25082      # Going to short mode and back again did indeed matter. Since short mode is
25083      # case insensitive, let's make it lowercase to improve readability.
25084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25085      # Now convert it back to Unix-style (cygpath)
25086      input_path=`$CYGPATH -u "$shortmode_path"`
25087      new_path="$input_path"
25088    fi
25089  fi
25090
25091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25092  if test "x$test_cygdrive_prefix" = x; then
25093    # As a simple fix, exclude /usr/bin since it's not a real path.
25094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25096      # a path prefixed by /cygdrive for fixpath to work.
25097      new_path="$CYGWIN_ROOT_PATH$input_path"
25098    fi
25099  fi
25100
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25109
25110  path="$BOOT_JDK"
25111  has_colon=`$ECHO $path | $GREP ^.:`
25112  new_path="$path"
25113  if test "x$has_colon" = x; then
25114    # Not in mixed or Windows style, start by that.
25115    new_path=`cmd //c echo $path`
25116  fi
25117
25118
25119  input_path="$new_path"
25120  # Check if we need to convert this using DOS-style short mode. If the path
25121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25122  # take no chances and rewrite it.
25123  # Note: m4 eats our [], so we need to use [ and ] instead.
25124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25125  if test "x$has_forbidden_chars" != x; then
25126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25128  fi
25129
25130
25131  windows_path="$new_path"
25132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25133    unix_path=`$CYGPATH -u "$windows_path"`
25134    new_path="$unix_path"
25135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25137    new_path="$unix_path"
25138  fi
25139
25140  if test "x$path" != "x$new_path"; then
25141    BOOT_JDK="$new_path"
25142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25144  fi
25145
25146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25148
25149    else
25150      # We're on a unix platform. Hooray! :)
25151      path="$BOOT_JDK"
25152      has_space=`$ECHO "$path" | $GREP " "`
25153      if test "x$has_space" != x; then
25154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25157      fi
25158
25159      # Use eval to expand a potential ~
25160      eval path="$path"
25161      if test ! -f "$path" && test ! -d "$path"; then
25162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25163      fi
25164
25165      if test -d "$path"; then
25166        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25167      else
25168        dir="`$DIRNAME "$path"`"
25169        base="`$BASENAME "$path"`"
25170        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25171      fi
25172    fi
25173  fi
25174
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25176$as_echo_n "checking for Boot JDK... " >&6; }
25177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25178$as_echo "$BOOT_JDK" >&6; }
25179            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25180$as_echo_n "checking Boot JDK version... " >&6; }
25181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25183$as_echo "$BOOT_JDK_VERSION" >&6; }
25184          fi # end check jdk version
25185        fi # end check javac
25186      fi # end check java
25187    fi # end check boot jdk found
25188  fi
25189
25190    # If that did not work out (e.g. too old), try explicit versions instead
25191
25192  if test "x$BOOT_JDK_FOUND" = xno; then
25193    # Now execute the test
25194
25195  if test -x /usr/libexec/java_home; then
25196    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25197    BOOT_JDK_FOUND=maybe
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25199$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25200  fi
25201
25202
25203    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25204    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25205      # Do we have a bin/java?
25206      if test ! -x "$BOOT_JDK/bin/java"; then
25207        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25209        BOOT_JDK_FOUND=no
25210      else
25211        # Do we have a bin/javac?
25212        if test ! -x "$BOOT_JDK/bin/javac"; then
25213          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25215          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25216$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25217          BOOT_JDK_FOUND=no
25218        else
25219          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25220          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25221
25222          # Extra M4 quote needed to protect [] in grep expression.
25223          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25224          if test "x$FOUND_CORRECT_VERSION" = x; then
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25228$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25229            BOOT_JDK_FOUND=no
25230          else
25231            # We're done! :-)
25232            BOOT_JDK_FOUND=yes
25233
25234  # Only process if variable expands to non-empty
25235
25236  if test "x$BOOT_JDK" != x; then
25237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25238
25239  # Input might be given as Windows format, start by converting to
25240  # unix format.
25241  path="$BOOT_JDK"
25242  new_path=`$CYGPATH -u "$path"`
25243
25244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25247  # "foo.exe" is OK but "foo" is an error.
25248  #
25249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25250  # It is also a way to make sure we got the proper file name for the real test later on.
25251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25252  if test "x$test_shortpath" = x; then
25253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25255    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25256  fi
25257
25258  # Call helper function which possibly converts this using DOS-style short mode.
25259  # If so, the updated path is stored in $new_path.
25260
25261  input_path="$new_path"
25262  # Check if we need to convert this using DOS-style short mode. If the path
25263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25264  # take no chances and rewrite it.
25265  # Note: m4 eats our [], so we need to use [ and ] instead.
25266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25267  if test "x$has_forbidden_chars" != x; then
25268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25272      # Going to short mode and back again did indeed matter. Since short mode is
25273      # case insensitive, let's make it lowercase to improve readability.
25274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25275      # Now convert it back to Unix-style (cygpath)
25276      input_path=`$CYGPATH -u "$shortmode_path"`
25277      new_path="$input_path"
25278    fi
25279  fi
25280
25281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25282  if test "x$test_cygdrive_prefix" = x; then
25283    # As a simple fix, exclude /usr/bin since it's not a real path.
25284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25286      # a path prefixed by /cygdrive for fixpath to work.
25287      new_path="$CYGWIN_ROOT_PATH$input_path"
25288    fi
25289  fi
25290
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25299
25300  path="$BOOT_JDK"
25301  has_colon=`$ECHO $path | $GREP ^.:`
25302  new_path="$path"
25303  if test "x$has_colon" = x; then
25304    # Not in mixed or Windows style, start by that.
25305    new_path=`cmd //c echo $path`
25306  fi
25307
25308
25309  input_path="$new_path"
25310  # Check if we need to convert this using DOS-style short mode. If the path
25311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25312  # take no chances and rewrite it.
25313  # Note: m4 eats our [], so we need to use [ and ] instead.
25314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25315  if test "x$has_forbidden_chars" != x; then
25316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318  fi
25319
25320
25321  windows_path="$new_path"
25322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25323    unix_path=`$CYGPATH -u "$windows_path"`
25324    new_path="$unix_path"
25325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25327    new_path="$unix_path"
25328  fi
25329
25330  if test "x$path" != "x$new_path"; then
25331    BOOT_JDK="$new_path"
25332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25334  fi
25335
25336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25338
25339    else
25340      # We're on a unix platform. Hooray! :)
25341      path="$BOOT_JDK"
25342      has_space=`$ECHO "$path" | $GREP " "`
25343      if test "x$has_space" != x; then
25344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25347      fi
25348
25349      # Use eval to expand a potential ~
25350      eval path="$path"
25351      if test ! -f "$path" && test ! -d "$path"; then
25352        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25353      fi
25354
25355      if test -d "$path"; then
25356        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25357      else
25358        dir="`$DIRNAME "$path"`"
25359        base="`$BASENAME "$path"`"
25360        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25361      fi
25362    fi
25363  fi
25364
25365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25366$as_echo_n "checking for Boot JDK... " >&6; }
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25368$as_echo "$BOOT_JDK" >&6; }
25369            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25370$as_echo_n "checking Boot JDK version... " >&6; }
25371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25373$as_echo "$BOOT_JDK_VERSION" >&6; }
25374          fi # end check jdk version
25375        fi # end check javac
25376      fi # end check java
25377    fi # end check boot jdk found
25378  fi
25379
25380
25381  if test "x$BOOT_JDK_FOUND" = xno; then
25382    # Now execute the test
25383
25384  if test -x /usr/libexec/java_home; then
25385    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25386    BOOT_JDK_FOUND=maybe
25387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25388$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25389  fi
25390
25391
25392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25394      # Do we have a bin/java?
25395      if test ! -x "$BOOT_JDK/bin/java"; then
25396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25398        BOOT_JDK_FOUND=no
25399      else
25400        # Do we have a bin/javac?
25401        if test ! -x "$BOOT_JDK/bin/javac"; then
25402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25406          BOOT_JDK_FOUND=no
25407        else
25408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25410
25411          # Extra M4 quote needed to protect [] in grep expression.
25412          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25413          if test "x$FOUND_CORRECT_VERSION" = x; then
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25418            BOOT_JDK_FOUND=no
25419          else
25420            # We're done! :-)
25421            BOOT_JDK_FOUND=yes
25422
25423  # Only process if variable expands to non-empty
25424
25425  if test "x$BOOT_JDK" != x; then
25426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25427
25428  # Input might be given as Windows format, start by converting to
25429  # unix format.
25430  path="$BOOT_JDK"
25431  new_path=`$CYGPATH -u "$path"`
25432
25433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25436  # "foo.exe" is OK but "foo" is an error.
25437  #
25438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25439  # It is also a way to make sure we got the proper file name for the real test later on.
25440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25441  if test "x$test_shortpath" = x; then
25442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25445  fi
25446
25447  # Call helper function which possibly converts this using DOS-style short mode.
25448  # If so, the updated path is stored in $new_path.
25449
25450  input_path="$new_path"
25451  # Check if we need to convert this using DOS-style short mode. If the path
25452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25453  # take no chances and rewrite it.
25454  # Note: m4 eats our [], so we need to use [ and ] instead.
25455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25456  if test "x$has_forbidden_chars" != x; then
25457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25461      # Going to short mode and back again did indeed matter. Since short mode is
25462      # case insensitive, let's make it lowercase to improve readability.
25463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25464      # Now convert it back to Unix-style (cygpath)
25465      input_path=`$CYGPATH -u "$shortmode_path"`
25466      new_path="$input_path"
25467    fi
25468  fi
25469
25470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25471  if test "x$test_cygdrive_prefix" = x; then
25472    # As a simple fix, exclude /usr/bin since it's not a real path.
25473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25475      # a path prefixed by /cygdrive for fixpath to work.
25476      new_path="$CYGWIN_ROOT_PATH$input_path"
25477    fi
25478  fi
25479
25480
25481  if test "x$path" != "x$new_path"; then
25482    BOOT_JDK="$new_path"
25483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25485  fi
25486
25487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25488
25489  path="$BOOT_JDK"
25490  has_colon=`$ECHO $path | $GREP ^.:`
25491  new_path="$path"
25492  if test "x$has_colon" = x; then
25493    # Not in mixed or Windows style, start by that.
25494    new_path=`cmd //c echo $path`
25495  fi
25496
25497
25498  input_path="$new_path"
25499  # Check if we need to convert this using DOS-style short mode. If the path
25500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25501  # take no chances and rewrite it.
25502  # Note: m4 eats our [], so we need to use [ and ] instead.
25503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25504  if test "x$has_forbidden_chars" != x; then
25505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25507  fi
25508
25509
25510  windows_path="$new_path"
25511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25512    unix_path=`$CYGPATH -u "$windows_path"`
25513    new_path="$unix_path"
25514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25516    new_path="$unix_path"
25517  fi
25518
25519  if test "x$path" != "x$new_path"; then
25520    BOOT_JDK="$new_path"
25521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25523  fi
25524
25525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25527
25528    else
25529      # We're on a unix platform. Hooray! :)
25530      path="$BOOT_JDK"
25531      has_space=`$ECHO "$path" | $GREP " "`
25532      if test "x$has_space" != x; then
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25536      fi
25537
25538      # Use eval to expand a potential ~
25539      eval path="$path"
25540      if test ! -f "$path" && test ! -d "$path"; then
25541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25542      fi
25543
25544      if test -d "$path"; then
25545        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25546      else
25547        dir="`$DIRNAME "$path"`"
25548        base="`$BASENAME "$path"`"
25549        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25550      fi
25551    fi
25552  fi
25553
25554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25555$as_echo_n "checking for Boot JDK... " >&6; }
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25557$as_echo "$BOOT_JDK" >&6; }
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25559$as_echo_n "checking Boot JDK version... " >&6; }
25560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25562$as_echo "$BOOT_JDK_VERSION" >&6; }
25563          fi # end check jdk version
25564        fi # end check javac
25565      fi # end check java
25566    fi # end check boot jdk found
25567  fi
25568
25569
25570  if test "x$BOOT_JDK_FOUND" = xno; then
25571    # Now execute the test
25572
25573  if test -x /usr/libexec/java_home; then
25574    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25575    BOOT_JDK_FOUND=maybe
25576    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25577$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25578  fi
25579
25580
25581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25583      # Do we have a bin/java?
25584      if test ! -x "$BOOT_JDK/bin/java"; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25587        BOOT_JDK_FOUND=no
25588      else
25589        # Do we have a bin/javac?
25590        if test ! -x "$BOOT_JDK/bin/javac"; then
25591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25595          BOOT_JDK_FOUND=no
25596        else
25597          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25598          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25599
25600          # Extra M4 quote needed to protect [] in grep expression.
25601          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25602          if test "x$FOUND_CORRECT_VERSION" = x; then
25603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25605            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25606$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25607            BOOT_JDK_FOUND=no
25608          else
25609            # We're done! :-)
25610            BOOT_JDK_FOUND=yes
25611
25612  # Only process if variable expands to non-empty
25613
25614  if test "x$BOOT_JDK" != x; then
25615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25616
25617  # Input might be given as Windows format, start by converting to
25618  # unix format.
25619  path="$BOOT_JDK"
25620  new_path=`$CYGPATH -u "$path"`
25621
25622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25625  # "foo.exe" is OK but "foo" is an error.
25626  #
25627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25628  # It is also a way to make sure we got the proper file name for the real test later on.
25629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25630  if test "x$test_shortpath" = x; then
25631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25634  fi
25635
25636  # Call helper function which possibly converts this using DOS-style short mode.
25637  # If so, the updated path is stored in $new_path.
25638
25639  input_path="$new_path"
25640  # Check if we need to convert this using DOS-style short mode. If the path
25641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25642  # take no chances and rewrite it.
25643  # Note: m4 eats our [], so we need to use [ and ] instead.
25644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25645  if test "x$has_forbidden_chars" != x; then
25646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25650      # Going to short mode and back again did indeed matter. Since short mode is
25651      # case insensitive, let's make it lowercase to improve readability.
25652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25653      # Now convert it back to Unix-style (cygpath)
25654      input_path=`$CYGPATH -u "$shortmode_path"`
25655      new_path="$input_path"
25656    fi
25657  fi
25658
25659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25660  if test "x$test_cygdrive_prefix" = x; then
25661    # As a simple fix, exclude /usr/bin since it's not a real path.
25662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25664      # a path prefixed by /cygdrive for fixpath to work.
25665      new_path="$CYGWIN_ROOT_PATH$input_path"
25666    fi
25667  fi
25668
25669
25670  if test "x$path" != "x$new_path"; then
25671    BOOT_JDK="$new_path"
25672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674  fi
25675
25676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25677
25678  path="$BOOT_JDK"
25679  has_colon=`$ECHO $path | $GREP ^.:`
25680  new_path="$path"
25681  if test "x$has_colon" = x; then
25682    # Not in mixed or Windows style, start by that.
25683    new_path=`cmd //c echo $path`
25684  fi
25685
25686
25687  input_path="$new_path"
25688  # Check if we need to convert this using DOS-style short mode. If the path
25689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25690  # take no chances and rewrite it.
25691  # Note: m4 eats our [], so we need to use [ and ] instead.
25692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25693  if test "x$has_forbidden_chars" != x; then
25694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25696  fi
25697
25698
25699  windows_path="$new_path"
25700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25701    unix_path=`$CYGPATH -u "$windows_path"`
25702    new_path="$unix_path"
25703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25705    new_path="$unix_path"
25706  fi
25707
25708  if test "x$path" != "x$new_path"; then
25709    BOOT_JDK="$new_path"
25710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25712  fi
25713
25714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25716
25717    else
25718      # We're on a unix platform. Hooray! :)
25719      path="$BOOT_JDK"
25720      has_space=`$ECHO "$path" | $GREP " "`
25721      if test "x$has_space" != x; then
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25725      fi
25726
25727      # Use eval to expand a potential ~
25728      eval path="$path"
25729      if test ! -f "$path" && test ! -d "$path"; then
25730        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25731      fi
25732
25733      if test -d "$path"; then
25734        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25735      else
25736        dir="`$DIRNAME "$path"`"
25737        base="`$BASENAME "$path"`"
25738        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25739      fi
25740    fi
25741  fi
25742
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25744$as_echo_n "checking for Boot JDK... " >&6; }
25745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25746$as_echo "$BOOT_JDK" >&6; }
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25748$as_echo_n "checking Boot JDK version... " >&6; }
25749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25751$as_echo "$BOOT_JDK_VERSION" >&6; }
25752          fi # end check jdk version
25753        fi # end check javac
25754      fi # end check java
25755    fi # end check boot jdk found
25756  fi
25757
25758  fi
25759
25760
25761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25763      # Do we have a bin/java?
25764      if test ! -x "$BOOT_JDK/bin/java"; then
25765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25767        BOOT_JDK_FOUND=no
25768      else
25769        # Do we have a bin/javac?
25770        if test ! -x "$BOOT_JDK/bin/javac"; then
25771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25775          BOOT_JDK_FOUND=no
25776        else
25777          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25778          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25779
25780          # Extra M4 quote needed to protect [] in grep expression.
25781          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25782          if test "x$FOUND_CORRECT_VERSION" = x; then
25783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25785            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25786$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25787            BOOT_JDK_FOUND=no
25788          else
25789            # We're done! :-)
25790            BOOT_JDK_FOUND=yes
25791
25792  # Only process if variable expands to non-empty
25793
25794  if test "x$BOOT_JDK" != x; then
25795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25796
25797  # Input might be given as Windows format, start by converting to
25798  # unix format.
25799  path="$BOOT_JDK"
25800  new_path=`$CYGPATH -u "$path"`
25801
25802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25805  # "foo.exe" is OK but "foo" is an error.
25806  #
25807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25808  # It is also a way to make sure we got the proper file name for the real test later on.
25809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25810  if test "x$test_shortpath" = x; then
25811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25814  fi
25815
25816  # Call helper function which possibly converts this using DOS-style short mode.
25817  # If so, the updated path is stored in $new_path.
25818
25819  input_path="$new_path"
25820  # Check if we need to convert this using DOS-style short mode. If the path
25821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25822  # take no chances and rewrite it.
25823  # Note: m4 eats our [], so we need to use [ and ] instead.
25824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25825  if test "x$has_forbidden_chars" != x; then
25826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25830      # Going to short mode and back again did indeed matter. Since short mode is
25831      # case insensitive, let's make it lowercase to improve readability.
25832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25833      # Now convert it back to Unix-style (cygpath)
25834      input_path=`$CYGPATH -u "$shortmode_path"`
25835      new_path="$input_path"
25836    fi
25837  fi
25838
25839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25840  if test "x$test_cygdrive_prefix" = x; then
25841    # As a simple fix, exclude /usr/bin since it's not a real path.
25842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25844      # a path prefixed by /cygdrive for fixpath to work.
25845      new_path="$CYGWIN_ROOT_PATH$input_path"
25846    fi
25847  fi
25848
25849
25850  if test "x$path" != "x$new_path"; then
25851    BOOT_JDK="$new_path"
25852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25854  fi
25855
25856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857
25858  path="$BOOT_JDK"
25859  has_colon=`$ECHO $path | $GREP ^.:`
25860  new_path="$path"
25861  if test "x$has_colon" = x; then
25862    # Not in mixed or Windows style, start by that.
25863    new_path=`cmd //c echo $path`
25864  fi
25865
25866
25867  input_path="$new_path"
25868  # Check if we need to convert this using DOS-style short mode. If the path
25869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25870  # take no chances and rewrite it.
25871  # Note: m4 eats our [], so we need to use [ and ] instead.
25872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25873  if test "x$has_forbidden_chars" != x; then
25874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25876  fi
25877
25878
25879  windows_path="$new_path"
25880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25881    unix_path=`$CYGPATH -u "$windows_path"`
25882    new_path="$unix_path"
25883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25885    new_path="$unix_path"
25886  fi
25887
25888  if test "x$path" != "x$new_path"; then
25889    BOOT_JDK="$new_path"
25890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25892  fi
25893
25894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25896
25897    else
25898      # We're on a unix platform. Hooray! :)
25899      path="$BOOT_JDK"
25900      has_space=`$ECHO "$path" | $GREP " "`
25901      if test "x$has_space" != x; then
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25905      fi
25906
25907      # Use eval to expand a potential ~
25908      eval path="$path"
25909      if test ! -f "$path" && test ! -d "$path"; then
25910        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25911      fi
25912
25913      if test -d "$path"; then
25914        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25915      else
25916        dir="`$DIRNAME "$path"`"
25917        base="`$BASENAME "$path"`"
25918        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25919      fi
25920    fi
25921  fi
25922
25923            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25924$as_echo_n "checking for Boot JDK... " >&6; }
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25926$as_echo "$BOOT_JDK" >&6; }
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25928$as_echo_n "checking Boot JDK version... " >&6; }
25929            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25931$as_echo "$BOOT_JDK_VERSION" >&6; }
25932          fi # end check jdk version
25933        fi # end check javac
25934      fi # end check java
25935    fi # end check boot jdk found
25936  fi
25937
25938
25939  # Test: Is $JAVA_HOME set?
25940
25941  if test "x$BOOT_JDK_FOUND" = xno; then
25942    # Now execute the test
25943
25944  if test "x$JAVA_HOME" != x; then
25945    JAVA_HOME_PROCESSED="$JAVA_HOME"
25946
25947  # Only process if variable expands to non-empty
25948
25949  if test "x$JAVA_HOME_PROCESSED" != x; then
25950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951
25952  # Input might be given as Windows format, start by converting to
25953  # unix format.
25954  path="$JAVA_HOME_PROCESSED"
25955  new_path=`$CYGPATH -u "$path"`
25956
25957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25960  # "foo.exe" is OK but "foo" is an error.
25961  #
25962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25963  # It is also a way to make sure we got the proper file name for the real test later on.
25964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25965  if test "x$test_shortpath" = x; then
25966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25967$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25968    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25969  fi
25970
25971  # Call helper function which possibly converts this using DOS-style short mode.
25972  # If so, the updated path is stored in $new_path.
25973
25974  input_path="$new_path"
25975  # Check if we need to convert this using DOS-style short mode. If the path
25976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25977  # take no chances and rewrite it.
25978  # Note: m4 eats our [], so we need to use [ and ] instead.
25979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25980  if test "x$has_forbidden_chars" != x; then
25981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25985      # Going to short mode and back again did indeed matter. Since short mode is
25986      # case insensitive, let's make it lowercase to improve readability.
25987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25988      # Now convert it back to Unix-style (cygpath)
25989      input_path=`$CYGPATH -u "$shortmode_path"`
25990      new_path="$input_path"
25991    fi
25992  fi
25993
25994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25995  if test "x$test_cygdrive_prefix" = x; then
25996    # As a simple fix, exclude /usr/bin since it's not a real path.
25997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25999      # a path prefixed by /cygdrive for fixpath to work.
26000      new_path="$CYGWIN_ROOT_PATH$input_path"
26001    fi
26002  fi
26003
26004
26005  if test "x$path" != "x$new_path"; then
26006    JAVA_HOME_PROCESSED="$new_path"
26007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26008$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26009  fi
26010
26011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26012
26013  path="$JAVA_HOME_PROCESSED"
26014  has_colon=`$ECHO $path | $GREP ^.:`
26015  new_path="$path"
26016  if test "x$has_colon" = x; then
26017    # Not in mixed or Windows style, start by that.
26018    new_path=`cmd //c echo $path`
26019  fi
26020
26021
26022  input_path="$new_path"
26023  # Check if we need to convert this using DOS-style short mode. If the path
26024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26025  # take no chances and rewrite it.
26026  # Note: m4 eats our [], so we need to use [ and ] instead.
26027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26028  if test "x$has_forbidden_chars" != x; then
26029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26031  fi
26032
26033
26034  windows_path="$new_path"
26035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26036    unix_path=`$CYGPATH -u "$windows_path"`
26037    new_path="$unix_path"
26038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26040    new_path="$unix_path"
26041  fi
26042
26043  if test "x$path" != "x$new_path"; then
26044    JAVA_HOME_PROCESSED="$new_path"
26045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26046$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26047  fi
26048
26049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26051
26052    else
26053      # We're on a unix platform. Hooray! :)
26054      path="$JAVA_HOME_PROCESSED"
26055      has_space=`$ECHO "$path" | $GREP " "`
26056      if test "x$has_space" != x; then
26057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26058$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26060      fi
26061
26062      # Use eval to expand a potential ~
26063      eval path="$path"
26064      if test ! -f "$path" && test ! -d "$path"; then
26065        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26066      fi
26067
26068      if test -d "$path"; then
26069        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26070      else
26071        dir="`$DIRNAME "$path"`"
26072        base="`$BASENAME "$path"`"
26073        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26074      fi
26075    fi
26076  fi
26077
26078    if test ! -d "$JAVA_HOME_PROCESSED"; then
26079      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26080$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26081    else
26082      # Aha, the user has set a JAVA_HOME
26083      # let us use that as the Boot JDK.
26084      BOOT_JDK="$JAVA_HOME_PROCESSED"
26085      BOOT_JDK_FOUND=maybe
26086      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26087$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26088    fi
26089  fi
26090
26091
26092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26094      # Do we have a bin/java?
26095      if test ! -x "$BOOT_JDK/bin/java"; then
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26098        BOOT_JDK_FOUND=no
26099      else
26100        # Do we have a bin/javac?
26101        if test ! -x "$BOOT_JDK/bin/javac"; then
26102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26106          BOOT_JDK_FOUND=no
26107        else
26108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26110
26111          # Extra M4 quote needed to protect [] in grep expression.
26112          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26113          if test "x$FOUND_CORRECT_VERSION" = x; then
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26118            BOOT_JDK_FOUND=no
26119          else
26120            # We're done! :-)
26121            BOOT_JDK_FOUND=yes
26122
26123  # Only process if variable expands to non-empty
26124
26125  if test "x$BOOT_JDK" != x; then
26126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26127
26128  # Input might be given as Windows format, start by converting to
26129  # unix format.
26130  path="$BOOT_JDK"
26131  new_path=`$CYGPATH -u "$path"`
26132
26133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26136  # "foo.exe" is OK but "foo" is an error.
26137  #
26138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26139  # It is also a way to make sure we got the proper file name for the real test later on.
26140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26141  if test "x$test_shortpath" = x; then
26142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26145  fi
26146
26147  # Call helper function which possibly converts this using DOS-style short mode.
26148  # If so, the updated path is stored in $new_path.
26149
26150  input_path="$new_path"
26151  # Check if we need to convert this using DOS-style short mode. If the path
26152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26153  # take no chances and rewrite it.
26154  # Note: m4 eats our [], so we need to use [ and ] instead.
26155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26156  if test "x$has_forbidden_chars" != x; then
26157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26161      # Going to short mode and back again did indeed matter. Since short mode is
26162      # case insensitive, let's make it lowercase to improve readability.
26163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26164      # Now convert it back to Unix-style (cygpath)
26165      input_path=`$CYGPATH -u "$shortmode_path"`
26166      new_path="$input_path"
26167    fi
26168  fi
26169
26170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26171  if test "x$test_cygdrive_prefix" = x; then
26172    # As a simple fix, exclude /usr/bin since it's not a real path.
26173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26175      # a path prefixed by /cygdrive for fixpath to work.
26176      new_path="$CYGWIN_ROOT_PATH$input_path"
26177    fi
26178  fi
26179
26180
26181  if test "x$path" != "x$new_path"; then
26182    BOOT_JDK="$new_path"
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26185  fi
26186
26187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26188
26189  path="$BOOT_JDK"
26190  has_colon=`$ECHO $path | $GREP ^.:`
26191  new_path="$path"
26192  if test "x$has_colon" = x; then
26193    # Not in mixed or Windows style, start by that.
26194    new_path=`cmd //c echo $path`
26195  fi
26196
26197
26198  input_path="$new_path"
26199  # Check if we need to convert this using DOS-style short mode. If the path
26200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26201  # take no chances and rewrite it.
26202  # Note: m4 eats our [], so we need to use [ and ] instead.
26203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26204  if test "x$has_forbidden_chars" != x; then
26205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26207  fi
26208
26209
26210  windows_path="$new_path"
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212    unix_path=`$CYGPATH -u "$windows_path"`
26213    new_path="$unix_path"
26214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26216    new_path="$unix_path"
26217  fi
26218
26219  if test "x$path" != "x$new_path"; then
26220    BOOT_JDK="$new_path"
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26223  fi
26224
26225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26227
26228    else
26229      # We're on a unix platform. Hooray! :)
26230      path="$BOOT_JDK"
26231      has_space=`$ECHO "$path" | $GREP " "`
26232      if test "x$has_space" != x; then
26233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26236      fi
26237
26238      # Use eval to expand a potential ~
26239      eval path="$path"
26240      if test ! -f "$path" && test ! -d "$path"; then
26241        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26242      fi
26243
26244      if test -d "$path"; then
26245        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26246      else
26247        dir="`$DIRNAME "$path"`"
26248        base="`$BASENAME "$path"`"
26249        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26250      fi
26251    fi
26252  fi
26253
26254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26255$as_echo_n "checking for Boot JDK... " >&6; }
26256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26257$as_echo "$BOOT_JDK" >&6; }
26258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26259$as_echo_n "checking Boot JDK version... " >&6; }
26260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26262$as_echo "$BOOT_JDK_VERSION" >&6; }
26263          fi # end check jdk version
26264        fi # end check javac
26265      fi # end check java
26266    fi # end check boot jdk found
26267  fi
26268
26269
26270  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26271
26272  if test "x$BOOT_JDK_FOUND" = xno; then
26273    # Now execute the test
26274
26275  # Extract the first word of "javac", so it can be a program name with args.
26276set dummy javac; ac_word=$2
26277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26278$as_echo_n "checking for $ac_word... " >&6; }
26279if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26280  $as_echo_n "(cached) " >&6
26281else
26282  case $JAVAC_CHECK in
26283  [\\/]* | ?:[\\/]*)
26284  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26285  ;;
26286  *)
26287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26288for as_dir in $PATH
26289do
26290  IFS=$as_save_IFS
26291  test -z "$as_dir" && as_dir=.
26292    for ac_exec_ext in '' $ac_executable_extensions; do
26293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26294    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26296    break 2
26297  fi
26298done
26299  done
26300IFS=$as_save_IFS
26301
26302  ;;
26303esac
26304fi
26305JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26306if test -n "$JAVAC_CHECK"; then
26307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26308$as_echo "$JAVAC_CHECK" >&6; }
26309else
26310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26311$as_echo "no" >&6; }
26312fi
26313
26314
26315  # Extract the first word of "java", so it can be a program name with args.
26316set dummy java; ac_word=$2
26317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26318$as_echo_n "checking for $ac_word... " >&6; }
26319if ${ac_cv_path_JAVA_CHECK+:} false; then :
26320  $as_echo_n "(cached) " >&6
26321else
26322  case $JAVA_CHECK in
26323  [\\/]* | ?:[\\/]*)
26324  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26325  ;;
26326  *)
26327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26328for as_dir in $PATH
26329do
26330  IFS=$as_save_IFS
26331  test -z "$as_dir" && as_dir=.
26332    for ac_exec_ext in '' $ac_executable_extensions; do
26333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26334    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26336    break 2
26337  fi
26338done
26339  done
26340IFS=$as_save_IFS
26341
26342  ;;
26343esac
26344fi
26345JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26346if test -n "$JAVA_CHECK"; then
26347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26348$as_echo "$JAVA_CHECK" >&6; }
26349else
26350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26351$as_echo "no" >&6; }
26352fi
26353
26354
26355  BINARY="$JAVAC_CHECK"
26356  if test "x$JAVAC_CHECK" = x; then
26357    BINARY="$JAVA_CHECK"
26358  fi
26359  if test "x$BINARY" != x; then
26360    # So there is a java(c) binary, it might be part of a JDK.
26361    # Lets find the JDK/JRE directory by following symbolic links.
26362    # Linux/GNU systems often have links from /usr/bin/java to
26363    # /etc/alternatives/java to the real JDK binary.
26364
26365  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26366    # Follow a chain of symbolic links. Use readlink
26367    # where it exists, else fall back to horribly
26368    # complicated shell code.
26369    if test "x$READLINK_TESTED" != yes; then
26370      # On MacOSX there is a readlink tool with a different
26371      # purpose than the GNU readlink tool. Check the found readlink.
26372      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26373      if test "x$ISGNU" = x; then
26374        # A readlink that we do not know how to use.
26375        # Are there other non-GNU readlinks out there?
26376        READLINK_TESTED=yes
26377        READLINK=
26378      fi
26379    fi
26380
26381    if test "x$READLINK" != x; then
26382      BINARY=`$READLINK -f $BINARY`
26383    else
26384      # Save the current directory for restoring afterwards
26385      STARTDIR=$PWD
26386      COUNTER=0
26387      sym_link_dir=`$DIRNAME $BINARY`
26388      sym_link_file=`$BASENAME $BINARY`
26389      cd $sym_link_dir
26390      # Use -P flag to resolve symlinks in directories.
26391      cd `$THEPWDCMD -P`
26392      sym_link_dir=`$THEPWDCMD -P`
26393      # Resolve file symlinks
26394      while test $COUNTER -lt 20; do
26395        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26396        if test "x$ISLINK" == x; then
26397          # This is not a symbolic link! We are done!
26398          break
26399        fi
26400        # Again resolve directory symlinks since the target of the just found
26401        # link could be in a different directory
26402        cd `$DIRNAME $ISLINK`
26403        sym_link_dir=`$THEPWDCMD -P`
26404        sym_link_file=`$BASENAME $ISLINK`
26405        let COUNTER=COUNTER+1
26406      done
26407      cd $STARTDIR
26408      BINARY=$sym_link_dir/$sym_link_file
26409    fi
26410  fi
26411
26412    BOOT_JDK=`dirname "$BINARY"`
26413    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26414    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26415      # Looks like we found ourselves an JDK
26416      BOOT_JDK_FOUND=maybe
26417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26418$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26419    fi
26420  fi
26421
26422
26423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26425      # Do we have a bin/java?
26426      if test ! -x "$BOOT_JDK/bin/java"; then
26427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26429        BOOT_JDK_FOUND=no
26430      else
26431        # Do we have a bin/javac?
26432        if test ! -x "$BOOT_JDK/bin/javac"; then
26433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26437          BOOT_JDK_FOUND=no
26438        else
26439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26441
26442          # Extra M4 quote needed to protect [] in grep expression.
26443          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26444          if test "x$FOUND_CORRECT_VERSION" = x; then
26445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26449            BOOT_JDK_FOUND=no
26450          else
26451            # We're done! :-)
26452            BOOT_JDK_FOUND=yes
26453
26454  # Only process if variable expands to non-empty
26455
26456  if test "x$BOOT_JDK" != x; then
26457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26458
26459  # Input might be given as Windows format, start by converting to
26460  # unix format.
26461  path="$BOOT_JDK"
26462  new_path=`$CYGPATH -u "$path"`
26463
26464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26467  # "foo.exe" is OK but "foo" is an error.
26468  #
26469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26470  # It is also a way to make sure we got the proper file name for the real test later on.
26471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26472  if test "x$test_shortpath" = x; then
26473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26476  fi
26477
26478  # Call helper function which possibly converts this using DOS-style short mode.
26479  # If so, the updated path is stored in $new_path.
26480
26481  input_path="$new_path"
26482  # Check if we need to convert this using DOS-style short mode. If the path
26483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26484  # take no chances and rewrite it.
26485  # Note: m4 eats our [], so we need to use [ and ] instead.
26486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26487  if test "x$has_forbidden_chars" != x; then
26488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26492      # Going to short mode and back again did indeed matter. Since short mode is
26493      # case insensitive, let's make it lowercase to improve readability.
26494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26495      # Now convert it back to Unix-style (cygpath)
26496      input_path=`$CYGPATH -u "$shortmode_path"`
26497      new_path="$input_path"
26498    fi
26499  fi
26500
26501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26502  if test "x$test_cygdrive_prefix" = x; then
26503    # As a simple fix, exclude /usr/bin since it's not a real path.
26504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26506      # a path prefixed by /cygdrive for fixpath to work.
26507      new_path="$CYGWIN_ROOT_PATH$input_path"
26508    fi
26509  fi
26510
26511
26512  if test "x$path" != "x$new_path"; then
26513    BOOT_JDK="$new_path"
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26516  fi
26517
26518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519
26520  path="$BOOT_JDK"
26521  has_colon=`$ECHO $path | $GREP ^.:`
26522  new_path="$path"
26523  if test "x$has_colon" = x; then
26524    # Not in mixed or Windows style, start by that.
26525    new_path=`cmd //c echo $path`
26526  fi
26527
26528
26529  input_path="$new_path"
26530  # Check if we need to convert this using DOS-style short mode. If the path
26531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26532  # take no chances and rewrite it.
26533  # Note: m4 eats our [], so we need to use [ and ] instead.
26534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26535  if test "x$has_forbidden_chars" != x; then
26536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26538  fi
26539
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550  if test "x$path" != "x$new_path"; then
26551    BOOT_JDK="$new_path"
26552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26554  fi
26555
26556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26558
26559    else
26560      # We're on a unix platform. Hooray! :)
26561      path="$BOOT_JDK"
26562      has_space=`$ECHO "$path" | $GREP " "`
26563      if test "x$has_space" != x; then
26564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26567      fi
26568
26569      # Use eval to expand a potential ~
26570      eval path="$path"
26571      if test ! -f "$path" && test ! -d "$path"; then
26572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26573      fi
26574
26575      if test -d "$path"; then
26576        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26577      else
26578        dir="`$DIRNAME "$path"`"
26579        base="`$BASENAME "$path"`"
26580        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26581      fi
26582    fi
26583  fi
26584
26585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26586$as_echo_n "checking for Boot JDK... " >&6; }
26587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26588$as_echo "$BOOT_JDK" >&6; }
26589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26590$as_echo_n "checking Boot JDK version... " >&6; }
26591            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26593$as_echo "$BOOT_JDK_VERSION" >&6; }
26594          fi # end check jdk version
26595        fi # end check javac
26596      fi # end check java
26597    fi # end check boot jdk found
26598  fi
26599
26600
26601  # Test: Is there a JDK installed in default, well-known locations?
26602
26603  if test "x$BOOT_JDK_FOUND" = xno; then
26604    # Now execute the test
26605
26606  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26607
26608  if test "x$BOOT_JDK_FOUND" = xno; then
26609    # Now execute the test
26610
26611  if test "x$ProgramW6432" != x; then
26612    VIRTUAL_DIR="$ProgramW6432/Java"
26613
26614  windows_path="$VIRTUAL_DIR"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    VIRTUAL_DIR="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    VIRTUAL_DIR="$unix_path"
26621  fi
26622
26623
26624  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26625  BOOT_JDK_SUFFIX=""
26626  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26627  if test "x$ALL_JDKS_FOUND" != x; then
26628    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26629
26630  if test "x$BOOT_JDK_FOUND" = xno; then
26631    # Now execute the test
26632
26633        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26634        if test -d "$BOOT_JDK"; then
26635          BOOT_JDK_FOUND=maybe
26636          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26637$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26638        fi
26639
26640
26641    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26642    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26643      # Do we have a bin/java?
26644      if test ! -x "$BOOT_JDK/bin/java"; then
26645        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26647        BOOT_JDK_FOUND=no
26648      else
26649        # Do we have a bin/javac?
26650        if test ! -x "$BOOT_JDK/bin/javac"; then
26651          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26653          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26654$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26655          BOOT_JDK_FOUND=no
26656        else
26657          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26658          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26659
26660          # Extra M4 quote needed to protect [] in grep expression.
26661          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26662          if test "x$FOUND_CORRECT_VERSION" = x; then
26663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26666$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26667            BOOT_JDK_FOUND=no
26668          else
26669            # We're done! :-)
26670            BOOT_JDK_FOUND=yes
26671
26672  # Only process if variable expands to non-empty
26673
26674  if test "x$BOOT_JDK" != x; then
26675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26676
26677  # Input might be given as Windows format, start by converting to
26678  # unix format.
26679  path="$BOOT_JDK"
26680  new_path=`$CYGPATH -u "$path"`
26681
26682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26685  # "foo.exe" is OK but "foo" is an error.
26686  #
26687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26688  # It is also a way to make sure we got the proper file name for the real test later on.
26689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26690  if test "x$test_shortpath" = x; then
26691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26693    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26694  fi
26695
26696  # Call helper function which possibly converts this using DOS-style short mode.
26697  # If so, the updated path is stored in $new_path.
26698
26699  input_path="$new_path"
26700  # Check if we need to convert this using DOS-style short mode. If the path
26701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26702  # take no chances and rewrite it.
26703  # Note: m4 eats our [], so we need to use [ and ] instead.
26704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26705  if test "x$has_forbidden_chars" != x; then
26706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26710      # Going to short mode and back again did indeed matter. Since short mode is
26711      # case insensitive, let's make it lowercase to improve readability.
26712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26713      # Now convert it back to Unix-style (cygpath)
26714      input_path=`$CYGPATH -u "$shortmode_path"`
26715      new_path="$input_path"
26716    fi
26717  fi
26718
26719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26720  if test "x$test_cygdrive_prefix" = x; then
26721    # As a simple fix, exclude /usr/bin since it's not a real path.
26722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26724      # a path prefixed by /cygdrive for fixpath to work.
26725      new_path="$CYGWIN_ROOT_PATH$input_path"
26726    fi
26727  fi
26728
26729
26730  if test "x$path" != "x$new_path"; then
26731    BOOT_JDK="$new_path"
26732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26734  fi
26735
26736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26737
26738  path="$BOOT_JDK"
26739  has_colon=`$ECHO $path | $GREP ^.:`
26740  new_path="$path"
26741  if test "x$has_colon" = x; then
26742    # Not in mixed or Windows style, start by that.
26743    new_path=`cmd //c echo $path`
26744  fi
26745
26746
26747  input_path="$new_path"
26748  # Check if we need to convert this using DOS-style short mode. If the path
26749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26750  # take no chances and rewrite it.
26751  # Note: m4 eats our [], so we need to use [ and ] instead.
26752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26753  if test "x$has_forbidden_chars" != x; then
26754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26756  fi
26757
26758
26759  windows_path="$new_path"
26760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761    unix_path=`$CYGPATH -u "$windows_path"`
26762    new_path="$unix_path"
26763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26765    new_path="$unix_path"
26766  fi
26767
26768  if test "x$path" != "x$new_path"; then
26769    BOOT_JDK="$new_path"
26770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26772  fi
26773
26774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26776
26777    else
26778      # We're on a unix platform. Hooray! :)
26779      path="$BOOT_JDK"
26780      has_space=`$ECHO "$path" | $GREP " "`
26781      if test "x$has_space" != x; then
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26785      fi
26786
26787      # Use eval to expand a potential ~
26788      eval path="$path"
26789      if test ! -f "$path" && test ! -d "$path"; then
26790        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26791      fi
26792
26793      if test -d "$path"; then
26794        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26795      else
26796        dir="`$DIRNAME "$path"`"
26797        base="`$BASENAME "$path"`"
26798        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26799      fi
26800    fi
26801  fi
26802
26803            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26804$as_echo_n "checking for Boot JDK... " >&6; }
26805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26806$as_echo "$BOOT_JDK" >&6; }
26807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26808$as_echo_n "checking Boot JDK version... " >&6; }
26809            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26811$as_echo "$BOOT_JDK_VERSION" >&6; }
26812          fi # end check jdk version
26813        fi # end check javac
26814      fi # end check java
26815    fi # end check boot jdk found
26816  fi
26817
26818    done
26819  fi
26820
26821  fi
26822
26823
26824    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26825    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26826      # Do we have a bin/java?
26827      if test ! -x "$BOOT_JDK/bin/java"; then
26828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26830        BOOT_JDK_FOUND=no
26831      else
26832        # Do we have a bin/javac?
26833        if test ! -x "$BOOT_JDK/bin/javac"; then
26834          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26836          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26837$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26838          BOOT_JDK_FOUND=no
26839        else
26840          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26841          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26842
26843          # Extra M4 quote needed to protect [] in grep expression.
26844          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26845          if test "x$FOUND_CORRECT_VERSION" = x; then
26846            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26848            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26849$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26850            BOOT_JDK_FOUND=no
26851          else
26852            # We're done! :-)
26853            BOOT_JDK_FOUND=yes
26854
26855  # Only process if variable expands to non-empty
26856
26857  if test "x$BOOT_JDK" != x; then
26858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859
26860  # Input might be given as Windows format, start by converting to
26861  # unix format.
26862  path="$BOOT_JDK"
26863  new_path=`$CYGPATH -u "$path"`
26864
26865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26868  # "foo.exe" is OK but "foo" is an error.
26869  #
26870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26871  # It is also a way to make sure we got the proper file name for the real test later on.
26872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26873  if test "x$test_shortpath" = x; then
26874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26876    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26877  fi
26878
26879  # Call helper function which possibly converts this using DOS-style short mode.
26880  # If so, the updated path is stored in $new_path.
26881
26882  input_path="$new_path"
26883  # Check if we need to convert this using DOS-style short mode. If the path
26884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26885  # take no chances and rewrite it.
26886  # Note: m4 eats our [], so we need to use [ and ] instead.
26887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26888  if test "x$has_forbidden_chars" != x; then
26889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26893      # Going to short mode and back again did indeed matter. Since short mode is
26894      # case insensitive, let's make it lowercase to improve readability.
26895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26896      # Now convert it back to Unix-style (cygpath)
26897      input_path=`$CYGPATH -u "$shortmode_path"`
26898      new_path="$input_path"
26899    fi
26900  fi
26901
26902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26903  if test "x$test_cygdrive_prefix" = x; then
26904    # As a simple fix, exclude /usr/bin since it's not a real path.
26905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26907      # a path prefixed by /cygdrive for fixpath to work.
26908      new_path="$CYGWIN_ROOT_PATH$input_path"
26909    fi
26910  fi
26911
26912
26913  if test "x$path" != "x$new_path"; then
26914    BOOT_JDK="$new_path"
26915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26917  fi
26918
26919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26920
26921  path="$BOOT_JDK"
26922  has_colon=`$ECHO $path | $GREP ^.:`
26923  new_path="$path"
26924  if test "x$has_colon" = x; then
26925    # Not in mixed or Windows style, start by that.
26926    new_path=`cmd //c echo $path`
26927  fi
26928
26929
26930  input_path="$new_path"
26931  # Check if we need to convert this using DOS-style short mode. If the path
26932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26933  # take no chances and rewrite it.
26934  # Note: m4 eats our [], so we need to use [ and ] instead.
26935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26936  if test "x$has_forbidden_chars" != x; then
26937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26939  fi
26940
26941
26942  windows_path="$new_path"
26943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26944    unix_path=`$CYGPATH -u "$windows_path"`
26945    new_path="$unix_path"
26946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26948    new_path="$unix_path"
26949  fi
26950
26951  if test "x$path" != "x$new_path"; then
26952    BOOT_JDK="$new_path"
26953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26955  fi
26956
26957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26959
26960    else
26961      # We're on a unix platform. Hooray! :)
26962      path="$BOOT_JDK"
26963      has_space=`$ECHO "$path" | $GREP " "`
26964      if test "x$has_space" != x; then
26965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26966$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26967        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26968      fi
26969
26970      # Use eval to expand a potential ~
26971      eval path="$path"
26972      if test ! -f "$path" && test ! -d "$path"; then
26973        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26974      fi
26975
26976      if test -d "$path"; then
26977        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26978      else
26979        dir="`$DIRNAME "$path"`"
26980        base="`$BASENAME "$path"`"
26981        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26982      fi
26983    fi
26984  fi
26985
26986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26987$as_echo_n "checking for Boot JDK... " >&6; }
26988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26989$as_echo "$BOOT_JDK" >&6; }
26990            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26991$as_echo_n "checking Boot JDK version... " >&6; }
26992            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26994$as_echo "$BOOT_JDK_VERSION" >&6; }
26995          fi # end check jdk version
26996        fi # end check javac
26997      fi # end check java
26998    fi # end check boot jdk found
26999  fi
27000
27001
27002  if test "x$BOOT_JDK_FOUND" = xno; then
27003    # Now execute the test
27004
27005  if test "x$PROGRAMW6432" != x; then
27006    VIRTUAL_DIR="$PROGRAMW6432/Java"
27007
27008  windows_path="$VIRTUAL_DIR"
27009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010    unix_path=`$CYGPATH -u "$windows_path"`
27011    VIRTUAL_DIR="$unix_path"
27012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014    VIRTUAL_DIR="$unix_path"
27015  fi
27016
27017
27018  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27019  BOOT_JDK_SUFFIX=""
27020  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27021  if test "x$ALL_JDKS_FOUND" != x; then
27022    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27023
27024  if test "x$BOOT_JDK_FOUND" = xno; then
27025    # Now execute the test
27026
27027        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27028        if test -d "$BOOT_JDK"; then
27029          BOOT_JDK_FOUND=maybe
27030          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27031$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27032        fi
27033
27034
27035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27037      # Do we have a bin/java?
27038      if test ! -x "$BOOT_JDK/bin/java"; then
27039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27041        BOOT_JDK_FOUND=no
27042      else
27043        # Do we have a bin/javac?
27044        if test ! -x "$BOOT_JDK/bin/javac"; then
27045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27049          BOOT_JDK_FOUND=no
27050        else
27051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27053
27054          # Extra M4 quote needed to protect [] in grep expression.
27055          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27056          if test "x$FOUND_CORRECT_VERSION" = x; then
27057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27061            BOOT_JDK_FOUND=no
27062          else
27063            # We're done! :-)
27064            BOOT_JDK_FOUND=yes
27065
27066  # Only process if variable expands to non-empty
27067
27068  if test "x$BOOT_JDK" != x; then
27069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27070
27071  # Input might be given as Windows format, start by converting to
27072  # unix format.
27073  path="$BOOT_JDK"
27074  new_path=`$CYGPATH -u "$path"`
27075
27076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27079  # "foo.exe" is OK but "foo" is an error.
27080  #
27081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27082  # It is also a way to make sure we got the proper file name for the real test later on.
27083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27084  if test "x$test_shortpath" = x; then
27085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27088  fi
27089
27090  # Call helper function which possibly converts this using DOS-style short mode.
27091  # If so, the updated path is stored in $new_path.
27092
27093  input_path="$new_path"
27094  # Check if we need to convert this using DOS-style short mode. If the path
27095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27096  # take no chances and rewrite it.
27097  # Note: m4 eats our [], so we need to use [ and ] instead.
27098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27099  if test "x$has_forbidden_chars" != x; then
27100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27104      # Going to short mode and back again did indeed matter. Since short mode is
27105      # case insensitive, let's make it lowercase to improve readability.
27106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27107      # Now convert it back to Unix-style (cygpath)
27108      input_path=`$CYGPATH -u "$shortmode_path"`
27109      new_path="$input_path"
27110    fi
27111  fi
27112
27113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27114  if test "x$test_cygdrive_prefix" = x; then
27115    # As a simple fix, exclude /usr/bin since it's not a real path.
27116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27118      # a path prefixed by /cygdrive for fixpath to work.
27119      new_path="$CYGWIN_ROOT_PATH$input_path"
27120    fi
27121  fi
27122
27123
27124  if test "x$path" != "x$new_path"; then
27125    BOOT_JDK="$new_path"
27126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27128  fi
27129
27130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131
27132  path="$BOOT_JDK"
27133  has_colon=`$ECHO $path | $GREP ^.:`
27134  new_path="$path"
27135  if test "x$has_colon" = x; then
27136    # Not in mixed or Windows style, start by that.
27137    new_path=`cmd //c echo $path`
27138  fi
27139
27140
27141  input_path="$new_path"
27142  # Check if we need to convert this using DOS-style short mode. If the path
27143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27144  # take no chances and rewrite it.
27145  # Note: m4 eats our [], so we need to use [ and ] instead.
27146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27147  if test "x$has_forbidden_chars" != x; then
27148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27150  fi
27151
27152
27153  windows_path="$new_path"
27154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155    unix_path=`$CYGPATH -u "$windows_path"`
27156    new_path="$unix_path"
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27159    new_path="$unix_path"
27160  fi
27161
27162  if test "x$path" != "x$new_path"; then
27163    BOOT_JDK="$new_path"
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27166  fi
27167
27168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27170
27171    else
27172      # We're on a unix platform. Hooray! :)
27173      path="$BOOT_JDK"
27174      has_space=`$ECHO "$path" | $GREP " "`
27175      if test "x$has_space" != x; then
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27179      fi
27180
27181      # Use eval to expand a potential ~
27182      eval path="$path"
27183      if test ! -f "$path" && test ! -d "$path"; then
27184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27185      fi
27186
27187      if test -d "$path"; then
27188        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27189      else
27190        dir="`$DIRNAME "$path"`"
27191        base="`$BASENAME "$path"`"
27192        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27193      fi
27194    fi
27195  fi
27196
27197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27198$as_echo_n "checking for Boot JDK... " >&6; }
27199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27200$as_echo "$BOOT_JDK" >&6; }
27201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27202$as_echo_n "checking Boot JDK version... " >&6; }
27203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27205$as_echo "$BOOT_JDK_VERSION" >&6; }
27206          fi # end check jdk version
27207        fi # end check javac
27208      fi # end check java
27209    fi # end check boot jdk found
27210  fi
27211
27212    done
27213  fi
27214
27215  fi
27216
27217
27218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27220      # Do we have a bin/java?
27221      if test ! -x "$BOOT_JDK/bin/java"; then
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27224        BOOT_JDK_FOUND=no
27225      else
27226        # Do we have a bin/javac?
27227        if test ! -x "$BOOT_JDK/bin/javac"; then
27228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27232          BOOT_JDK_FOUND=no
27233        else
27234          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27235          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27236
27237          # Extra M4 quote needed to protect [] in grep expression.
27238          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27239          if test "x$FOUND_CORRECT_VERSION" = x; then
27240            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27242            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27243$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27244            BOOT_JDK_FOUND=no
27245          else
27246            # We're done! :-)
27247            BOOT_JDK_FOUND=yes
27248
27249  # Only process if variable expands to non-empty
27250
27251  if test "x$BOOT_JDK" != x; then
27252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27253
27254  # Input might be given as Windows format, start by converting to
27255  # unix format.
27256  path="$BOOT_JDK"
27257  new_path=`$CYGPATH -u "$path"`
27258
27259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27262  # "foo.exe" is OK but "foo" is an error.
27263  #
27264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27265  # It is also a way to make sure we got the proper file name for the real test later on.
27266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27267  if test "x$test_shortpath" = x; then
27268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27271  fi
27272
27273  # Call helper function which possibly converts this using DOS-style short mode.
27274  # If so, the updated path is stored in $new_path.
27275
27276  input_path="$new_path"
27277  # Check if we need to convert this using DOS-style short mode. If the path
27278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27279  # take no chances and rewrite it.
27280  # Note: m4 eats our [], so we need to use [ and ] instead.
27281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27282  if test "x$has_forbidden_chars" != x; then
27283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27287      # Going to short mode and back again did indeed matter. Since short mode is
27288      # case insensitive, let's make it lowercase to improve readability.
27289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27290      # Now convert it back to Unix-style (cygpath)
27291      input_path=`$CYGPATH -u "$shortmode_path"`
27292      new_path="$input_path"
27293    fi
27294  fi
27295
27296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27297  if test "x$test_cygdrive_prefix" = x; then
27298    # As a simple fix, exclude /usr/bin since it's not a real path.
27299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27301      # a path prefixed by /cygdrive for fixpath to work.
27302      new_path="$CYGWIN_ROOT_PATH$input_path"
27303    fi
27304  fi
27305
27306
27307  if test "x$path" != "x$new_path"; then
27308    BOOT_JDK="$new_path"
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27311  fi
27312
27313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27314
27315  path="$BOOT_JDK"
27316  has_colon=`$ECHO $path | $GREP ^.:`
27317  new_path="$path"
27318  if test "x$has_colon" = x; then
27319    # Not in mixed or Windows style, start by that.
27320    new_path=`cmd //c echo $path`
27321  fi
27322
27323
27324  input_path="$new_path"
27325  # Check if we need to convert this using DOS-style short mode. If the path
27326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27327  # take no chances and rewrite it.
27328  # Note: m4 eats our [], so we need to use [ and ] instead.
27329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27330  if test "x$has_forbidden_chars" != x; then
27331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27333  fi
27334
27335
27336  windows_path="$new_path"
27337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27338    unix_path=`$CYGPATH -u "$windows_path"`
27339    new_path="$unix_path"
27340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27342    new_path="$unix_path"
27343  fi
27344
27345  if test "x$path" != "x$new_path"; then
27346    BOOT_JDK="$new_path"
27347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27349  fi
27350
27351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27353
27354    else
27355      # We're on a unix platform. Hooray! :)
27356      path="$BOOT_JDK"
27357      has_space=`$ECHO "$path" | $GREP " "`
27358      if test "x$has_space" != x; then
27359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27362      fi
27363
27364      # Use eval to expand a potential ~
27365      eval path="$path"
27366      if test ! -f "$path" && test ! -d "$path"; then
27367        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27368      fi
27369
27370      if test -d "$path"; then
27371        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27372      else
27373        dir="`$DIRNAME "$path"`"
27374        base="`$BASENAME "$path"`"
27375        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27376      fi
27377    fi
27378  fi
27379
27380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27381$as_echo_n "checking for Boot JDK... " >&6; }
27382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27383$as_echo "$BOOT_JDK" >&6; }
27384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27385$as_echo_n "checking Boot JDK version... " >&6; }
27386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27388$as_echo "$BOOT_JDK_VERSION" >&6; }
27389          fi # end check jdk version
27390        fi # end check javac
27391      fi # end check java
27392    fi # end check boot jdk found
27393  fi
27394
27395
27396  if test "x$BOOT_JDK_FOUND" = xno; then
27397    # Now execute the test
27398
27399  if test "x$PROGRAMFILES" != x; then
27400    VIRTUAL_DIR="$PROGRAMFILES/Java"
27401
27402  windows_path="$VIRTUAL_DIR"
27403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27404    unix_path=`$CYGPATH -u "$windows_path"`
27405    VIRTUAL_DIR="$unix_path"
27406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27408    VIRTUAL_DIR="$unix_path"
27409  fi
27410
27411
27412  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27413  BOOT_JDK_SUFFIX=""
27414  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27415  if test "x$ALL_JDKS_FOUND" != x; then
27416    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27417
27418  if test "x$BOOT_JDK_FOUND" = xno; then
27419    # Now execute the test
27420
27421        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27422        if test -d "$BOOT_JDK"; then
27423          BOOT_JDK_FOUND=maybe
27424          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27425$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27426        fi
27427
27428
27429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27431      # Do we have a bin/java?
27432      if test ! -x "$BOOT_JDK/bin/java"; then
27433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27435        BOOT_JDK_FOUND=no
27436      else
27437        # Do we have a bin/javac?
27438        if test ! -x "$BOOT_JDK/bin/javac"; then
27439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27443          BOOT_JDK_FOUND=no
27444        else
27445          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27446          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27447
27448          # Extra M4 quote needed to protect [] in grep expression.
27449          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27450          if test "x$FOUND_CORRECT_VERSION" = x; then
27451            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27453            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27454$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27455            BOOT_JDK_FOUND=no
27456          else
27457            # We're done! :-)
27458            BOOT_JDK_FOUND=yes
27459
27460  # Only process if variable expands to non-empty
27461
27462  if test "x$BOOT_JDK" != x; then
27463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27464
27465  # Input might be given as Windows format, start by converting to
27466  # unix format.
27467  path="$BOOT_JDK"
27468  new_path=`$CYGPATH -u "$path"`
27469
27470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27473  # "foo.exe" is OK but "foo" is an error.
27474  #
27475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27476  # It is also a way to make sure we got the proper file name for the real test later on.
27477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27478  if test "x$test_shortpath" = x; then
27479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27482  fi
27483
27484  # Call helper function which possibly converts this using DOS-style short mode.
27485  # If so, the updated path is stored in $new_path.
27486
27487  input_path="$new_path"
27488  # Check if we need to convert this using DOS-style short mode. If the path
27489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27490  # take no chances and rewrite it.
27491  # Note: m4 eats our [], so we need to use [ and ] instead.
27492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27493  if test "x$has_forbidden_chars" != x; then
27494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27498      # Going to short mode and back again did indeed matter. Since short mode is
27499      # case insensitive, let's make it lowercase to improve readability.
27500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27501      # Now convert it back to Unix-style (cygpath)
27502      input_path=`$CYGPATH -u "$shortmode_path"`
27503      new_path="$input_path"
27504    fi
27505  fi
27506
27507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27508  if test "x$test_cygdrive_prefix" = x; then
27509    # As a simple fix, exclude /usr/bin since it's not a real path.
27510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27512      # a path prefixed by /cygdrive for fixpath to work.
27513      new_path="$CYGWIN_ROOT_PATH$input_path"
27514    fi
27515  fi
27516
27517
27518  if test "x$path" != "x$new_path"; then
27519    BOOT_JDK="$new_path"
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27522  fi
27523
27524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27525
27526  path="$BOOT_JDK"
27527  has_colon=`$ECHO $path | $GREP ^.:`
27528  new_path="$path"
27529  if test "x$has_colon" = x; then
27530    # Not in mixed or Windows style, start by that.
27531    new_path=`cmd //c echo $path`
27532  fi
27533
27534
27535  input_path="$new_path"
27536  # Check if we need to convert this using DOS-style short mode. If the path
27537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27538  # take no chances and rewrite it.
27539  # Note: m4 eats our [], so we need to use [ and ] instead.
27540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27541  if test "x$has_forbidden_chars" != x; then
27542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27544  fi
27545
27546
27547  windows_path="$new_path"
27548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549    unix_path=`$CYGPATH -u "$windows_path"`
27550    new_path="$unix_path"
27551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27553    new_path="$unix_path"
27554  fi
27555
27556  if test "x$path" != "x$new_path"; then
27557    BOOT_JDK="$new_path"
27558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27560  fi
27561
27562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27564
27565    else
27566      # We're on a unix platform. Hooray! :)
27567      path="$BOOT_JDK"
27568      has_space=`$ECHO "$path" | $GREP " "`
27569      if test "x$has_space" != x; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27573      fi
27574
27575      # Use eval to expand a potential ~
27576      eval path="$path"
27577      if test ! -f "$path" && test ! -d "$path"; then
27578        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27579      fi
27580
27581      if test -d "$path"; then
27582        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27583      else
27584        dir="`$DIRNAME "$path"`"
27585        base="`$BASENAME "$path"`"
27586        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27587      fi
27588    fi
27589  fi
27590
27591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27592$as_echo_n "checking for Boot JDK... " >&6; }
27593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27594$as_echo "$BOOT_JDK" >&6; }
27595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27596$as_echo_n "checking Boot JDK version... " >&6; }
27597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27599$as_echo "$BOOT_JDK_VERSION" >&6; }
27600          fi # end check jdk version
27601        fi # end check javac
27602      fi # end check java
27603    fi # end check boot jdk found
27604  fi
27605
27606    done
27607  fi
27608
27609  fi
27610
27611
27612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27614      # Do we have a bin/java?
27615      if test ! -x "$BOOT_JDK/bin/java"; then
27616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27618        BOOT_JDK_FOUND=no
27619      else
27620        # Do we have a bin/javac?
27621        if test ! -x "$BOOT_JDK/bin/javac"; then
27622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27626          BOOT_JDK_FOUND=no
27627        else
27628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27630
27631          # Extra M4 quote needed to protect [] in grep expression.
27632          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27633          if test "x$FOUND_CORRECT_VERSION" = x; then
27634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27638            BOOT_JDK_FOUND=no
27639          else
27640            # We're done! :-)
27641            BOOT_JDK_FOUND=yes
27642
27643  # Only process if variable expands to non-empty
27644
27645  if test "x$BOOT_JDK" != x; then
27646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27647
27648  # Input might be given as Windows format, start by converting to
27649  # unix format.
27650  path="$BOOT_JDK"
27651  new_path=`$CYGPATH -u "$path"`
27652
27653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27656  # "foo.exe" is OK but "foo" is an error.
27657  #
27658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27659  # It is also a way to make sure we got the proper file name for the real test later on.
27660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27661  if test "x$test_shortpath" = x; then
27662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27665  fi
27666
27667  # Call helper function which possibly converts this using DOS-style short mode.
27668  # If so, the updated path is stored in $new_path.
27669
27670  input_path="$new_path"
27671  # Check if we need to convert this using DOS-style short mode. If the path
27672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27673  # take no chances and rewrite it.
27674  # Note: m4 eats our [], so we need to use [ and ] instead.
27675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27676  if test "x$has_forbidden_chars" != x; then
27677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27681      # Going to short mode and back again did indeed matter. Since short mode is
27682      # case insensitive, let's make it lowercase to improve readability.
27683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27684      # Now convert it back to Unix-style (cygpath)
27685      input_path=`$CYGPATH -u "$shortmode_path"`
27686      new_path="$input_path"
27687    fi
27688  fi
27689
27690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27691  if test "x$test_cygdrive_prefix" = x; then
27692    # As a simple fix, exclude /usr/bin since it's not a real path.
27693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27695      # a path prefixed by /cygdrive for fixpath to work.
27696      new_path="$CYGWIN_ROOT_PATH$input_path"
27697    fi
27698  fi
27699
27700
27701  if test "x$path" != "x$new_path"; then
27702    BOOT_JDK="$new_path"
27703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27705  fi
27706
27707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27708
27709  path="$BOOT_JDK"
27710  has_colon=`$ECHO $path | $GREP ^.:`
27711  new_path="$path"
27712  if test "x$has_colon" = x; then
27713    # Not in mixed or Windows style, start by that.
27714    new_path=`cmd //c echo $path`
27715  fi
27716
27717
27718  input_path="$new_path"
27719  # Check if we need to convert this using DOS-style short mode. If the path
27720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721  # take no chances and rewrite it.
27722  # Note: m4 eats our [], so we need to use [ and ] instead.
27723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27724  if test "x$has_forbidden_chars" != x; then
27725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27727  fi
27728
27729
27730  windows_path="$new_path"
27731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27732    unix_path=`$CYGPATH -u "$windows_path"`
27733    new_path="$unix_path"
27734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27736    new_path="$unix_path"
27737  fi
27738
27739  if test "x$path" != "x$new_path"; then
27740    BOOT_JDK="$new_path"
27741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27743  fi
27744
27745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27747
27748    else
27749      # We're on a unix platform. Hooray! :)
27750      path="$BOOT_JDK"
27751      has_space=`$ECHO "$path" | $GREP " "`
27752      if test "x$has_space" != x; then
27753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27756      fi
27757
27758      # Use eval to expand a potential ~
27759      eval path="$path"
27760      if test ! -f "$path" && test ! -d "$path"; then
27761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27762      fi
27763
27764      if test -d "$path"; then
27765        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27766      else
27767        dir="`$DIRNAME "$path"`"
27768        base="`$BASENAME "$path"`"
27769        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27770      fi
27771    fi
27772  fi
27773
27774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27775$as_echo_n "checking for Boot JDK... " >&6; }
27776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27777$as_echo "$BOOT_JDK" >&6; }
27778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27779$as_echo_n "checking Boot JDK version... " >&6; }
27780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27782$as_echo "$BOOT_JDK_VERSION" >&6; }
27783          fi # end check jdk version
27784        fi # end check javac
27785      fi # end check java
27786    fi # end check boot jdk found
27787  fi
27788
27789
27790  if test "x$BOOT_JDK_FOUND" = xno; then
27791    # Now execute the test
27792
27793  if test "x$ProgramFiles" != x; then
27794    VIRTUAL_DIR="$ProgramFiles/Java"
27795
27796  windows_path="$VIRTUAL_DIR"
27797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27798    unix_path=`$CYGPATH -u "$windows_path"`
27799    VIRTUAL_DIR="$unix_path"
27800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27802    VIRTUAL_DIR="$unix_path"
27803  fi
27804
27805
27806  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27807  BOOT_JDK_SUFFIX=""
27808  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27809  if test "x$ALL_JDKS_FOUND" != x; then
27810    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27811
27812  if test "x$BOOT_JDK_FOUND" = xno; then
27813    # Now execute the test
27814
27815        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27816        if test -d "$BOOT_JDK"; then
27817          BOOT_JDK_FOUND=maybe
27818          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27819$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27820        fi
27821
27822
27823    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27824    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27825      # Do we have a bin/java?
27826      if test ! -x "$BOOT_JDK/bin/java"; then
27827        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27829        BOOT_JDK_FOUND=no
27830      else
27831        # Do we have a bin/javac?
27832        if test ! -x "$BOOT_JDK/bin/javac"; then
27833          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27835          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27836$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27837          BOOT_JDK_FOUND=no
27838        else
27839          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27840          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27841
27842          # Extra M4 quote needed to protect [] in grep expression.
27843          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27844          if test "x$FOUND_CORRECT_VERSION" = x; then
27845            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27847            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27848$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27849            BOOT_JDK_FOUND=no
27850          else
27851            # We're done! :-)
27852            BOOT_JDK_FOUND=yes
27853
27854  # Only process if variable expands to non-empty
27855
27856  if test "x$BOOT_JDK" != x; then
27857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27858
27859  # Input might be given as Windows format, start by converting to
27860  # unix format.
27861  path="$BOOT_JDK"
27862  new_path=`$CYGPATH -u "$path"`
27863
27864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27867  # "foo.exe" is OK but "foo" is an error.
27868  #
27869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27870  # It is also a way to make sure we got the proper file name for the real test later on.
27871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27872  if test "x$test_shortpath" = x; then
27873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27875    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27876  fi
27877
27878  # Call helper function which possibly converts this using DOS-style short mode.
27879  # If so, the updated path is stored in $new_path.
27880
27881  input_path="$new_path"
27882  # Check if we need to convert this using DOS-style short mode. If the path
27883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27884  # take no chances and rewrite it.
27885  # Note: m4 eats our [], so we need to use [ and ] instead.
27886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27887  if test "x$has_forbidden_chars" != x; then
27888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27892      # Going to short mode and back again did indeed matter. Since short mode is
27893      # case insensitive, let's make it lowercase to improve readability.
27894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895      # Now convert it back to Unix-style (cygpath)
27896      input_path=`$CYGPATH -u "$shortmode_path"`
27897      new_path="$input_path"
27898    fi
27899  fi
27900
27901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27902  if test "x$test_cygdrive_prefix" = x; then
27903    # As a simple fix, exclude /usr/bin since it's not a real path.
27904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27906      # a path prefixed by /cygdrive for fixpath to work.
27907      new_path="$CYGWIN_ROOT_PATH$input_path"
27908    fi
27909  fi
27910
27911
27912  if test "x$path" != "x$new_path"; then
27913    BOOT_JDK="$new_path"
27914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27916  fi
27917
27918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27919
27920  path="$BOOT_JDK"
27921  has_colon=`$ECHO $path | $GREP ^.:`
27922  new_path="$path"
27923  if test "x$has_colon" = x; then
27924    # Not in mixed or Windows style, start by that.
27925    new_path=`cmd //c echo $path`
27926  fi
27927
27928
27929  input_path="$new_path"
27930  # Check if we need to convert this using DOS-style short mode. If the path
27931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27932  # take no chances and rewrite it.
27933  # Note: m4 eats our [], so we need to use [ and ] instead.
27934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27935  if test "x$has_forbidden_chars" != x; then
27936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27938  fi
27939
27940
27941  windows_path="$new_path"
27942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27943    unix_path=`$CYGPATH -u "$windows_path"`
27944    new_path="$unix_path"
27945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27947    new_path="$unix_path"
27948  fi
27949
27950  if test "x$path" != "x$new_path"; then
27951    BOOT_JDK="$new_path"
27952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27954  fi
27955
27956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27958
27959    else
27960      # We're on a unix platform. Hooray! :)
27961      path="$BOOT_JDK"
27962      has_space=`$ECHO "$path" | $GREP " "`
27963      if test "x$has_space" != x; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27966        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27967      fi
27968
27969      # Use eval to expand a potential ~
27970      eval path="$path"
27971      if test ! -f "$path" && test ! -d "$path"; then
27972        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27973      fi
27974
27975      if test -d "$path"; then
27976        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27977      else
27978        dir="`$DIRNAME "$path"`"
27979        base="`$BASENAME "$path"`"
27980        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27981      fi
27982    fi
27983  fi
27984
27985            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27986$as_echo_n "checking for Boot JDK... " >&6; }
27987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27988$as_echo "$BOOT_JDK" >&6; }
27989            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27990$as_echo_n "checking Boot JDK version... " >&6; }
27991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27993$as_echo "$BOOT_JDK_VERSION" >&6; }
27994          fi # end check jdk version
27995        fi # end check javac
27996      fi # end check java
27997    fi # end check boot jdk found
27998  fi
27999
28000    done
28001  fi
28002
28003  fi
28004
28005
28006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28008      # Do we have a bin/java?
28009      if test ! -x "$BOOT_JDK/bin/java"; then
28010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28012        BOOT_JDK_FOUND=no
28013      else
28014        # Do we have a bin/javac?
28015        if test ! -x "$BOOT_JDK/bin/javac"; then
28016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28020          BOOT_JDK_FOUND=no
28021        else
28022          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28023          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28024
28025          # Extra M4 quote needed to protect [] in grep expression.
28026          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28027          if test "x$FOUND_CORRECT_VERSION" = x; then
28028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28031$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28032            BOOT_JDK_FOUND=no
28033          else
28034            # We're done! :-)
28035            BOOT_JDK_FOUND=yes
28036
28037  # Only process if variable expands to non-empty
28038
28039  if test "x$BOOT_JDK" != x; then
28040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28041
28042  # Input might be given as Windows format, start by converting to
28043  # unix format.
28044  path="$BOOT_JDK"
28045  new_path=`$CYGPATH -u "$path"`
28046
28047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28050  # "foo.exe" is OK but "foo" is an error.
28051  #
28052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28053  # It is also a way to make sure we got the proper file name for the real test later on.
28054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28055  if test "x$test_shortpath" = x; then
28056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28058    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28059  fi
28060
28061  # Call helper function which possibly converts this using DOS-style short mode.
28062  # If so, the updated path is stored in $new_path.
28063
28064  input_path="$new_path"
28065  # Check if we need to convert this using DOS-style short mode. If the path
28066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28067  # take no chances and rewrite it.
28068  # Note: m4 eats our [], so we need to use [ and ] instead.
28069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28070  if test "x$has_forbidden_chars" != x; then
28071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28075      # Going to short mode and back again did indeed matter. Since short mode is
28076      # case insensitive, let's make it lowercase to improve readability.
28077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28078      # Now convert it back to Unix-style (cygpath)
28079      input_path=`$CYGPATH -u "$shortmode_path"`
28080      new_path="$input_path"
28081    fi
28082  fi
28083
28084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28085  if test "x$test_cygdrive_prefix" = x; then
28086    # As a simple fix, exclude /usr/bin since it's not a real path.
28087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28089      # a path prefixed by /cygdrive for fixpath to work.
28090      new_path="$CYGWIN_ROOT_PATH$input_path"
28091    fi
28092  fi
28093
28094
28095  if test "x$path" != "x$new_path"; then
28096    BOOT_JDK="$new_path"
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28099  fi
28100
28101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28102
28103  path="$BOOT_JDK"
28104  has_colon=`$ECHO $path | $GREP ^.:`
28105  new_path="$path"
28106  if test "x$has_colon" = x; then
28107    # Not in mixed or Windows style, start by that.
28108    new_path=`cmd //c echo $path`
28109  fi
28110
28111
28112  input_path="$new_path"
28113  # Check if we need to convert this using DOS-style short mode. If the path
28114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28115  # take no chances and rewrite it.
28116  # Note: m4 eats our [], so we need to use [ and ] instead.
28117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28118  if test "x$has_forbidden_chars" != x; then
28119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28121  fi
28122
28123
28124  windows_path="$new_path"
28125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28126    unix_path=`$CYGPATH -u "$windows_path"`
28127    new_path="$unix_path"
28128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28130    new_path="$unix_path"
28131  fi
28132
28133  if test "x$path" != "x$new_path"; then
28134    BOOT_JDK="$new_path"
28135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28137  fi
28138
28139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28141
28142    else
28143      # We're on a unix platform. Hooray! :)
28144      path="$BOOT_JDK"
28145      has_space=`$ECHO "$path" | $GREP " "`
28146      if test "x$has_space" != x; then
28147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28150      fi
28151
28152      # Use eval to expand a potential ~
28153      eval path="$path"
28154      if test ! -f "$path" && test ! -d "$path"; then
28155        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28156      fi
28157
28158      if test -d "$path"; then
28159        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28160      else
28161        dir="`$DIRNAME "$path"`"
28162        base="`$BASENAME "$path"`"
28163        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28164      fi
28165    fi
28166  fi
28167
28168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28169$as_echo_n "checking for Boot JDK... " >&6; }
28170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28171$as_echo "$BOOT_JDK" >&6; }
28172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28173$as_echo_n "checking Boot JDK version... " >&6; }
28174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28176$as_echo "$BOOT_JDK_VERSION" >&6; }
28177          fi # end check jdk version
28178        fi # end check javac
28179      fi # end check java
28180    fi # end check boot jdk found
28181  fi
28182
28183
28184  if test "x$BOOT_JDK_FOUND" = xno; then
28185    # Now execute the test
28186
28187  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28188  BOOT_JDK_SUFFIX=""
28189  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28190  if test "x$ALL_JDKS_FOUND" != x; then
28191    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28192
28193  if test "x$BOOT_JDK_FOUND" = xno; then
28194    # Now execute the test
28195
28196        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28197        if test -d "$BOOT_JDK"; then
28198          BOOT_JDK_FOUND=maybe
28199          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28200$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28201        fi
28202
28203
28204    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28205    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28206      # Do we have a bin/java?
28207      if test ! -x "$BOOT_JDK/bin/java"; then
28208        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28210        BOOT_JDK_FOUND=no
28211      else
28212        # Do we have a bin/javac?
28213        if test ! -x "$BOOT_JDK/bin/javac"; then
28214          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28216          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28217$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28218          BOOT_JDK_FOUND=no
28219        else
28220          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28221          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28222
28223          # Extra M4 quote needed to protect [] in grep expression.
28224          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28225          if test "x$FOUND_CORRECT_VERSION" = x; then
28226            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28228            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28229$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28230            BOOT_JDK_FOUND=no
28231          else
28232            # We're done! :-)
28233            BOOT_JDK_FOUND=yes
28234
28235  # Only process if variable expands to non-empty
28236
28237  if test "x$BOOT_JDK" != x; then
28238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28239
28240  # Input might be given as Windows format, start by converting to
28241  # unix format.
28242  path="$BOOT_JDK"
28243  new_path=`$CYGPATH -u "$path"`
28244
28245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28248  # "foo.exe" is OK but "foo" is an error.
28249  #
28250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28251  # It is also a way to make sure we got the proper file name for the real test later on.
28252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28253  if test "x$test_shortpath" = x; then
28254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28255$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28256    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28257  fi
28258
28259  # Call helper function which possibly converts this using DOS-style short mode.
28260  # If so, the updated path is stored in $new_path.
28261
28262  input_path="$new_path"
28263  # Check if we need to convert this using DOS-style short mode. If the path
28264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28265  # take no chances and rewrite it.
28266  # Note: m4 eats our [], so we need to use [ and ] instead.
28267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28268  if test "x$has_forbidden_chars" != x; then
28269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28273      # Going to short mode and back again did indeed matter. Since short mode is
28274      # case insensitive, let's make it lowercase to improve readability.
28275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28276      # Now convert it back to Unix-style (cygpath)
28277      input_path=`$CYGPATH -u "$shortmode_path"`
28278      new_path="$input_path"
28279    fi
28280  fi
28281
28282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28283  if test "x$test_cygdrive_prefix" = x; then
28284    # As a simple fix, exclude /usr/bin since it's not a real path.
28285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28287      # a path prefixed by /cygdrive for fixpath to work.
28288      new_path="$CYGWIN_ROOT_PATH$input_path"
28289    fi
28290  fi
28291
28292
28293  if test "x$path" != "x$new_path"; then
28294    BOOT_JDK="$new_path"
28295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28297  fi
28298
28299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28300
28301  path="$BOOT_JDK"
28302  has_colon=`$ECHO $path | $GREP ^.:`
28303  new_path="$path"
28304  if test "x$has_colon" = x; then
28305    # Not in mixed or Windows style, start by that.
28306    new_path=`cmd //c echo $path`
28307  fi
28308
28309
28310  input_path="$new_path"
28311  # Check if we need to convert this using DOS-style short mode. If the path
28312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28313  # take no chances and rewrite it.
28314  # Note: m4 eats our [], so we need to use [ and ] instead.
28315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28316  if test "x$has_forbidden_chars" != x; then
28317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28319  fi
28320
28321
28322  windows_path="$new_path"
28323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28324    unix_path=`$CYGPATH -u "$windows_path"`
28325    new_path="$unix_path"
28326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28328    new_path="$unix_path"
28329  fi
28330
28331  if test "x$path" != "x$new_path"; then
28332    BOOT_JDK="$new_path"
28333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28335  fi
28336
28337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28339
28340    else
28341      # We're on a unix platform. Hooray! :)
28342      path="$BOOT_JDK"
28343      has_space=`$ECHO "$path" | $GREP " "`
28344      if test "x$has_space" != x; then
28345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28348      fi
28349
28350      # Use eval to expand a potential ~
28351      eval path="$path"
28352      if test ! -f "$path" && test ! -d "$path"; then
28353        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28354      fi
28355
28356      if test -d "$path"; then
28357        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28358      else
28359        dir="`$DIRNAME "$path"`"
28360        base="`$BASENAME "$path"`"
28361        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28362      fi
28363    fi
28364  fi
28365
28366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28367$as_echo_n "checking for Boot JDK... " >&6; }
28368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28369$as_echo "$BOOT_JDK" >&6; }
28370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28371$as_echo_n "checking Boot JDK version... " >&6; }
28372            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28374$as_echo "$BOOT_JDK_VERSION" >&6; }
28375          fi # end check jdk version
28376        fi # end check javac
28377      fi # end check java
28378    fi # end check boot jdk found
28379  fi
28380
28381    done
28382  fi
28383
28384
28385    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28386    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28387      # Do we have a bin/java?
28388      if test ! -x "$BOOT_JDK/bin/java"; then
28389        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28391        BOOT_JDK_FOUND=no
28392      else
28393        # Do we have a bin/javac?
28394        if test ! -x "$BOOT_JDK/bin/javac"; then
28395          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28397          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28398$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28399          BOOT_JDK_FOUND=no
28400        else
28401          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28402          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28403
28404          # Extra M4 quote needed to protect [] in grep expression.
28405          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28406          if test "x$FOUND_CORRECT_VERSION" = x; then
28407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28409            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28410$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28411            BOOT_JDK_FOUND=no
28412          else
28413            # We're done! :-)
28414            BOOT_JDK_FOUND=yes
28415
28416  # Only process if variable expands to non-empty
28417
28418  if test "x$BOOT_JDK" != x; then
28419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28420
28421  # Input might be given as Windows format, start by converting to
28422  # unix format.
28423  path="$BOOT_JDK"
28424  new_path=`$CYGPATH -u "$path"`
28425
28426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28429  # "foo.exe" is OK but "foo" is an error.
28430  #
28431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28432  # It is also a way to make sure we got the proper file name for the real test later on.
28433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28434  if test "x$test_shortpath" = x; then
28435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28437    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28438  fi
28439
28440  # Call helper function which possibly converts this using DOS-style short mode.
28441  # If so, the updated path is stored in $new_path.
28442
28443  input_path="$new_path"
28444  # Check if we need to convert this using DOS-style short mode. If the path
28445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28446  # take no chances and rewrite it.
28447  # Note: m4 eats our [], so we need to use [ and ] instead.
28448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28449  if test "x$has_forbidden_chars" != x; then
28450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28454      # Going to short mode and back again did indeed matter. Since short mode is
28455      # case insensitive, let's make it lowercase to improve readability.
28456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28457      # Now convert it back to Unix-style (cygpath)
28458      input_path=`$CYGPATH -u "$shortmode_path"`
28459      new_path="$input_path"
28460    fi
28461  fi
28462
28463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28464  if test "x$test_cygdrive_prefix" = x; then
28465    # As a simple fix, exclude /usr/bin since it's not a real path.
28466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28468      # a path prefixed by /cygdrive for fixpath to work.
28469      new_path="$CYGWIN_ROOT_PATH$input_path"
28470    fi
28471  fi
28472
28473
28474  if test "x$path" != "x$new_path"; then
28475    BOOT_JDK="$new_path"
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28478  fi
28479
28480    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28481
28482  path="$BOOT_JDK"
28483  has_colon=`$ECHO $path | $GREP ^.:`
28484  new_path="$path"
28485  if test "x$has_colon" = x; then
28486    # Not in mixed or Windows style, start by that.
28487    new_path=`cmd //c echo $path`
28488  fi
28489
28490
28491  input_path="$new_path"
28492  # Check if we need to convert this using DOS-style short mode. If the path
28493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28494  # take no chances and rewrite it.
28495  # Note: m4 eats our [], so we need to use [ and ] instead.
28496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28497  if test "x$has_forbidden_chars" != x; then
28498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28500  fi
28501
28502
28503  windows_path="$new_path"
28504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28505    unix_path=`$CYGPATH -u "$windows_path"`
28506    new_path="$unix_path"
28507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28509    new_path="$unix_path"
28510  fi
28511
28512  if test "x$path" != "x$new_path"; then
28513    BOOT_JDK="$new_path"
28514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28516  fi
28517
28518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28520
28521    else
28522      # We're on a unix platform. Hooray! :)
28523      path="$BOOT_JDK"
28524      has_space=`$ECHO "$path" | $GREP " "`
28525      if test "x$has_space" != x; then
28526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28528        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28529      fi
28530
28531      # Use eval to expand a potential ~
28532      eval path="$path"
28533      if test ! -f "$path" && test ! -d "$path"; then
28534        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28535      fi
28536
28537      if test -d "$path"; then
28538        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28539      else
28540        dir="`$DIRNAME "$path"`"
28541        base="`$BASENAME "$path"`"
28542        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28543      fi
28544    fi
28545  fi
28546
28547            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28548$as_echo_n "checking for Boot JDK... " >&6; }
28549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28550$as_echo "$BOOT_JDK" >&6; }
28551            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28552$as_echo_n "checking Boot JDK version... " >&6; }
28553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28555$as_echo "$BOOT_JDK_VERSION" >&6; }
28556          fi # end check jdk version
28557        fi # end check javac
28558      fi # end check java
28559    fi # end check boot jdk found
28560  fi
28561
28562  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28563
28564  if test "x$BOOT_JDK_FOUND" = xno; then
28565    # Now execute the test
28566
28567  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28568  BOOT_JDK_SUFFIX="/Contents/Home"
28569  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28570  if test "x$ALL_JDKS_FOUND" != x; then
28571    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28572
28573  if test "x$BOOT_JDK_FOUND" = xno; then
28574    # Now execute the test
28575
28576        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28577        if test -d "$BOOT_JDK"; then
28578          BOOT_JDK_FOUND=maybe
28579          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28580$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28581        fi
28582
28583
28584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28586      # Do we have a bin/java?
28587      if test ! -x "$BOOT_JDK/bin/java"; then
28588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28590        BOOT_JDK_FOUND=no
28591      else
28592        # Do we have a bin/javac?
28593        if test ! -x "$BOOT_JDK/bin/javac"; then
28594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28598          BOOT_JDK_FOUND=no
28599        else
28600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28602
28603          # Extra M4 quote needed to protect [] in grep expression.
28604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28605          if test "x$FOUND_CORRECT_VERSION" = x; then
28606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28610            BOOT_JDK_FOUND=no
28611          else
28612            # We're done! :-)
28613            BOOT_JDK_FOUND=yes
28614
28615  # Only process if variable expands to non-empty
28616
28617  if test "x$BOOT_JDK" != x; then
28618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28619
28620  # Input might be given as Windows format, start by converting to
28621  # unix format.
28622  path="$BOOT_JDK"
28623  new_path=`$CYGPATH -u "$path"`
28624
28625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28628  # "foo.exe" is OK but "foo" is an error.
28629  #
28630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28631  # It is also a way to make sure we got the proper file name for the real test later on.
28632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28633  if test "x$test_shortpath" = x; then
28634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28637  fi
28638
28639  # Call helper function which possibly converts this using DOS-style short mode.
28640  # If so, the updated path is stored in $new_path.
28641
28642  input_path="$new_path"
28643  # Check if we need to convert this using DOS-style short mode. If the path
28644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28645  # take no chances and rewrite it.
28646  # Note: m4 eats our [], so we need to use [ and ] instead.
28647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28648  if test "x$has_forbidden_chars" != x; then
28649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28653      # Going to short mode and back again did indeed matter. Since short mode is
28654      # case insensitive, let's make it lowercase to improve readability.
28655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28656      # Now convert it back to Unix-style (cygpath)
28657      input_path=`$CYGPATH -u "$shortmode_path"`
28658      new_path="$input_path"
28659    fi
28660  fi
28661
28662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28663  if test "x$test_cygdrive_prefix" = x; then
28664    # As a simple fix, exclude /usr/bin since it's not a real path.
28665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28667      # a path prefixed by /cygdrive for fixpath to work.
28668      new_path="$CYGWIN_ROOT_PATH$input_path"
28669    fi
28670  fi
28671
28672
28673  if test "x$path" != "x$new_path"; then
28674    BOOT_JDK="$new_path"
28675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28677  fi
28678
28679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28680
28681  path="$BOOT_JDK"
28682  has_colon=`$ECHO $path | $GREP ^.:`
28683  new_path="$path"
28684  if test "x$has_colon" = x; then
28685    # Not in mixed or Windows style, start by that.
28686    new_path=`cmd //c echo $path`
28687  fi
28688
28689
28690  input_path="$new_path"
28691  # Check if we need to convert this using DOS-style short mode. If the path
28692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28693  # take no chances and rewrite it.
28694  # Note: m4 eats our [], so we need to use [ and ] instead.
28695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28696  if test "x$has_forbidden_chars" != x; then
28697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28699  fi
28700
28701
28702  windows_path="$new_path"
28703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704    unix_path=`$CYGPATH -u "$windows_path"`
28705    new_path="$unix_path"
28706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28708    new_path="$unix_path"
28709  fi
28710
28711  if test "x$path" != "x$new_path"; then
28712    BOOT_JDK="$new_path"
28713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28715  fi
28716
28717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28719
28720    else
28721      # We're on a unix platform. Hooray! :)
28722      path="$BOOT_JDK"
28723      has_space=`$ECHO "$path" | $GREP " "`
28724      if test "x$has_space" != x; then
28725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28728      fi
28729
28730      # Use eval to expand a potential ~
28731      eval path="$path"
28732      if test ! -f "$path" && test ! -d "$path"; then
28733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28734      fi
28735
28736      if test -d "$path"; then
28737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28738      else
28739        dir="`$DIRNAME "$path"`"
28740        base="`$BASENAME "$path"`"
28741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28742      fi
28743    fi
28744  fi
28745
28746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28747$as_echo_n "checking for Boot JDK... " >&6; }
28748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28749$as_echo "$BOOT_JDK" >&6; }
28750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28751$as_echo_n "checking Boot JDK version... " >&6; }
28752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28754$as_echo "$BOOT_JDK_VERSION" >&6; }
28755          fi # end check jdk version
28756        fi # end check javac
28757      fi # end check java
28758    fi # end check boot jdk found
28759  fi
28760
28761    done
28762  fi
28763
28764
28765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28767      # Do we have a bin/java?
28768      if test ! -x "$BOOT_JDK/bin/java"; then
28769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28771        BOOT_JDK_FOUND=no
28772      else
28773        # Do we have a bin/javac?
28774        if test ! -x "$BOOT_JDK/bin/javac"; then
28775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28779          BOOT_JDK_FOUND=no
28780        else
28781          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28782          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28783
28784          # Extra M4 quote needed to protect [] in grep expression.
28785          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28786          if test "x$FOUND_CORRECT_VERSION" = x; then
28787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28789            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28790$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28791            BOOT_JDK_FOUND=no
28792          else
28793            # We're done! :-)
28794            BOOT_JDK_FOUND=yes
28795
28796  # Only process if variable expands to non-empty
28797
28798  if test "x$BOOT_JDK" != x; then
28799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28800
28801  # Input might be given as Windows format, start by converting to
28802  # unix format.
28803  path="$BOOT_JDK"
28804  new_path=`$CYGPATH -u "$path"`
28805
28806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28809  # "foo.exe" is OK but "foo" is an error.
28810  #
28811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28812  # It is also a way to make sure we got the proper file name for the real test later on.
28813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28814  if test "x$test_shortpath" = x; then
28815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28818  fi
28819
28820  # Call helper function which possibly converts this using DOS-style short mode.
28821  # If so, the updated path is stored in $new_path.
28822
28823  input_path="$new_path"
28824  # Check if we need to convert this using DOS-style short mode. If the path
28825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28826  # take no chances and rewrite it.
28827  # Note: m4 eats our [], so we need to use [ and ] instead.
28828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28829  if test "x$has_forbidden_chars" != x; then
28830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28834      # Going to short mode and back again did indeed matter. Since short mode is
28835      # case insensitive, let's make it lowercase to improve readability.
28836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28837      # Now convert it back to Unix-style (cygpath)
28838      input_path=`$CYGPATH -u "$shortmode_path"`
28839      new_path="$input_path"
28840    fi
28841  fi
28842
28843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28844  if test "x$test_cygdrive_prefix" = x; then
28845    # As a simple fix, exclude /usr/bin since it's not a real path.
28846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28848      # a path prefixed by /cygdrive for fixpath to work.
28849      new_path="$CYGWIN_ROOT_PATH$input_path"
28850    fi
28851  fi
28852
28853
28854  if test "x$path" != "x$new_path"; then
28855    BOOT_JDK="$new_path"
28856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28858  fi
28859
28860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28861
28862  path="$BOOT_JDK"
28863  has_colon=`$ECHO $path | $GREP ^.:`
28864  new_path="$path"
28865  if test "x$has_colon" = x; then
28866    # Not in mixed or Windows style, start by that.
28867    new_path=`cmd //c echo $path`
28868  fi
28869
28870
28871  input_path="$new_path"
28872  # Check if we need to convert this using DOS-style short mode. If the path
28873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28874  # take no chances and rewrite it.
28875  # Note: m4 eats our [], so we need to use [ and ] instead.
28876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28877  if test "x$has_forbidden_chars" != x; then
28878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28880  fi
28881
28882
28883  windows_path="$new_path"
28884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28885    unix_path=`$CYGPATH -u "$windows_path"`
28886    new_path="$unix_path"
28887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28889    new_path="$unix_path"
28890  fi
28891
28892  if test "x$path" != "x$new_path"; then
28893    BOOT_JDK="$new_path"
28894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28896  fi
28897
28898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28900
28901    else
28902      # We're on a unix platform. Hooray! :)
28903      path="$BOOT_JDK"
28904      has_space=`$ECHO "$path" | $GREP " "`
28905      if test "x$has_space" != x; then
28906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28909      fi
28910
28911      # Use eval to expand a potential ~
28912      eval path="$path"
28913      if test ! -f "$path" && test ! -d "$path"; then
28914        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28915      fi
28916
28917      if test -d "$path"; then
28918        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28919      else
28920        dir="`$DIRNAME "$path"`"
28921        base="`$BASENAME "$path"`"
28922        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28923      fi
28924    fi
28925  fi
28926
28927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28928$as_echo_n "checking for Boot JDK... " >&6; }
28929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28930$as_echo "$BOOT_JDK" >&6; }
28931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28932$as_echo_n "checking Boot JDK version... " >&6; }
28933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28935$as_echo "$BOOT_JDK_VERSION" >&6; }
28936          fi # end check jdk version
28937        fi # end check javac
28938      fi # end check java
28939    fi # end check boot jdk found
28940  fi
28941
28942
28943  if test "x$BOOT_JDK_FOUND" = xno; then
28944    # Now execute the test
28945
28946  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28947  BOOT_JDK_SUFFIX="/Contents/Home"
28948  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28949  if test "x$ALL_JDKS_FOUND" != x; then
28950    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28951
28952  if test "x$BOOT_JDK_FOUND" = xno; then
28953    # Now execute the test
28954
28955        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28956        if test -d "$BOOT_JDK"; then
28957          BOOT_JDK_FOUND=maybe
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28959$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28960        fi
28961
28962
28963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28965      # Do we have a bin/java?
28966      if test ! -x "$BOOT_JDK/bin/java"; then
28967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28969        BOOT_JDK_FOUND=no
28970      else
28971        # Do we have a bin/javac?
28972        if test ! -x "$BOOT_JDK/bin/javac"; then
28973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28977          BOOT_JDK_FOUND=no
28978        else
28979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28981
28982          # Extra M4 quote needed to protect [] in grep expression.
28983          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28984          if test "x$FOUND_CORRECT_VERSION" = x; then
28985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28989            BOOT_JDK_FOUND=no
28990          else
28991            # We're done! :-)
28992            BOOT_JDK_FOUND=yes
28993
28994  # Only process if variable expands to non-empty
28995
28996  if test "x$BOOT_JDK" != x; then
28997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28998
28999  # Input might be given as Windows format, start by converting to
29000  # unix format.
29001  path="$BOOT_JDK"
29002  new_path=`$CYGPATH -u "$path"`
29003
29004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29007  # "foo.exe" is OK but "foo" is an error.
29008  #
29009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29010  # It is also a way to make sure we got the proper file name for the real test later on.
29011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29012  if test "x$test_shortpath" = x; then
29013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29016  fi
29017
29018  # Call helper function which possibly converts this using DOS-style short mode.
29019  # If so, the updated path is stored in $new_path.
29020
29021  input_path="$new_path"
29022  # Check if we need to convert this using DOS-style short mode. If the path
29023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29024  # take no chances and rewrite it.
29025  # Note: m4 eats our [], so we need to use [ and ] instead.
29026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29027  if test "x$has_forbidden_chars" != x; then
29028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29032      # Going to short mode and back again did indeed matter. Since short mode is
29033      # case insensitive, let's make it lowercase to improve readability.
29034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29035      # Now convert it back to Unix-style (cygpath)
29036      input_path=`$CYGPATH -u "$shortmode_path"`
29037      new_path="$input_path"
29038    fi
29039  fi
29040
29041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29042  if test "x$test_cygdrive_prefix" = x; then
29043    # As a simple fix, exclude /usr/bin since it's not a real path.
29044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29046      # a path prefixed by /cygdrive for fixpath to work.
29047      new_path="$CYGWIN_ROOT_PATH$input_path"
29048    fi
29049  fi
29050
29051
29052  if test "x$path" != "x$new_path"; then
29053    BOOT_JDK="$new_path"
29054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29056  fi
29057
29058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29059
29060  path="$BOOT_JDK"
29061  has_colon=`$ECHO $path | $GREP ^.:`
29062  new_path="$path"
29063  if test "x$has_colon" = x; then
29064    # Not in mixed or Windows style, start by that.
29065    new_path=`cmd //c echo $path`
29066  fi
29067
29068
29069  input_path="$new_path"
29070  # Check if we need to convert this using DOS-style short mode. If the path
29071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29072  # take no chances and rewrite it.
29073  # Note: m4 eats our [], so we need to use [ and ] instead.
29074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29075  if test "x$has_forbidden_chars" != x; then
29076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29078  fi
29079
29080
29081  windows_path="$new_path"
29082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29083    unix_path=`$CYGPATH -u "$windows_path"`
29084    new_path="$unix_path"
29085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29087    new_path="$unix_path"
29088  fi
29089
29090  if test "x$path" != "x$new_path"; then
29091    BOOT_JDK="$new_path"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29094  fi
29095
29096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29098
29099    else
29100      # We're on a unix platform. Hooray! :)
29101      path="$BOOT_JDK"
29102      has_space=`$ECHO "$path" | $GREP " "`
29103      if test "x$has_space" != x; then
29104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29107      fi
29108
29109      # Use eval to expand a potential ~
29110      eval path="$path"
29111      if test ! -f "$path" && test ! -d "$path"; then
29112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29113      fi
29114
29115      if test -d "$path"; then
29116        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29117      else
29118        dir="`$DIRNAME "$path"`"
29119        base="`$BASENAME "$path"`"
29120        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29121      fi
29122    fi
29123  fi
29124
29125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29126$as_echo_n "checking for Boot JDK... " >&6; }
29127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29128$as_echo "$BOOT_JDK" >&6; }
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29130$as_echo_n "checking Boot JDK version... " >&6; }
29131            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29133$as_echo "$BOOT_JDK_VERSION" >&6; }
29134          fi # end check jdk version
29135        fi # end check javac
29136      fi # end check java
29137    fi # end check boot jdk found
29138  fi
29139
29140    done
29141  fi
29142
29143
29144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29146      # Do we have a bin/java?
29147      if test ! -x "$BOOT_JDK/bin/java"; then
29148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29150        BOOT_JDK_FOUND=no
29151      else
29152        # Do we have a bin/javac?
29153        if test ! -x "$BOOT_JDK/bin/javac"; then
29154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29158          BOOT_JDK_FOUND=no
29159        else
29160          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29161          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29162
29163          # Extra M4 quote needed to protect [] in grep expression.
29164          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29165          if test "x$FOUND_CORRECT_VERSION" = x; then
29166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29168            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29169$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29170            BOOT_JDK_FOUND=no
29171          else
29172            # We're done! :-)
29173            BOOT_JDK_FOUND=yes
29174
29175  # Only process if variable expands to non-empty
29176
29177  if test "x$BOOT_JDK" != x; then
29178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29179
29180  # Input might be given as Windows format, start by converting to
29181  # unix format.
29182  path="$BOOT_JDK"
29183  new_path=`$CYGPATH -u "$path"`
29184
29185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29188  # "foo.exe" is OK but "foo" is an error.
29189  #
29190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29191  # It is also a way to make sure we got the proper file name for the real test later on.
29192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29193  if test "x$test_shortpath" = x; then
29194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29197  fi
29198
29199  # Call helper function which possibly converts this using DOS-style short mode.
29200  # If so, the updated path is stored in $new_path.
29201
29202  input_path="$new_path"
29203  # Check if we need to convert this using DOS-style short mode. If the path
29204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29205  # take no chances and rewrite it.
29206  # Note: m4 eats our [], so we need to use [ and ] instead.
29207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29208  if test "x$has_forbidden_chars" != x; then
29209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29213      # Going to short mode and back again did indeed matter. Since short mode is
29214      # case insensitive, let's make it lowercase to improve readability.
29215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29216      # Now convert it back to Unix-style (cygpath)
29217      input_path=`$CYGPATH -u "$shortmode_path"`
29218      new_path="$input_path"
29219    fi
29220  fi
29221
29222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29223  if test "x$test_cygdrive_prefix" = x; then
29224    # As a simple fix, exclude /usr/bin since it's not a real path.
29225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29227      # a path prefixed by /cygdrive for fixpath to work.
29228      new_path="$CYGWIN_ROOT_PATH$input_path"
29229    fi
29230  fi
29231
29232
29233  if test "x$path" != "x$new_path"; then
29234    BOOT_JDK="$new_path"
29235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29237  fi
29238
29239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29240
29241  path="$BOOT_JDK"
29242  has_colon=`$ECHO $path | $GREP ^.:`
29243  new_path="$path"
29244  if test "x$has_colon" = x; then
29245    # Not in mixed or Windows style, start by that.
29246    new_path=`cmd //c echo $path`
29247  fi
29248
29249
29250  input_path="$new_path"
29251  # Check if we need to convert this using DOS-style short mode. If the path
29252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29253  # take no chances and rewrite it.
29254  # Note: m4 eats our [], so we need to use [ and ] instead.
29255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29256  if test "x$has_forbidden_chars" != x; then
29257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29259  fi
29260
29261
29262  windows_path="$new_path"
29263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29264    unix_path=`$CYGPATH -u "$windows_path"`
29265    new_path="$unix_path"
29266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29268    new_path="$unix_path"
29269  fi
29270
29271  if test "x$path" != "x$new_path"; then
29272    BOOT_JDK="$new_path"
29273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29275  fi
29276
29277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29279
29280    else
29281      # We're on a unix platform. Hooray! :)
29282      path="$BOOT_JDK"
29283      has_space=`$ECHO "$path" | $GREP " "`
29284      if test "x$has_space" != x; then
29285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29288      fi
29289
29290      # Use eval to expand a potential ~
29291      eval path="$path"
29292      if test ! -f "$path" && test ! -d "$path"; then
29293        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29294      fi
29295
29296      if test -d "$path"; then
29297        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29298      else
29299        dir="`$DIRNAME "$path"`"
29300        base="`$BASENAME "$path"`"
29301        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29302      fi
29303    fi
29304  fi
29305
29306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29307$as_echo_n "checking for Boot JDK... " >&6; }
29308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29309$as_echo "$BOOT_JDK" >&6; }
29310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29311$as_echo_n "checking Boot JDK version... " >&6; }
29312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29314$as_echo "$BOOT_JDK_VERSION" >&6; }
29315          fi # end check jdk version
29316        fi # end check javac
29317      fi # end check java
29318    fi # end check boot jdk found
29319  fi
29320
29321  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29322
29323  if test "x$BOOT_JDK_FOUND" = xno; then
29324    # Now execute the test
29325
29326  BOOT_JDK_PREFIX="/usr/lib/jvm"
29327  BOOT_JDK_SUFFIX=""
29328  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29329  if test "x$ALL_JDKS_FOUND" != x; then
29330    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29331
29332  if test "x$BOOT_JDK_FOUND" = xno; then
29333    # Now execute the test
29334
29335        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29336        if test -d "$BOOT_JDK"; then
29337          BOOT_JDK_FOUND=maybe
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29339$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29340        fi
29341
29342
29343    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29344    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29345      # Do we have a bin/java?
29346      if test ! -x "$BOOT_JDK/bin/java"; then
29347        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29349        BOOT_JDK_FOUND=no
29350      else
29351        # Do we have a bin/javac?
29352        if test ! -x "$BOOT_JDK/bin/javac"; then
29353          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29356$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29357          BOOT_JDK_FOUND=no
29358        else
29359          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29360          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29361
29362          # Extra M4 quote needed to protect [] in grep expression.
29363          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29364          if test "x$FOUND_CORRECT_VERSION" = x; then
29365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29367            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29369            BOOT_JDK_FOUND=no
29370          else
29371            # We're done! :-)
29372            BOOT_JDK_FOUND=yes
29373
29374  # Only process if variable expands to non-empty
29375
29376  if test "x$BOOT_JDK" != x; then
29377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29378
29379  # Input might be given as Windows format, start by converting to
29380  # unix format.
29381  path="$BOOT_JDK"
29382  new_path=`$CYGPATH -u "$path"`
29383
29384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29387  # "foo.exe" is OK but "foo" is an error.
29388  #
29389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29390  # It is also a way to make sure we got the proper file name for the real test later on.
29391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29392  if test "x$test_shortpath" = x; then
29393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29396  fi
29397
29398  # Call helper function which possibly converts this using DOS-style short mode.
29399  # If so, the updated path is stored in $new_path.
29400
29401  input_path="$new_path"
29402  # Check if we need to convert this using DOS-style short mode. If the path
29403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29404  # take no chances and rewrite it.
29405  # Note: m4 eats our [], so we need to use [ and ] instead.
29406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29407  if test "x$has_forbidden_chars" != x; then
29408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29412      # Going to short mode and back again did indeed matter. Since short mode is
29413      # case insensitive, let's make it lowercase to improve readability.
29414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29415      # Now convert it back to Unix-style (cygpath)
29416      input_path=`$CYGPATH -u "$shortmode_path"`
29417      new_path="$input_path"
29418    fi
29419  fi
29420
29421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29422  if test "x$test_cygdrive_prefix" = x; then
29423    # As a simple fix, exclude /usr/bin since it's not a real path.
29424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29426      # a path prefixed by /cygdrive for fixpath to work.
29427      new_path="$CYGWIN_ROOT_PATH$input_path"
29428    fi
29429  fi
29430
29431
29432  if test "x$path" != "x$new_path"; then
29433    BOOT_JDK="$new_path"
29434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29436  fi
29437
29438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29439
29440  path="$BOOT_JDK"
29441  has_colon=`$ECHO $path | $GREP ^.:`
29442  new_path="$path"
29443  if test "x$has_colon" = x; then
29444    # Not in mixed or Windows style, start by that.
29445    new_path=`cmd //c echo $path`
29446  fi
29447
29448
29449  input_path="$new_path"
29450  # Check if we need to convert this using DOS-style short mode. If the path
29451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29452  # take no chances and rewrite it.
29453  # Note: m4 eats our [], so we need to use [ and ] instead.
29454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29455  if test "x$has_forbidden_chars" != x; then
29456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29458  fi
29459
29460
29461  windows_path="$new_path"
29462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463    unix_path=`$CYGPATH -u "$windows_path"`
29464    new_path="$unix_path"
29465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29467    new_path="$unix_path"
29468  fi
29469
29470  if test "x$path" != "x$new_path"; then
29471    BOOT_JDK="$new_path"
29472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29474  fi
29475
29476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29478
29479    else
29480      # We're on a unix platform. Hooray! :)
29481      path="$BOOT_JDK"
29482      has_space=`$ECHO "$path" | $GREP " "`
29483      if test "x$has_space" != x; then
29484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29487      fi
29488
29489      # Use eval to expand a potential ~
29490      eval path="$path"
29491      if test ! -f "$path" && test ! -d "$path"; then
29492        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29493      fi
29494
29495      if test -d "$path"; then
29496        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29497      else
29498        dir="`$DIRNAME "$path"`"
29499        base="`$BASENAME "$path"`"
29500        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29501      fi
29502    fi
29503  fi
29504
29505            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29506$as_echo_n "checking for Boot JDK... " >&6; }
29507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29508$as_echo "$BOOT_JDK" >&6; }
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29510$as_echo_n "checking Boot JDK version... " >&6; }
29511            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29513$as_echo "$BOOT_JDK_VERSION" >&6; }
29514          fi # end check jdk version
29515        fi # end check javac
29516      fi # end check java
29517    fi # end check boot jdk found
29518  fi
29519
29520    done
29521  fi
29522
29523
29524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29526      # Do we have a bin/java?
29527      if test ! -x "$BOOT_JDK/bin/java"; then
29528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29530        BOOT_JDK_FOUND=no
29531      else
29532        # Do we have a bin/javac?
29533        if test ! -x "$BOOT_JDK/bin/javac"; then
29534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29538          BOOT_JDK_FOUND=no
29539        else
29540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29542
29543          # Extra M4 quote needed to protect [] in grep expression.
29544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29545          if test "x$FOUND_CORRECT_VERSION" = x; then
29546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29550            BOOT_JDK_FOUND=no
29551          else
29552            # We're done! :-)
29553            BOOT_JDK_FOUND=yes
29554
29555  # Only process if variable expands to non-empty
29556
29557  if test "x$BOOT_JDK" != x; then
29558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29559
29560  # Input might be given as Windows format, start by converting to
29561  # unix format.
29562  path="$BOOT_JDK"
29563  new_path=`$CYGPATH -u "$path"`
29564
29565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29568  # "foo.exe" is OK but "foo" is an error.
29569  #
29570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29571  # It is also a way to make sure we got the proper file name for the real test later on.
29572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29573  if test "x$test_shortpath" = x; then
29574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29577  fi
29578
29579  # Call helper function which possibly converts this using DOS-style short mode.
29580  # If so, the updated path is stored in $new_path.
29581
29582  input_path="$new_path"
29583  # Check if we need to convert this using DOS-style short mode. If the path
29584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29585  # take no chances and rewrite it.
29586  # Note: m4 eats our [], so we need to use [ and ] instead.
29587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29588  if test "x$has_forbidden_chars" != x; then
29589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29593      # Going to short mode and back again did indeed matter. Since short mode is
29594      # case insensitive, let's make it lowercase to improve readability.
29595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29596      # Now convert it back to Unix-style (cygpath)
29597      input_path=`$CYGPATH -u "$shortmode_path"`
29598      new_path="$input_path"
29599    fi
29600  fi
29601
29602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29603  if test "x$test_cygdrive_prefix" = x; then
29604    # As a simple fix, exclude /usr/bin since it's not a real path.
29605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29607      # a path prefixed by /cygdrive for fixpath to work.
29608      new_path="$CYGWIN_ROOT_PATH$input_path"
29609    fi
29610  fi
29611
29612
29613  if test "x$path" != "x$new_path"; then
29614    BOOT_JDK="$new_path"
29615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29617  fi
29618
29619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29620
29621  path="$BOOT_JDK"
29622  has_colon=`$ECHO $path | $GREP ^.:`
29623  new_path="$path"
29624  if test "x$has_colon" = x; then
29625    # Not in mixed or Windows style, start by that.
29626    new_path=`cmd //c echo $path`
29627  fi
29628
29629
29630  input_path="$new_path"
29631  # Check if we need to convert this using DOS-style short mode. If the path
29632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29633  # take no chances and rewrite it.
29634  # Note: m4 eats our [], so we need to use [ and ] instead.
29635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29636  if test "x$has_forbidden_chars" != x; then
29637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29639  fi
29640
29641
29642  windows_path="$new_path"
29643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29644    unix_path=`$CYGPATH -u "$windows_path"`
29645    new_path="$unix_path"
29646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29648    new_path="$unix_path"
29649  fi
29650
29651  if test "x$path" != "x$new_path"; then
29652    BOOT_JDK="$new_path"
29653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29655  fi
29656
29657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29659
29660    else
29661      # We're on a unix platform. Hooray! :)
29662      path="$BOOT_JDK"
29663      has_space=`$ECHO "$path" | $GREP " "`
29664      if test "x$has_space" != x; then
29665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29668      fi
29669
29670      # Use eval to expand a potential ~
29671      eval path="$path"
29672      if test ! -f "$path" && test ! -d "$path"; then
29673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29674      fi
29675
29676      if test -d "$path"; then
29677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29678      else
29679        dir="`$DIRNAME "$path"`"
29680        base="`$BASENAME "$path"`"
29681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29682      fi
29683    fi
29684  fi
29685
29686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29687$as_echo_n "checking for Boot JDK... " >&6; }
29688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29689$as_echo "$BOOT_JDK" >&6; }
29690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29691$as_echo_n "checking Boot JDK version... " >&6; }
29692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29694$as_echo "$BOOT_JDK_VERSION" >&6; }
29695          fi # end check jdk version
29696        fi # end check javac
29697      fi # end check java
29698    fi # end check boot jdk found
29699  fi
29700
29701  fi
29702
29703
29704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29706      # Do we have a bin/java?
29707      if test ! -x "$BOOT_JDK/bin/java"; then
29708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29710        BOOT_JDK_FOUND=no
29711      else
29712        # Do we have a bin/javac?
29713        if test ! -x "$BOOT_JDK/bin/javac"; then
29714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29718          BOOT_JDK_FOUND=no
29719        else
29720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29722
29723          # Extra M4 quote needed to protect [] in grep expression.
29724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29725          if test "x$FOUND_CORRECT_VERSION" = x; then
29726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29730            BOOT_JDK_FOUND=no
29731          else
29732            # We're done! :-)
29733            BOOT_JDK_FOUND=yes
29734
29735  # Only process if variable expands to non-empty
29736
29737  if test "x$BOOT_JDK" != x; then
29738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29739
29740  # Input might be given as Windows format, start by converting to
29741  # unix format.
29742  path="$BOOT_JDK"
29743  new_path=`$CYGPATH -u "$path"`
29744
29745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29748  # "foo.exe" is OK but "foo" is an error.
29749  #
29750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29751  # It is also a way to make sure we got the proper file name for the real test later on.
29752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29753  if test "x$test_shortpath" = x; then
29754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29757  fi
29758
29759  # Call helper function which possibly converts this using DOS-style short mode.
29760  # If so, the updated path is stored in $new_path.
29761
29762  input_path="$new_path"
29763  # Check if we need to convert this using DOS-style short mode. If the path
29764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29765  # take no chances and rewrite it.
29766  # Note: m4 eats our [], so we need to use [ and ] instead.
29767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29768  if test "x$has_forbidden_chars" != x; then
29769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29773      # Going to short mode and back again did indeed matter. Since short mode is
29774      # case insensitive, let's make it lowercase to improve readability.
29775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29776      # Now convert it back to Unix-style (cygpath)
29777      input_path=`$CYGPATH -u "$shortmode_path"`
29778      new_path="$input_path"
29779    fi
29780  fi
29781
29782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29783  if test "x$test_cygdrive_prefix" = x; then
29784    # As a simple fix, exclude /usr/bin since it's not a real path.
29785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29787      # a path prefixed by /cygdrive for fixpath to work.
29788      new_path="$CYGWIN_ROOT_PATH$input_path"
29789    fi
29790  fi
29791
29792
29793  if test "x$path" != "x$new_path"; then
29794    BOOT_JDK="$new_path"
29795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29797  fi
29798
29799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29800
29801  path="$BOOT_JDK"
29802  has_colon=`$ECHO $path | $GREP ^.:`
29803  new_path="$path"
29804  if test "x$has_colon" = x; then
29805    # Not in mixed or Windows style, start by that.
29806    new_path=`cmd //c echo $path`
29807  fi
29808
29809
29810  input_path="$new_path"
29811  # Check if we need to convert this using DOS-style short mode. If the path
29812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29813  # take no chances and rewrite it.
29814  # Note: m4 eats our [], so we need to use [ and ] instead.
29815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29816  if test "x$has_forbidden_chars" != x; then
29817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29819  fi
29820
29821
29822  windows_path="$new_path"
29823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29824    unix_path=`$CYGPATH -u "$windows_path"`
29825    new_path="$unix_path"
29826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29828    new_path="$unix_path"
29829  fi
29830
29831  if test "x$path" != "x$new_path"; then
29832    BOOT_JDK="$new_path"
29833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29835  fi
29836
29837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29839
29840    else
29841      # We're on a unix platform. Hooray! :)
29842      path="$BOOT_JDK"
29843      has_space=`$ECHO "$path" | $GREP " "`
29844      if test "x$has_space" != x; then
29845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29848      fi
29849
29850      # Use eval to expand a potential ~
29851      eval path="$path"
29852      if test ! -f "$path" && test ! -d "$path"; then
29853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29854      fi
29855
29856      if test -d "$path"; then
29857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29858      else
29859        dir="`$DIRNAME "$path"`"
29860        base="`$BASENAME "$path"`"
29861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29862      fi
29863    fi
29864  fi
29865
29866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29867$as_echo_n "checking for Boot JDK... " >&6; }
29868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29869$as_echo "$BOOT_JDK" >&6; }
29870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29871$as_echo_n "checking Boot JDK version... " >&6; }
29872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29874$as_echo "$BOOT_JDK_VERSION" >&6; }
29875          fi # end check jdk version
29876        fi # end check javac
29877      fi # end check java
29878    fi # end check boot jdk found
29879  fi
29880
29881
29882  # If we haven't found anything yet, we've truly lost. Give up.
29883  if test "x$BOOT_JDK_FOUND" = xno; then
29884
29885  # Print a helpful message on how to acquire the necessary build dependency.
29886  # openjdk is the help tag: freetype, cups, alsa etc
29887  MISSING_DEPENDENCY=openjdk
29888
29889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29890    cygwin_help $MISSING_DEPENDENCY
29891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29892    msys_help $MISSING_DEPENDENCY
29893  else
29894    PKGHANDLER_COMMAND=
29895
29896    case $PKGHANDLER in
29897      apt-get)
29898        apt_help     $MISSING_DEPENDENCY ;;
29899      yum)
29900        yum_help     $MISSING_DEPENDENCY ;;
29901      port)
29902        port_help    $MISSING_DEPENDENCY ;;
29903      pkgutil)
29904        pkgutil_help $MISSING_DEPENDENCY ;;
29905      pkgadd)
29906        pkgadd_help  $MISSING_DEPENDENCY ;;
29907    esac
29908
29909    if test "x$PKGHANDLER_COMMAND" != x; then
29910      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29911    fi
29912  fi
29913
29914    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29915$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29916    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29917$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29918    as_fn_error $? "Cannot continue" "$LINENO" 5
29919  fi
29920
29921
29922
29923  # Setup tools from the Boot JDK.
29924
29925  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29926
29927  # Publish this variable in the help.
29928
29929
29930  if [ -z "${JAVA+x}" ]; then
29931    # The variable is not set by user, try to locate tool using the code snippet
29932
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29934$as_echo_n "checking for java in Boot JDK... " >&6; }
29935      JAVA=$BOOT_JDK/bin/java
29936      if test ! -x $JAVA; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29938$as_echo "not found" >&6; }
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29940$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29941        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29942      fi
29943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29944$as_echo "ok" >&6; }
29945
29946
29947  else
29948    # The variable is set, but is it from the command line or the environment?
29949
29950    # Try to remove the string !JAVA! from our list.
29951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29953      # If it failed, the variable was not from the command line. Ignore it,
29954      # but warn the user (except for BASH, which is always set by the calling BASH).
29955      if test "xJAVA" != xBASH; then
29956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29957$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29958      fi
29959      # Try to locate tool using the code snippet
29960
29961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29962$as_echo_n "checking for java in Boot JDK... " >&6; }
29963      JAVA=$BOOT_JDK/bin/java
29964      if test ! -x $JAVA; then
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29966$as_echo "not found" >&6; }
29967        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29968$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29969        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29970      fi
29971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29972$as_echo "ok" >&6; }
29973
29974
29975    else
29976      # If it succeeded, then it was overridden by the user. We will use it
29977      # for the tool.
29978
29979      # First remove it from the list of overridden variables, so we can test
29980      # for unknown variables in the end.
29981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29982
29983      # Check if we try to supply an empty value
29984      if test "x$JAVA" = x; then
29985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29986$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29988$as_echo_n "checking for JAVA... " >&6; }
29989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29990$as_echo "disabled" >&6; }
29991      else
29992        # Check if the provided tool contains a complete path.
29993        tool_specified="$JAVA"
29994        tool_basename="${tool_specified##*/}"
29995        if test "x$tool_basename" = "x$tool_specified"; then
29996          # A command without a complete path is provided, search $PATH.
29997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29998$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29999          # Extract the first word of "$tool_basename", so it can be a program name with args.
30000set dummy $tool_basename; ac_word=$2
30001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30002$as_echo_n "checking for $ac_word... " >&6; }
30003if ${ac_cv_path_JAVA+:} false; then :
30004  $as_echo_n "(cached) " >&6
30005else
30006  case $JAVA in
30007  [\\/]* | ?:[\\/]*)
30008  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30009  ;;
30010  *)
30011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30012for as_dir in $PATH
30013do
30014  IFS=$as_save_IFS
30015  test -z "$as_dir" && as_dir=.
30016    for ac_exec_ext in '' $ac_executable_extensions; do
30017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30018    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30020    break 2
30021  fi
30022done
30023  done
30024IFS=$as_save_IFS
30025
30026  ;;
30027esac
30028fi
30029JAVA=$ac_cv_path_JAVA
30030if test -n "$JAVA"; then
30031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30032$as_echo "$JAVA" >&6; }
30033else
30034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30035$as_echo "no" >&6; }
30036fi
30037
30038
30039          if test "x$JAVA" = x; then
30040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30041          fi
30042        else
30043          # Otherwise we believe it is a complete path. Use it as it is.
30044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30045$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30047$as_echo_n "checking for JAVA... " >&6; }
30048          if test ! -x "$tool_specified"; then
30049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30052          fi
30053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30054$as_echo "$tool_specified" >&6; }
30055        fi
30056      fi
30057    fi
30058
30059  fi
30060
30061
30062
30063  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30064
30065  # Publish this variable in the help.
30066
30067
30068  if [ -z "${JAVAC+x}" ]; then
30069    # The variable is not set by user, try to locate tool using the code snippet
30070
30071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30072$as_echo_n "checking for javac in Boot JDK... " >&6; }
30073      JAVAC=$BOOT_JDK/bin/javac
30074      if test ! -x $JAVAC; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30076$as_echo "not found" >&6; }
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30078$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30079        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30080      fi
30081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30082$as_echo "ok" >&6; }
30083
30084
30085  else
30086    # The variable is set, but is it from the command line or the environment?
30087
30088    # Try to remove the string !JAVAC! from our list.
30089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30091      # If it failed, the variable was not from the command line. Ignore it,
30092      # but warn the user (except for BASH, which is always set by the calling BASH).
30093      if test "xJAVAC" != xBASH; then
30094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30095$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30096      fi
30097      # Try to locate tool using the code snippet
30098
30099      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30100$as_echo_n "checking for javac in Boot JDK... " >&6; }
30101      JAVAC=$BOOT_JDK/bin/javac
30102      if test ! -x $JAVAC; then
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30104$as_echo "not found" >&6; }
30105        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30106$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30107        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30108      fi
30109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30110$as_echo "ok" >&6; }
30111
30112
30113    else
30114      # If it succeeded, then it was overridden by the user. We will use it
30115      # for the tool.
30116
30117      # First remove it from the list of overridden variables, so we can test
30118      # for unknown variables in the end.
30119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30120
30121      # Check if we try to supply an empty value
30122      if test "x$JAVAC" = x; then
30123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30124$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30126$as_echo_n "checking for JAVAC... " >&6; }
30127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30128$as_echo "disabled" >&6; }
30129      else
30130        # Check if the provided tool contains a complete path.
30131        tool_specified="$JAVAC"
30132        tool_basename="${tool_specified##*/}"
30133        if test "x$tool_basename" = "x$tool_specified"; then
30134          # A command without a complete path is provided, search $PATH.
30135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30136$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30137          # Extract the first word of "$tool_basename", so it can be a program name with args.
30138set dummy $tool_basename; ac_word=$2
30139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30140$as_echo_n "checking for $ac_word... " >&6; }
30141if ${ac_cv_path_JAVAC+:} false; then :
30142  $as_echo_n "(cached) " >&6
30143else
30144  case $JAVAC in
30145  [\\/]* | ?:[\\/]*)
30146  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30147  ;;
30148  *)
30149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30150for as_dir in $PATH
30151do
30152  IFS=$as_save_IFS
30153  test -z "$as_dir" && as_dir=.
30154    for ac_exec_ext in '' $ac_executable_extensions; do
30155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30156    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30158    break 2
30159  fi
30160done
30161  done
30162IFS=$as_save_IFS
30163
30164  ;;
30165esac
30166fi
30167JAVAC=$ac_cv_path_JAVAC
30168if test -n "$JAVAC"; then
30169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30170$as_echo "$JAVAC" >&6; }
30171else
30172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30173$as_echo "no" >&6; }
30174fi
30175
30176
30177          if test "x$JAVAC" = x; then
30178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30179          fi
30180        else
30181          # Otherwise we believe it is a complete path. Use it as it is.
30182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30183$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30185$as_echo_n "checking for JAVAC... " >&6; }
30186          if test ! -x "$tool_specified"; then
30187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30190          fi
30191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30192$as_echo "$tool_specified" >&6; }
30193        fi
30194      fi
30195    fi
30196
30197  fi
30198
30199
30200
30201  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30202
30203  # Publish this variable in the help.
30204
30205
30206  if [ -z "${JAVAH+x}" ]; then
30207    # The variable is not set by user, try to locate tool using the code snippet
30208
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30210$as_echo_n "checking for javah in Boot JDK... " >&6; }
30211      JAVAH=$BOOT_JDK/bin/javah
30212      if test ! -x $JAVAH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30214$as_echo "not found" >&6; }
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30217        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30218      fi
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30220$as_echo "ok" >&6; }
30221
30222
30223  else
30224    # The variable is set, but is it from the command line or the environment?
30225
30226    # Try to remove the string !JAVAH! from our list.
30227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30229      # If it failed, the variable was not from the command line. Ignore it,
30230      # but warn the user (except for BASH, which is always set by the calling BASH).
30231      if test "xJAVAH" != xBASH; then
30232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30233$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30234      fi
30235      # Try to locate tool using the code snippet
30236
30237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30238$as_echo_n "checking for javah in Boot JDK... " >&6; }
30239      JAVAH=$BOOT_JDK/bin/javah
30240      if test ! -x $JAVAH; then
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30242$as_echo "not found" >&6; }
30243        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30244$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30245        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30246      fi
30247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30248$as_echo "ok" >&6; }
30249
30250
30251    else
30252      # If it succeeded, then it was overridden by the user. We will use it
30253      # for the tool.
30254
30255      # First remove it from the list of overridden variables, so we can test
30256      # for unknown variables in the end.
30257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30258
30259      # Check if we try to supply an empty value
30260      if test "x$JAVAH" = x; then
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30262$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30264$as_echo_n "checking for JAVAH... " >&6; }
30265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30266$as_echo "disabled" >&6; }
30267      else
30268        # Check if the provided tool contains a complete path.
30269        tool_specified="$JAVAH"
30270        tool_basename="${tool_specified##*/}"
30271        if test "x$tool_basename" = "x$tool_specified"; then
30272          # A command without a complete path is provided, search $PATH.
30273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30274$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30275          # Extract the first word of "$tool_basename", so it can be a program name with args.
30276set dummy $tool_basename; ac_word=$2
30277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30278$as_echo_n "checking for $ac_word... " >&6; }
30279if ${ac_cv_path_JAVAH+:} false; then :
30280  $as_echo_n "(cached) " >&6
30281else
30282  case $JAVAH in
30283  [\\/]* | ?:[\\/]*)
30284  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30285  ;;
30286  *)
30287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30288for as_dir in $PATH
30289do
30290  IFS=$as_save_IFS
30291  test -z "$as_dir" && as_dir=.
30292    for ac_exec_ext in '' $ac_executable_extensions; do
30293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30294    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30296    break 2
30297  fi
30298done
30299  done
30300IFS=$as_save_IFS
30301
30302  ;;
30303esac
30304fi
30305JAVAH=$ac_cv_path_JAVAH
30306if test -n "$JAVAH"; then
30307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30308$as_echo "$JAVAH" >&6; }
30309else
30310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30311$as_echo "no" >&6; }
30312fi
30313
30314
30315          if test "x$JAVAH" = x; then
30316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30317          fi
30318        else
30319          # Otherwise we believe it is a complete path. Use it as it is.
30320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30321$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30323$as_echo_n "checking for JAVAH... " >&6; }
30324          if test ! -x "$tool_specified"; then
30325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30328          fi
30329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30330$as_echo "$tool_specified" >&6; }
30331        fi
30332      fi
30333    fi
30334
30335  fi
30336
30337
30338
30339  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30340
30341  # Publish this variable in the help.
30342
30343
30344  if [ -z "${JAR+x}" ]; then
30345    # The variable is not set by user, try to locate tool using the code snippet
30346
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30348$as_echo_n "checking for jar in Boot JDK... " >&6; }
30349      JAR=$BOOT_JDK/bin/jar
30350      if test ! -x $JAR; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30352$as_echo "not found" >&6; }
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30354$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30355        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30356      fi
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30358$as_echo "ok" >&6; }
30359
30360
30361  else
30362    # The variable is set, but is it from the command line or the environment?
30363
30364    # Try to remove the string !JAR! from our list.
30365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30367      # If it failed, the variable was not from the command line. Ignore it,
30368      # but warn the user (except for BASH, which is always set by the calling BASH).
30369      if test "xJAR" != xBASH; then
30370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30371$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30372      fi
30373      # Try to locate tool using the code snippet
30374
30375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30376$as_echo_n "checking for jar in Boot JDK... " >&6; }
30377      JAR=$BOOT_JDK/bin/jar
30378      if test ! -x $JAR; then
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30380$as_echo "not found" >&6; }
30381        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30382$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30383        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30384      fi
30385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30386$as_echo "ok" >&6; }
30387
30388
30389    else
30390      # If it succeeded, then it was overridden by the user. We will use it
30391      # for the tool.
30392
30393      # First remove it from the list of overridden variables, so we can test
30394      # for unknown variables in the end.
30395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30396
30397      # Check if we try to supply an empty value
30398      if test "x$JAR" = x; then
30399        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30400$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30402$as_echo_n "checking for JAR... " >&6; }
30403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30404$as_echo "disabled" >&6; }
30405      else
30406        # Check if the provided tool contains a complete path.
30407        tool_specified="$JAR"
30408        tool_basename="${tool_specified##*/}"
30409        if test "x$tool_basename" = "x$tool_specified"; then
30410          # A command without a complete path is provided, search $PATH.
30411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30412$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30413          # Extract the first word of "$tool_basename", so it can be a program name with args.
30414set dummy $tool_basename; ac_word=$2
30415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30416$as_echo_n "checking for $ac_word... " >&6; }
30417if ${ac_cv_path_JAR+:} false; then :
30418  $as_echo_n "(cached) " >&6
30419else
30420  case $JAR in
30421  [\\/]* | ?:[\\/]*)
30422  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30423  ;;
30424  *)
30425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30426for as_dir in $PATH
30427do
30428  IFS=$as_save_IFS
30429  test -z "$as_dir" && as_dir=.
30430    for ac_exec_ext in '' $ac_executable_extensions; do
30431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30432    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30434    break 2
30435  fi
30436done
30437  done
30438IFS=$as_save_IFS
30439
30440  ;;
30441esac
30442fi
30443JAR=$ac_cv_path_JAR
30444if test -n "$JAR"; then
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30446$as_echo "$JAR" >&6; }
30447else
30448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30449$as_echo "no" >&6; }
30450fi
30451
30452
30453          if test "x$JAR" = x; then
30454            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30455          fi
30456        else
30457          # Otherwise we believe it is a complete path. Use it as it is.
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30459$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30460          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30461$as_echo_n "checking for JAR... " >&6; }
30462          if test ! -x "$tool_specified"; then
30463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30466          fi
30467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30468$as_echo "$tool_specified" >&6; }
30469        fi
30470      fi
30471    fi
30472
30473  fi
30474
30475
30476
30477  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30478
30479  # Publish this variable in the help.
30480
30481
30482  if [ -z "${JARSIGNER+x}" ]; then
30483    # The variable is not set by user, try to locate tool using the code snippet
30484
30485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30486$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30487      JARSIGNER=$BOOT_JDK/bin/jarsigner
30488      if test ! -x $JARSIGNER; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30490$as_echo "not found" >&6; }
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30492$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30493        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30494      fi
30495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30496$as_echo "ok" >&6; }
30497
30498
30499  else
30500    # The variable is set, but is it from the command line or the environment?
30501
30502    # Try to remove the string !JARSIGNER! from our list.
30503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30505      # If it failed, the variable was not from the command line. Ignore it,
30506      # but warn the user (except for BASH, which is always set by the calling BASH).
30507      if test "xJARSIGNER" != xBASH; then
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30509$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30510      fi
30511      # Try to locate tool using the code snippet
30512
30513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30514$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30515      JARSIGNER=$BOOT_JDK/bin/jarsigner
30516      if test ! -x $JARSIGNER; then
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30518$as_echo "not found" >&6; }
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30520$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30521        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30522      fi
30523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30524$as_echo "ok" >&6; }
30525
30526
30527    else
30528      # If it succeeded, then it was overridden by the user. We will use it
30529      # for the tool.
30530
30531      # First remove it from the list of overridden variables, so we can test
30532      # for unknown variables in the end.
30533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30534
30535      # Check if we try to supply an empty value
30536      if test "x$JARSIGNER" = x; then
30537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30538$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30540$as_echo_n "checking for JARSIGNER... " >&6; }
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30542$as_echo "disabled" >&6; }
30543      else
30544        # Check if the provided tool contains a complete path.
30545        tool_specified="$JARSIGNER"
30546        tool_basename="${tool_specified##*/}"
30547        if test "x$tool_basename" = "x$tool_specified"; then
30548          # A command without a complete path is provided, search $PATH.
30549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30550$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30551          # Extract the first word of "$tool_basename", so it can be a program name with args.
30552set dummy $tool_basename; ac_word=$2
30553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30554$as_echo_n "checking for $ac_word... " >&6; }
30555if ${ac_cv_path_JARSIGNER+:} false; then :
30556  $as_echo_n "(cached) " >&6
30557else
30558  case $JARSIGNER in
30559  [\\/]* | ?:[\\/]*)
30560  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30561  ;;
30562  *)
30563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30564for as_dir in $PATH
30565do
30566  IFS=$as_save_IFS
30567  test -z "$as_dir" && as_dir=.
30568    for ac_exec_ext in '' $ac_executable_extensions; do
30569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30570    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30572    break 2
30573  fi
30574done
30575  done
30576IFS=$as_save_IFS
30577
30578  ;;
30579esac
30580fi
30581JARSIGNER=$ac_cv_path_JARSIGNER
30582if test -n "$JARSIGNER"; then
30583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30584$as_echo "$JARSIGNER" >&6; }
30585else
30586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30587$as_echo "no" >&6; }
30588fi
30589
30590
30591          if test "x$JARSIGNER" = x; then
30592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30593          fi
30594        else
30595          # Otherwise we believe it is a complete path. Use it as it is.
30596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30597$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30599$as_echo_n "checking for JARSIGNER... " >&6; }
30600          if test ! -x "$tool_specified"; then
30601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30602$as_echo "not found" >&6; }
30603            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30604          fi
30605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30606$as_echo "$tool_specified" >&6; }
30607        fi
30608      fi
30609    fi
30610
30611  fi
30612
30613
30614
30615  # Finally, set some other options...
30616
30617  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30618  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30619
30620
30621
30622  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30623  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30624  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30625  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30626  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30627  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30628    dummy="$dummy -Xpatch:foo=bar"
30629    JVM_ARG_OK=true
30630  else
30631    $ECHO "Arg failed:" >&5
30632    $ECHO "$OUTPUT" >&5
30633    JVM_ARG_OK=false
30634  fi
30635
30636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30637$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30638  if test "x$JVM_ARG_OK" = "xtrue"; then
30639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30640$as_echo "yes" >&6; }
30641    BOOT_JDK_MODULAR="true"
30642  else
30643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30644$as_echo "no" >&6; }
30645    BOOT_JDK_MODULAR="false"
30646  fi
30647
30648
30649
30650
30651  # Check if the boot jdk is 32 or 64 bit
30652  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30653    BOOT_JDK_BITS="64"
30654  else
30655    BOOT_JDK_BITS="32"
30656  fi
30657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30658$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30660$as_echo "$BOOT_JDK_BITS" >&6; }
30661
30662
30663
30664
30665# Check whether --with-build-jdk was given.
30666if test "${with_build_jdk+set}" = set; then :
30667  withval=$with_build_jdk;
30668fi
30669
30670
30671  CREATE_BUILDJDK=false
30672  EXTERNAL_BUILDJDK=false
30673  BUILD_JDK_FOUND="no"
30674  if test "x$with_build_jdk" != "x"; then
30675
30676  if test "x$BUILD_JDK_FOUND" = xno; then
30677    # Execute the test
30678
30679       if test "x$with_build_jdk" != x; then
30680         BUILD_JDK=$with_build_jdk
30681         BUILD_JDK_FOUND=maybe
30682         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30683$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30684       fi
30685
30686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30687    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30688      # Do we have a bin/java?
30689      if test ! -x "$BUILD_JDK/bin/java"; then
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30691$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30692        BUILD_JDK_FOUND=no
30693      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30695$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30696        BUILD_JDK_FOUND=no
30697      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30699$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30700        BUILD_JDK_FOUND=no
30701      elif test ! -x "$BUILD_JDK/bin/javac"; then
30702        # Do we have a bin/javac?
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30704$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30706$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30707        BUILD_JDK_FOUND=no
30708      else
30709        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30710        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30711
30712        # Extra M4 quote needed to protect [] in grep expression.
30713        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30714        if test "x$FOUND_CORRECT_VERSION" = x; then
30715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30716$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30717          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30718$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30719          BUILD_JDK_FOUND=no
30720        else
30721          # We're done!
30722          BUILD_JDK_FOUND=yes
30723
30724  # Only process if variable expands to non-empty
30725
30726  if test "x$BUILD_JDK" != x; then
30727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30728
30729  # Input might be given as Windows format, start by converting to
30730  # unix format.
30731  path="$BUILD_JDK"
30732  new_path=`$CYGPATH -u "$path"`
30733
30734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30737  # "foo.exe" is OK but "foo" is an error.
30738  #
30739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30740  # It is also a way to make sure we got the proper file name for the real test later on.
30741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30742  if test "x$test_shortpath" = x; then
30743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30744$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30745    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30746  fi
30747
30748  # Call helper function which possibly converts this using DOS-style short mode.
30749  # If so, the updated path is stored in $new_path.
30750
30751  input_path="$new_path"
30752  # Check if we need to convert this using DOS-style short mode. If the path
30753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30754  # take no chances and rewrite it.
30755  # Note: m4 eats our [], so we need to use [ and ] instead.
30756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30757  if test "x$has_forbidden_chars" != x; then
30758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30762      # Going to short mode and back again did indeed matter. Since short mode is
30763      # case insensitive, let's make it lowercase to improve readability.
30764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30765      # Now convert it back to Unix-style (cygpath)
30766      input_path=`$CYGPATH -u "$shortmode_path"`
30767      new_path="$input_path"
30768    fi
30769  fi
30770
30771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30772  if test "x$test_cygdrive_prefix" = x; then
30773    # As a simple fix, exclude /usr/bin since it's not a real path.
30774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30776      # a path prefixed by /cygdrive for fixpath to work.
30777      new_path="$CYGWIN_ROOT_PATH$input_path"
30778    fi
30779  fi
30780
30781
30782  if test "x$path" != "x$new_path"; then
30783    BUILD_JDK="$new_path"
30784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30785$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30786  fi
30787
30788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30789
30790  path="$BUILD_JDK"
30791  has_colon=`$ECHO $path | $GREP ^.:`
30792  new_path="$path"
30793  if test "x$has_colon" = x; then
30794    # Not in mixed or Windows style, start by that.
30795    new_path=`cmd //c echo $path`
30796  fi
30797
30798
30799  input_path="$new_path"
30800  # Check if we need to convert this using DOS-style short mode. If the path
30801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30802  # take no chances and rewrite it.
30803  # Note: m4 eats our [], so we need to use [ and ] instead.
30804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30805  if test "x$has_forbidden_chars" != x; then
30806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30808  fi
30809
30810
30811  windows_path="$new_path"
30812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30813    unix_path=`$CYGPATH -u "$windows_path"`
30814    new_path="$unix_path"
30815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30817    new_path="$unix_path"
30818  fi
30819
30820  if test "x$path" != "x$new_path"; then
30821    BUILD_JDK="$new_path"
30822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30823$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30824  fi
30825
30826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30828
30829    else
30830      # We're on a unix platform. Hooray! :)
30831      path="$BUILD_JDK"
30832      has_space=`$ECHO "$path" | $GREP " "`
30833      if test "x$has_space" != x; then
30834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30835$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30837      fi
30838
30839      # Use eval to expand a potential ~
30840      eval path="$path"
30841      if test ! -f "$path" && test ! -d "$path"; then
30842        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30843      fi
30844
30845      if test -d "$path"; then
30846        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30847      else
30848        dir="`$DIRNAME "$path"`"
30849        base="`$BASENAME "$path"`"
30850        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30851      fi
30852    fi
30853  fi
30854
30855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30856$as_echo_n "checking for Build JDK... " >&6; }
30857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30858$as_echo "$BUILD_JDK" >&6; }
30859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30860$as_echo_n "checking Build JDK version... " >&6; }
30861          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30863$as_echo "$BUILD_JDK_VERSION" >&6; }
30864        fi # end check jdk version
30865      fi # end check java
30866    fi # end check build jdk found
30867  fi
30868
30869    EXTERNAL_BUILDJDK=true
30870  else
30871    if test "x$COMPILE_TYPE" = "xcross"; then
30872      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30873      BUILD_JDK_FOUND=yes
30874      CREATE_BUILDJDK=true
30875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30876$as_echo_n "checking for Build JDK... " >&6; }
30877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30878$as_echo "yes, will build it for the host platform" >&6; }
30879    else
30880      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30881      BUILD_JDK_FOUND=yes
30882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30883$as_echo_n "checking for Build JDK... " >&6; }
30884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30885$as_echo "yes, will use output dir" >&6; }
30886    fi
30887  fi
30888
30889  JMOD="$BUILD_JDK/bin/jmod"
30890  JLINK="$BUILD_JDK/bin/jlink"
30891
30892
30893
30894  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30896$as_echo_n "checking for Build JDK... " >&6; }
30897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30898$as_echo "no" >&6; }
30899    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30900  fi
30901
30902
30903
30904
30905
30906
30907###############################################################################
30908#
30909# Configure the sources to use. We can add or override individual directories.
30910#
30911###############################################################################
30912
30913
30914  # Where are the sources.
30915  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30916  CORBA_TOPDIR="$SRC_ROOT/corba"
30917  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30918  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30919  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30920  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30921  JDK_TOPDIR="$SRC_ROOT/jdk"
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931  # This feature is no longer supported.
30932
30933
30934
30935# Check whether --with-add-source-root was given.
30936if test "${with_add_source_root+set}" = set; then :
30937  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
30938$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30939fi
30940
30941
30942
30943
30944# Check whether --with-override-source-root was given.
30945if test "${with_override_source_root+set}" = set; then :
30946  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
30947$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30948fi
30949
30950
30951
30952
30953# Check whether --with-adds-and-overrides was given.
30954if test "${with_adds_and_overrides+set}" = set; then :
30955  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
30956$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30957fi
30958
30959
30960
30961
30962# Check whether --with-override-langtools was given.
30963if test "${with_override_langtools+set}" = set; then :
30964  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30965$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30966fi
30967
30968
30969
30970
30971# Check whether --with-override-corba was given.
30972if test "${with_override_corba+set}" = set; then :
30973  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30974$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30975fi
30976
30977
30978
30979
30980# Check whether --with-override-jaxp was given.
30981if test "${with_override_jaxp+set}" = set; then :
30982  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30983$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30984fi
30985
30986
30987
30988
30989# Check whether --with-override-jaxws was given.
30990if test "${with_override_jaxws+set}" = set; then :
30991  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30992$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30993fi
30994
30995
30996
30997
30998# Check whether --with-override-hotspot was given.
30999if test "${with_override_hotspot+set}" = set; then :
31000  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31001$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31002fi
31003
31004
31005
31006
31007# Check whether --with-override-nashorn was given.
31008if test "${with_override_nashorn+set}" = set; then :
31009  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31010$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31011fi
31012
31013
31014
31015
31016# Check whether --with-override-jdk was given.
31017if test "${with_override_jdk+set}" = set; then :
31018  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31019$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31020fi
31021
31022
31023
31024
31025  BUILD_OUTPUT="$OUTPUT_ROOT"
31026
31027
31028  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31029  BUILD_HOTSPOT=true
31030
31031
31032
31033# Check whether --with-import-hotspot was given.
31034if test "${with_import_hotspot+set}" = set; then :
31035  withval=$with_import_hotspot;
31036fi
31037
31038  if test "x$with_import_hotspot" != x; then
31039    CURDIR="$PWD"
31040    cd "$with_import_hotspot"
31041    HOTSPOT_DIST="`pwd`"
31042    cd "$CURDIR"
31043    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31044      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31045    fi
31046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31047$as_echo_n "checking if hotspot should be imported... " >&6; }
31048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31049$as_echo "yes from $HOTSPOT_DIST" >&6; }
31050    BUILD_HOTSPOT=false
31051  fi
31052
31053  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31054
31055
31056
31057
31058# Check whether --with-import-modules was given.
31059if test "${with_import_modules+set}" = set; then :
31060  withval=$with_import_modules;
31061fi
31062
31063
31064  if test "x$with_import_modules" != x \
31065      && test "x$with_import_modules" != "xno"; then
31066    if test -d "$with_import_modules"; then
31067      IMPORT_MODULES_TOPDIR="$with_import_modules"
31068
31069  # Only process if variable expands to non-empty
31070
31071  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31073
31074  # Input might be given as Windows format, start by converting to
31075  # unix format.
31076  path="$IMPORT_MODULES_TOPDIR"
31077  new_path=`$CYGPATH -u "$path"`
31078
31079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31082  # "foo.exe" is OK but "foo" is an error.
31083  #
31084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31085  # It is also a way to make sure we got the proper file name for the real test later on.
31086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31087  if test "x$test_shortpath" = x; then
31088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31089$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31090    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31091  fi
31092
31093  # Call helper function which possibly converts this using DOS-style short mode.
31094  # If so, the updated path is stored in $new_path.
31095
31096  input_path="$new_path"
31097  # Check if we need to convert this using DOS-style short mode. If the path
31098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31099  # take no chances and rewrite it.
31100  # Note: m4 eats our [], so we need to use [ and ] instead.
31101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31102  if test "x$has_forbidden_chars" != x; then
31103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31107      # Going to short mode and back again did indeed matter. Since short mode is
31108      # case insensitive, let's make it lowercase to improve readability.
31109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31110      # Now convert it back to Unix-style (cygpath)
31111      input_path=`$CYGPATH -u "$shortmode_path"`
31112      new_path="$input_path"
31113    fi
31114  fi
31115
31116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31117  if test "x$test_cygdrive_prefix" = x; then
31118    # As a simple fix, exclude /usr/bin since it's not a real path.
31119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31121      # a path prefixed by /cygdrive for fixpath to work.
31122      new_path="$CYGWIN_ROOT_PATH$input_path"
31123    fi
31124  fi
31125
31126
31127  if test "x$path" != "x$new_path"; then
31128    IMPORT_MODULES_TOPDIR="$new_path"
31129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31130$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31131  fi
31132
31133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31134
31135  path="$IMPORT_MODULES_TOPDIR"
31136  has_colon=`$ECHO $path | $GREP ^.:`
31137  new_path="$path"
31138  if test "x$has_colon" = x; then
31139    # Not in mixed or Windows style, start by that.
31140    new_path=`cmd //c echo $path`
31141  fi
31142
31143
31144  input_path="$new_path"
31145  # Check if we need to convert this using DOS-style short mode. If the path
31146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31147  # take no chances and rewrite it.
31148  # Note: m4 eats our [], so we need to use [ and ] instead.
31149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31150  if test "x$has_forbidden_chars" != x; then
31151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31153  fi
31154
31155
31156  windows_path="$new_path"
31157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31158    unix_path=`$CYGPATH -u "$windows_path"`
31159    new_path="$unix_path"
31160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31162    new_path="$unix_path"
31163  fi
31164
31165  if test "x$path" != "x$new_path"; then
31166    IMPORT_MODULES_TOPDIR="$new_path"
31167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31168$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31169  fi
31170
31171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31173
31174    else
31175      # We're on a unix platform. Hooray! :)
31176      path="$IMPORT_MODULES_TOPDIR"
31177      has_space=`$ECHO "$path" | $GREP " "`
31178      if test "x$has_space" != x; then
31179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31180$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31182      fi
31183
31184      # Use eval to expand a potential ~
31185      eval path="$path"
31186      if test ! -f "$path" && test ! -d "$path"; then
31187        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31188      fi
31189
31190      if test -d "$path"; then
31191        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31192      else
31193        dir="`$DIRNAME "$path"`"
31194        base="`$BASENAME "$path"`"
31195        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31196      fi
31197    fi
31198  fi
31199
31200    elif test -e "$with_import_modules"; then
31201      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31202      $RM -rf "$IMPORT_MODULES_TOPDIR"
31203      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31204      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31205        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31206      fi
31207    else
31208      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31209    fi
31210  fi
31211
31212  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31213    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31214  fi
31215  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31216    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31217  fi
31218  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31219    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31220  fi
31221  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31222    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31223  fi
31224  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31225    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31226  fi
31227  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31228    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31229  fi
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239###############################################################################
31240#
31241# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31242# native code.
31243#
31244###############################################################################
31245
31246# See if we are doing a complete static build or not
31247
31248  # Check whether --enable-static-build was given.
31249if test "${enable_static_build+set}" = set; then :
31250  enableval=$enable_static_build;
31251fi
31252
31253  STATIC_BUILD=false
31254  if test "x$enable_static_build" = "xyes"; then
31255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31256$as_echo_n "checking if static build is enabled... " >&6; }
31257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31258$as_echo "yes" >&6; }
31259    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31260      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31261    fi
31262    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31263    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31264    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31265    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31266    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31267    STATIC_BUILD=true
31268  elif test "x$enable_static_build" = "xno"; then
31269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31270$as_echo_n "checking if static build is enabled... " >&6; }
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31272$as_echo "no" >&6; }
31273  elif test "x$enable_static_build" != "x"; then
31274    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31275  fi
31276
31277
31278
31279
31280# First determine the toolchain type (compiler family)
31281
31282
31283# Check whether --with-toolchain-type was given.
31284if test "${with_toolchain_type+set}" = set; then :
31285  withval=$with_toolchain_type;
31286fi
31287
31288
31289  # Use indirect variable referencing
31290  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31291  VALID_TOOLCHAINS=${!toolchain_var_name}
31292
31293  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31294    if test -n "$XCODEBUILD"; then
31295      # On Mac OS X, default toolchain to clang after Xcode 5
31296      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31297      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31298      if test $? -ne 0; then
31299        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31300      fi
31301      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31302          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31303          $CUT -f 1 -d .`
31304      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31305$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31306      if test $XCODE_MAJOR_VERSION -ge 5; then
31307          DEFAULT_TOOLCHAIN="clang"
31308      else
31309          DEFAULT_TOOLCHAIN="gcc"
31310      fi
31311    else
31312      # If Xcode is not installed, but the command line tools are
31313      # then we can't run xcodebuild. On these systems we should
31314      # default to clang
31315      DEFAULT_TOOLCHAIN="clang"
31316    fi
31317  else
31318    # First toolchain type in the list is the default
31319    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31320  fi
31321
31322  if test "x$with_toolchain_type" = xlist; then
31323    # List all toolchains
31324    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31325$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31326    for toolchain in $VALID_TOOLCHAINS; do
31327      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31328      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31329      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31330    done
31331
31332    exit 0
31333  elif test "x$with_toolchain_type" != x; then
31334    # User override; check that it is valid
31335    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31336      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31337$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31339$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31340      as_fn_error $? "Cannot continue." "$LINENO" 5
31341    fi
31342    TOOLCHAIN_TYPE=$with_toolchain_type
31343  else
31344    # No flag given, use default
31345    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31346  fi
31347
31348
31349  TOOLCHAIN_CC_BINARY_clang="clang"
31350  TOOLCHAIN_CC_BINARY_gcc="gcc"
31351  TOOLCHAIN_CC_BINARY_microsoft="cl"
31352  TOOLCHAIN_CC_BINARY_solstudio="cc"
31353  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31354
31355  TOOLCHAIN_CXX_BINARY_clang="clang++"
31356  TOOLCHAIN_CXX_BINARY_gcc="g++"
31357  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31358  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31359  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31360
31361  # Use indirect variable referencing
31362  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31363  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31364  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31365  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31366  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31367  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31368  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31369  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31370
31371
31372  # Define filename patterns
31373  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31374    LIBRARY_PREFIX=
31375    SHARED_LIBRARY_SUFFIX='.dll'
31376    STATIC_LIBRARY_SUFFIX='.lib'
31377    SHARED_LIBRARY='$1.dll'
31378    STATIC_LIBRARY='$1.lib'
31379    OBJ_SUFFIX='.obj'
31380    EXE_SUFFIX='.exe'
31381  else
31382    LIBRARY_PREFIX=lib
31383    SHARED_LIBRARY_SUFFIX='.so'
31384    STATIC_LIBRARY_SUFFIX='.a'
31385    SHARED_LIBRARY='lib$1.so'
31386    STATIC_LIBRARY='lib$1.a'
31387    OBJ_SUFFIX='.o'
31388    EXE_SUFFIX=''
31389    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31390      # For full static builds, we're overloading the SHARED_LIBRARY
31391      # variables in order to limit the amount of changes required.
31392      # It would be better to remove SHARED and just use LIBRARY and
31393      # LIBRARY_SUFFIX for libraries that can be built either
31394      # shared or static and use STATIC_* for libraries that are
31395      # always built statically.
31396      if test "x$STATIC_BUILD" = xtrue; then
31397        SHARED_LIBRARY='lib$1.a'
31398        SHARED_LIBRARY_SUFFIX='.a'
31399      else
31400        SHARED_LIBRARY='lib$1.dylib'
31401        SHARED_LIBRARY_SUFFIX='.dylib'
31402      fi
31403    fi
31404  fi
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31416    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31417$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31418  else
31419    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31420$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31421  fi
31422
31423
31424# User supplied flags should be used when configure detects compilers
31425
31426  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31428$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31429  fi
31430
31431  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31432    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31433$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31434  fi
31435
31436  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31438$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31439  fi
31440
31441
31442# Check whether --with-extra-cflags was given.
31443if test "${with_extra_cflags+set}" = set; then :
31444  withval=$with_extra_cflags;
31445fi
31446
31447
31448
31449# Check whether --with-extra-cxxflags was given.
31450if test "${with_extra_cxxflags+set}" = set; then :
31451  withval=$with_extra_cxxflags;
31452fi
31453
31454
31455
31456# Check whether --with-extra-ldflags was given.
31457if test "${with_extra_ldflags+set}" = set; then :
31458  withval=$with_extra_ldflags;
31459fi
31460
31461
31462  EXTRA_CFLAGS="$with_extra_cflags"
31463  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31464  EXTRA_LDFLAGS="$with_extra_ldflags"
31465
31466  # Hotspot needs these set in their legacy form
31467  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31468  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31469  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479  # The global CFLAGS and LDLAGS variables are used by configure tests and
31480  # should include the extra parameters
31481  CFLAGS="$EXTRA_CFLAGS"
31482  CXXFLAGS="$EXTRA_CXXFLAGS"
31483  LDFLAGS="$EXTRA_LDFLAGS"
31484  CPPFLAGS=""
31485
31486# The sysroot cflags are needed for configure to be able to run the compilers
31487
31488  if test "x$SYSROOT" != "x"; then
31489    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31490      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31491        # Solaris Studio does not have a concept of sysroot. Instead we must
31492        # make sure the default include and lib dirs are appended to each
31493        # compile and link command line. Must also add -I-xbuiltin to enable
31494        # inlining of system functions and intrinsics.
31495        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31496        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31497            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31498            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31499      fi
31500    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31501      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31502      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31503    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31504      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31505      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31506    fi
31507    # Propagate the sysroot args to hotspot
31508    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31509    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31510    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31511    # The global CFLAGS and LDFLAGS variables need these for configure to function
31512    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31513    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31514    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31515    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31516  fi
31517
31518  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31519    # We also need -iframework<path>/System/Library/Frameworks
31520    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31521    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31522    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31523    # set this here so it doesn't have to be peppered throughout the forest
31524    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31525    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31526  fi
31527
31528
31529
31530
31531
31532# Then detect the actual binaries needed
31533
31534  # FIXME: Is this needed?
31535  ac_ext=cpp
31536ac_cpp='$CXXCPP $CPPFLAGS'
31537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31540
31541
31542  # Store the CFLAGS etc passed to the configure script.
31543  ORG_CFLAGS="$CFLAGS"
31544  ORG_CXXFLAGS="$CXXFLAGS"
31545
31546  # autoconf magic only relies on PATH, so update it if tools dir is specified
31547  OLD_PATH="$PATH"
31548
31549  # On Windows, we need to detect the visual studio installation first.
31550  # This will change the PATH, but we need to keep that new PATH even
31551  # after toolchain detection is done, since the compiler (on x86) uses
31552  # it for DLL resolution in runtime.
31553  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31554      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31555
31556  # Store path to cygwin link.exe to help excluding it when searching for
31557  # VS linker. This must be done before changing the PATH when looking for VS.
31558  # Extract the first word of "link", so it can be a program name with args.
31559set dummy link; ac_word=$2
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31561$as_echo_n "checking for $ac_word... " >&6; }
31562if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31563  $as_echo_n "(cached) " >&6
31564else
31565  case $CYGWIN_LINK in
31566  [\\/]* | ?:[\\/]*)
31567  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31568  ;;
31569  *)
31570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31571for as_dir in $PATH
31572do
31573  IFS=$as_save_IFS
31574  test -z "$as_dir" && as_dir=.
31575    for ac_exec_ext in '' $ac_executable_extensions; do
31576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31577    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31579    break 2
31580  fi
31581done
31582  done
31583IFS=$as_save_IFS
31584
31585  ;;
31586esac
31587fi
31588CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31589if test -n "$CYGWIN_LINK"; then
31590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31591$as_echo "$CYGWIN_LINK" >&6; }
31592else
31593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31594$as_echo "no" >&6; }
31595fi
31596
31597
31598  if test "x$CYGWIN_LINK" != x; then
31599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31600$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31601    "$CYGWIN_LINK" --version > /dev/null
31602    if test $? -eq 0 ; then
31603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31604$as_echo "yes" >&6; }
31605    else
31606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31607$as_echo "no" >&6; }
31608      # This might be the VS linker. Don't exclude it later on.
31609      CYGWIN_LINK=""
31610    fi
31611  fi
31612
31613  # First-hand choice is to locate and run the vsvars bat file.
31614
31615
31616# Check whether --with-toolchain-version was given.
31617if test "${with_toolchain_version+set}" = set; then :
31618  withval=$with_toolchain_version;
31619fi
31620
31621
31622  if test "x$with_toolchain_version" = xlist; then
31623    # List all toolchains
31624    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31625$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31626    for version in $VALID_VS_VERSIONS; do
31627      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31628      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31629    done
31630
31631    exit 0
31632  elif test "x$DEVKIT_VS_VERSION" != x; then
31633    VS_VERSION=$DEVKIT_VS_VERSION
31634    TOOLCHAIN_VERSION=$VS_VERSION
31635    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31636    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31637    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31638    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31639    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31640    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31641
31642    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31643    # can still be exported as INCLUDE for compiler invocations without
31644    # SYSROOT_CFLAGS
31645    OLDIFS="$IFS"
31646    IFS=";"
31647    for i in $DEVKIT_VS_INCLUDE; do
31648      ipath=$i
31649
31650  unix_path="$ipath"
31651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31652    windows_path=`$CYGPATH -m "$unix_path"`
31653    ipath="$windows_path"
31654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31655    windows_path=`cmd //c echo $unix_path`
31656    ipath="$windows_path"
31657  fi
31658
31659      VS_INCLUDE="$VS_INCLUDE;$ipath"
31660    done
31661    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31662    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31663    for i in $DEVKIT_VS_LIB; do
31664      libpath=$i
31665
31666  unix_path="$libpath"
31667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31668    windows_path=`$CYGPATH -m "$unix_path"`
31669    libpath="$windows_path"
31670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31671    windows_path=`cmd //c echo $unix_path`
31672    libpath="$windows_path"
31673  fi
31674
31675      VS_LIB="$VS_LIB;$libpath"
31676    done
31677    IFS="$OLDIFS"
31678
31679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31680$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31681
31682  elif test "x$with_toolchain_version" != x; then
31683    # User override; check that it is valid
31684    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31685      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31686$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31688$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31689      as_fn_error $? "Cannot continue." "$LINENO" 5
31690    fi
31691    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31692  else
31693    # No flag given, use default
31694    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31695  fi
31696
31697  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31698
31699  VS_VERSION="$VS_VERSION"
31700  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31701  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31702  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31703  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31704
31705  # When using --with-tools-dir, assume it points to the correct and default
31706  # version of Visual Studio or that --with-toolchain-version was also set.
31707  if test "x$with_tools_dir" != x; then
31708
31709  if test "x$VS_ENV_CMD" = x; then
31710    VS_VERSION="${VS_VERSION}"
31711    VS_BASE="$with_tools_dir/../.."
31712    METHOD="--with-tools-dir"
31713
31714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31715      VCVARSFILE="vc/bin/vcvars32.bat"
31716    else
31717      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31718    fi
31719
31720
31721  windows_path="$VS_BASE"
31722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31723    unix_path=`$CYGPATH -u "$windows_path"`
31724    VS_BASE="$unix_path"
31725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31727    VS_BASE="$unix_path"
31728  fi
31729
31730    if test -d "$VS_BASE"; then
31731      if test -f "$VS_BASE/$VCVARSFILE"; then
31732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31733$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31734        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31735        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31736        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31737        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31738      else
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31742$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31743      fi
31744    fi
31745  fi
31746
31747
31748  if test "x$VS_ENV_CMD" = x; then
31749    VS_VERSION="${VS_VERSION}"
31750    VS_BASE="$with_tools_dir/../../.."
31751    METHOD="--with-tools-dir"
31752
31753    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31754      VCVARSFILE="vc/bin/vcvars32.bat"
31755    else
31756      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31757    fi
31758
31759
31760  windows_path="$VS_BASE"
31761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31762    unix_path=`$CYGPATH -u "$windows_path"`
31763    VS_BASE="$unix_path"
31764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31766    VS_BASE="$unix_path"
31767  fi
31768
31769    if test -d "$VS_BASE"; then
31770      if test -f "$VS_BASE/$VCVARSFILE"; then
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31772$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31773        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31774        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31775        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31776        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31777      else
31778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31779$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31781$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31782      fi
31783    fi
31784  fi
31785
31786    if test "x$VS_ENV_CMD" = x; then
31787      # Having specified an argument which is incorrect will produce an instant failure;
31788      # we should not go on looking
31789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31790$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31791      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31792$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31794$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31795      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31796    fi
31797  fi
31798
31799  VS_ENV_CMD=""
31800  VS_ENV_ARGS=""
31801
31802  if test "x$VS_COMNTOOLS" != x; then
31803
31804  if test "x$VS_ENV_CMD" = x; then
31805    VS_VERSION="${VS_VERSION}"
31806    VS_BASE="$VS_COMNTOOLS/../.."
31807    METHOD="$VS_COMNTOOLS_VAR variable"
31808
31809    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31810      VCVARSFILE="vc/bin/vcvars32.bat"
31811    else
31812      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31813    fi
31814
31815
31816  windows_path="$VS_BASE"
31817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31818    unix_path=`$CYGPATH -u "$windows_path"`
31819    VS_BASE="$unix_path"
31820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31822    VS_BASE="$unix_path"
31823  fi
31824
31825    if test -d "$VS_BASE"; then
31826      if test -f "$VS_BASE/$VCVARSFILE"; then
31827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31828$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31829        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31830        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31831        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31832        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31833      else
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31835$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31837$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31838      fi
31839    fi
31840  fi
31841
31842  fi
31843  if test "x$PROGRAMFILES" != x; then
31844
31845  if test "x$VS_ENV_CMD" = x; then
31846    VS_VERSION="${VS_VERSION}"
31847    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31848    METHOD="well-known name"
31849
31850    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31851      VCVARSFILE="vc/bin/vcvars32.bat"
31852    else
31853      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31854    fi
31855
31856
31857  windows_path="$VS_BASE"
31858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31859    unix_path=`$CYGPATH -u "$windows_path"`
31860    VS_BASE="$unix_path"
31861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31863    VS_BASE="$unix_path"
31864  fi
31865
31866    if test -d "$VS_BASE"; then
31867      if test -f "$VS_BASE/$VCVARSFILE"; then
31868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31869$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31870        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31871        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31872        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31873        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31874      else
31875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31876$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31878$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31879      fi
31880    fi
31881  fi
31882
31883  fi
31884  # Work around the insanely named ProgramFiles(x86) env variable
31885  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31886  if test "x$PROGRAMFILES_X86" != x; then
31887
31888  if test "x$VS_ENV_CMD" = x; then
31889    VS_VERSION="${VS_VERSION}"
31890    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31891    METHOD="well-known name"
31892
31893    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31894      VCVARSFILE="vc/bin/vcvars32.bat"
31895    else
31896      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31897    fi
31898
31899
31900  windows_path="$VS_BASE"
31901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31902    unix_path=`$CYGPATH -u "$windows_path"`
31903    VS_BASE="$unix_path"
31904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31906    VS_BASE="$unix_path"
31907  fi
31908
31909    if test -d "$VS_BASE"; then
31910      if test -f "$VS_BASE/$VCVARSFILE"; then
31911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31912$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31913        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31914        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31915        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31916        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31917      else
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31919$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31921$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31922      fi
31923    fi
31924  fi
31925
31926  fi
31927
31928  if test "x$VS_ENV_CMD" = x; then
31929    VS_VERSION="${VS_VERSION}"
31930    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31931    METHOD="well-known name"
31932
31933    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31934      VCVARSFILE="vc/bin/vcvars32.bat"
31935    else
31936      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31937    fi
31938
31939
31940  windows_path="$VS_BASE"
31941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31942    unix_path=`$CYGPATH -u "$windows_path"`
31943    VS_BASE="$unix_path"
31944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31946    VS_BASE="$unix_path"
31947  fi
31948
31949    if test -d "$VS_BASE"; then
31950      if test -f "$VS_BASE/$VCVARSFILE"; then
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31952$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31953        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31954        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31955        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31956        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31957      else
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31961$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31962      fi
31963    fi
31964  fi
31965
31966
31967  if test "x$VS_ENV_CMD" = x; then
31968    VS_VERSION="${VS_VERSION}"
31969    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31970    METHOD="well-known name"
31971
31972    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31973      VCVARSFILE="vc/bin/vcvars32.bat"
31974    else
31975      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31976    fi
31977
31978
31979  windows_path="$VS_BASE"
31980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31981    unix_path=`$CYGPATH -u "$windows_path"`
31982    VS_BASE="$unix_path"
31983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31985    VS_BASE="$unix_path"
31986  fi
31987
31988    if test -d "$VS_BASE"; then
31989      if test -f "$VS_BASE/$VCVARSFILE"; then
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31991$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31992        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31993        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31994        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31995        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31996      else
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32000$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32001      fi
32002    fi
32003  fi
32004
32005
32006  if test "x$SDK_INSTALL_DIR" != x; then
32007    if test "x$ProgramW6432" != x; then
32008
32009  if test "x$VS_ENV_CMD" = x; then
32010    VS_VERSION="${VS_VERSION}"
32011    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32012    METHOD="well-known name"
32013
32014  windows_path="$WIN_SDK_BASE"
32015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016    unix_path=`$CYGPATH -u "$windows_path"`
32017    WIN_SDK_BASE="$unix_path"
32018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32020    WIN_SDK_BASE="$unix_path"
32021  fi
32022
32023    if test -d "$WIN_SDK_BASE"; then
32024      # There have been cases of partial or broken SDK installations. A missing
32025      # lib dir is not going to work.
32026      if test ! -d "$WIN_SDK_BASE/lib"; then
32027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32030$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32031      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32034        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32035        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32036          VS_ENV_ARGS="/x86"
32037        else
32038          VS_ENV_ARGS="/x64"
32039        fi
32040        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32041        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32042        # TODO: improve detection for other versions of SDK
32043        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32044      else
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32048$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32049      fi
32050    fi
32051  fi
32052
32053    fi
32054    if test "x$PROGRAMW6432" != x; then
32055
32056  if test "x$VS_ENV_CMD" = x; then
32057    VS_VERSION="${VS_VERSION}"
32058    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32059    METHOD="well-known name"
32060
32061  windows_path="$WIN_SDK_BASE"
32062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32063    unix_path=`$CYGPATH -u "$windows_path"`
32064    WIN_SDK_BASE="$unix_path"
32065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32067    WIN_SDK_BASE="$unix_path"
32068  fi
32069
32070    if test -d "$WIN_SDK_BASE"; then
32071      # There have been cases of partial or broken SDK installations. A missing
32072      # lib dir is not going to work.
32073      if test ! -d "$WIN_SDK_BASE/lib"; then
32074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32075$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32077$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32078      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32081        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32082        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32083          VS_ENV_ARGS="/x86"
32084        else
32085          VS_ENV_ARGS="/x64"
32086        fi
32087        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32088        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32089        # TODO: improve detection for other versions of SDK
32090        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32091      else
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32095$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32096      fi
32097    fi
32098  fi
32099
32100    fi
32101    if test "x$PROGRAMFILES" != x; then
32102
32103  if test "x$VS_ENV_CMD" = x; then
32104    VS_VERSION="${VS_VERSION}"
32105    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32106    METHOD="well-known name"
32107
32108  windows_path="$WIN_SDK_BASE"
32109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32110    unix_path=`$CYGPATH -u "$windows_path"`
32111    WIN_SDK_BASE="$unix_path"
32112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32114    WIN_SDK_BASE="$unix_path"
32115  fi
32116
32117    if test -d "$WIN_SDK_BASE"; then
32118      # There have been cases of partial or broken SDK installations. A missing
32119      # lib dir is not going to work.
32120      if test ! -d "$WIN_SDK_BASE/lib"; then
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32124$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32125      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32127$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32128        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32129        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32130          VS_ENV_ARGS="/x86"
32131        else
32132          VS_ENV_ARGS="/x64"
32133        fi
32134        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32135        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32136        # TODO: improve detection for other versions of SDK
32137        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32138      else
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32143      fi
32144    fi
32145  fi
32146
32147    fi
32148
32149  if test "x$VS_ENV_CMD" = x; then
32150    VS_VERSION="${VS_VERSION}"
32151    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32152    METHOD="well-known name"
32153
32154  windows_path="$WIN_SDK_BASE"
32155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156    unix_path=`$CYGPATH -u "$windows_path"`
32157    WIN_SDK_BASE="$unix_path"
32158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32160    WIN_SDK_BASE="$unix_path"
32161  fi
32162
32163    if test -d "$WIN_SDK_BASE"; then
32164      # There have been cases of partial or broken SDK installations. A missing
32165      # lib dir is not going to work.
32166      if test ! -d "$WIN_SDK_BASE/lib"; then
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32170$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32171      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32174        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32175        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32176          VS_ENV_ARGS="/x86"
32177        else
32178          VS_ENV_ARGS="/x64"
32179        fi
32180        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32181        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32182        # TODO: improve detection for other versions of SDK
32183        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32184      else
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32188$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32189      fi
32190    fi
32191  fi
32192
32193
32194  if test "x$VS_ENV_CMD" = x; then
32195    VS_VERSION="${VS_VERSION}"
32196    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32197    METHOD="well-known name"
32198
32199  windows_path="$WIN_SDK_BASE"
32200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32201    unix_path=`$CYGPATH -u "$windows_path"`
32202    WIN_SDK_BASE="$unix_path"
32203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32205    WIN_SDK_BASE="$unix_path"
32206  fi
32207
32208    if test -d "$WIN_SDK_BASE"; then
32209      # There have been cases of partial or broken SDK installations. A missing
32210      # lib dir is not going to work.
32211      if test ! -d "$WIN_SDK_BASE/lib"; then
32212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32215$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32216      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32219        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32220        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32221          VS_ENV_ARGS="/x86"
32222        else
32223          VS_ENV_ARGS="/x64"
32224        fi
32225        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32226        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32227        # TODO: improve detection for other versions of SDK
32228        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32229      else
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32233$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32234      fi
32235    fi
32236  fi
32237
32238  fi
32239
32240    if test "x$VS_ENV_CMD" != x; then
32241      TOOLCHAIN_VERSION=$VS_VERSION
32242      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32243      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32244      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32245      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32246      # The rest of the variables are already evaled while probing
32247      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32248$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32249      break
32250    fi
32251  done
32252
32253
32254  # If we have a devkit, skip all of the below.
32255  if test "x$DEVKIT_VS_VERSION" = x; then
32256    if test "x$VS_ENV_CMD" != x; then
32257      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32258
32259  # Only process if variable expands to non-empty
32260
32261  if test "x$VS_ENV_CMD" != x; then
32262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32263
32264  # First separate the path from the arguments. This will split at the first
32265  # space.
32266  complete="$VS_ENV_CMD"
32267  path="${complete%% *}"
32268  tmp="$complete EOL"
32269  arguments="${tmp#* }"
32270
32271  # Input might be given as Windows format, start by converting to
32272  # unix format.
32273  new_path=`$CYGPATH -u "$path"`
32274
32275  # Now try to locate executable using which
32276  new_path=`$WHICH "$new_path" 2> /dev/null`
32277  # bat and cmd files are not always considered executable in cygwin causing which
32278  # to not find them
32279  if test "x$new_path" = x \
32280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32282    new_path=`$CYGPATH -u "$path"`
32283  fi
32284  if test "x$new_path" = x; then
32285    # Oops. Which didn't find the executable.
32286    # The splitting of arguments from the executable at a space might have been incorrect,
32287    # since paths with space are more likely in Windows. Give it another try with the whole
32288    # argument.
32289    path="$complete"
32290    arguments="EOL"
32291    new_path=`$CYGPATH -u "$path"`
32292    new_path=`$WHICH "$new_path" 2> /dev/null`
32293    # bat and cmd files are not always considered executable in cygwin causing which
32294    # to not find them
32295    if test "x$new_path" = x \
32296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32298      new_path=`$CYGPATH -u "$path"`
32299    fi
32300    if test "x$new_path" = x; then
32301      # It's still not found. Now this is an unrecoverable error.
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32303$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32304      has_space=`$ECHO "$complete" | $GREP " "`
32305      if test "x$has_space" != x; then
32306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32308      fi
32309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32310    fi
32311  fi
32312
32313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32316  # "foo.exe" is OK but "foo" is an error.
32317  #
32318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32319  # It is also a way to make sure we got the proper file name for the real test later on.
32320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32321  if test "x$test_shortpath" = x; then
32322    # Short path failed, file does not exist as specified.
32323    # Try adding .exe or .cmd
32324    if test -f "${new_path}.exe"; then
32325      input_to_shortpath="${new_path}.exe"
32326    elif test -f "${new_path}.cmd"; then
32327      input_to_shortpath="${new_path}.cmd"
32328    else
32329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32330$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32333      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32334    fi
32335  else
32336    input_to_shortpath="$new_path"
32337  fi
32338
32339  # Call helper function which possibly converts this using DOS-style short mode.
32340  # If so, the updated path is stored in $new_path.
32341  new_path="$input_to_shortpath"
32342
32343  input_path="$input_to_shortpath"
32344  # Check if we need to convert this using DOS-style short mode. If the path
32345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32346  # take no chances and rewrite it.
32347  # Note: m4 eats our [], so we need to use [ and ] instead.
32348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32349  if test "x$has_forbidden_chars" != x; then
32350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32354      # Going to short mode and back again did indeed matter. Since short mode is
32355      # case insensitive, let's make it lowercase to improve readability.
32356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32357      # Now convert it back to Unix-style (cygpath)
32358      input_path=`$CYGPATH -u "$shortmode_path"`
32359      new_path="$input_path"
32360    fi
32361  fi
32362
32363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32364  if test "x$test_cygdrive_prefix" = x; then
32365    # As a simple fix, exclude /usr/bin since it's not a real path.
32366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32368      # a path prefixed by /cygdrive for fixpath to work.
32369      new_path="$CYGWIN_ROOT_PATH$input_path"
32370    fi
32371  fi
32372
32373  # remove trailing .exe if any
32374  new_path="${new_path/%.exe/}"
32375
32376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32377
32378  # First separate the path from the arguments. This will split at the first
32379  # space.
32380  complete="$VS_ENV_CMD"
32381  path="${complete%% *}"
32382  tmp="$complete EOL"
32383  arguments="${tmp#* }"
32384
32385  # Input might be given as Windows format, start by converting to
32386  # unix format.
32387  new_path="$path"
32388
32389  windows_path="$new_path"
32390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32391    unix_path=`$CYGPATH -u "$windows_path"`
32392    new_path="$unix_path"
32393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32395    new_path="$unix_path"
32396  fi
32397
32398
32399  # Now try to locate executable using which
32400  new_path=`$WHICH "$new_path" 2> /dev/null`
32401
32402  if test "x$new_path" = x; then
32403    # Oops. Which didn't find the executable.
32404    # The splitting of arguments from the executable at a space might have been incorrect,
32405    # since paths with space are more likely in Windows. Give it another try with the whole
32406    # argument.
32407    path="$complete"
32408    arguments="EOL"
32409    new_path="$path"
32410
32411  windows_path="$new_path"
32412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32413    unix_path=`$CYGPATH -u "$windows_path"`
32414    new_path="$unix_path"
32415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32417    new_path="$unix_path"
32418  fi
32419
32420
32421    new_path=`$WHICH "$new_path" 2> /dev/null`
32422    # bat and cmd files are not always considered executable in MSYS causing which
32423    # to not find them
32424    if test "x$new_path" = x \
32425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32427      new_path="$path"
32428
32429  windows_path="$new_path"
32430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32431    unix_path=`$CYGPATH -u "$windows_path"`
32432    new_path="$unix_path"
32433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32435    new_path="$unix_path"
32436  fi
32437
32438    fi
32439
32440    if test "x$new_path" = x; then
32441      # It's still not found. Now this is an unrecoverable error.
32442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32443$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32444      has_space=`$ECHO "$complete" | $GREP " "`
32445      if test "x$has_space" != x; then
32446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32448      fi
32449      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32450    fi
32451  fi
32452
32453  # Now new_path has a complete unix path to the binary
32454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32455    # Keep paths in /bin as-is, but remove trailing .exe if any
32456    new_path="${new_path/%.exe/}"
32457    # Do not save /bin paths to all_fixpath_prefixes!
32458  else
32459    # Not in mixed or Windows style, start by that.
32460    new_path=`cmd //c echo $new_path`
32461
32462  input_path="$new_path"
32463  # Check if we need to convert this using DOS-style short mode. If the path
32464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32465  # take no chances and rewrite it.
32466  # Note: m4 eats our [], so we need to use [ and ] instead.
32467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32468  if test "x$has_forbidden_chars" != x; then
32469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32471  fi
32472
32473    # Output is in $new_path
32474
32475  windows_path="$new_path"
32476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32477    unix_path=`$CYGPATH -u "$windows_path"`
32478    new_path="$unix_path"
32479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32481    new_path="$unix_path"
32482  fi
32483
32484    # remove trailing .exe if any
32485    new_path="${new_path/%.exe/}"
32486
32487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32489  fi
32490
32491    else
32492      # We're on a unix platform. Hooray! :)
32493      # First separate the path from the arguments. This will split at the first
32494      # space.
32495      complete="$VS_ENV_CMD"
32496      path="${complete%% *}"
32497      tmp="$complete EOL"
32498      arguments="${tmp#* }"
32499
32500      # Cannot rely on the command "which" here since it doesn't always work.
32501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32502      if test -z "$is_absolute_path"; then
32503        # Path to executable is not absolute. Find it.
32504        IFS_save="$IFS"
32505        IFS=:
32506        for p in $PATH; do
32507          if test -f "$p/$path" && test -x "$p/$path"; then
32508            new_path="$p/$path"
32509            break
32510          fi
32511        done
32512        IFS="$IFS_save"
32513      else
32514        # This is an absolute path, we can use it without further modifications.
32515        new_path="$path"
32516      fi
32517
32518      if test "x$new_path" = x; then
32519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32520$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32521        has_space=`$ECHO "$complete" | $GREP " "`
32522        if test "x$has_space" != x; then
32523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32525        fi
32526        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32527      fi
32528    fi
32529
32530    # Now join together the path and the arguments once again
32531    if test "x$arguments" != xEOL; then
32532      new_complete="$new_path ${arguments% *}"
32533    else
32534      new_complete="$new_path"
32535    fi
32536
32537    if test "x$complete" != "x$new_complete"; then
32538      VS_ENV_CMD="$new_complete"
32539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32540$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32541    fi
32542  fi
32543
32544
32545      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32546      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32547$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32548
32549      # We need to create a couple of temporary files.
32550      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32551      $MKDIR -p $VS_ENV_TMP_DIR
32552
32553      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32554      # Instead create a shell script which will set the relevant variables when run.
32555      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32556
32557  unix_path="$WINPATH_VS_ENV_CMD"
32558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32559    windows_path=`$CYGPATH -m "$unix_path"`
32560    WINPATH_VS_ENV_CMD="$windows_path"
32561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32562    windows_path=`cmd //c echo $unix_path`
32563    WINPATH_VS_ENV_CMD="$windows_path"
32564  fi
32565
32566      WINPATH_BASH="$BASH"
32567
32568  unix_path="$WINPATH_BASH"
32569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32570    windows_path=`$CYGPATH -m "$unix_path"`
32571    WINPATH_BASH="$windows_path"
32572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32573    windows_path=`cmd //c echo $unix_path`
32574    WINPATH_BASH="$windows_path"
32575  fi
32576
32577
32578      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32579      # script (executable by bash) that will setup the important variables.
32580      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32581      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32582      # This will end up something like:
32583      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32584      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32585      # These will end up something like:
32586      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32587      # The trailing space for everyone except PATH is no typo, but is needed due
32588      # to trailing \ in the Windows paths. These will be stripped later.
32589      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32590          >> $EXTRACT_VC_ENV_BAT_FILE
32591      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32592          >> $EXTRACT_VC_ENV_BAT_FILE
32593      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32594          >> $EXTRACT_VC_ENV_BAT_FILE
32595      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32596          >> $EXTRACT_VC_ENV_BAT_FILE
32597      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32598          >> $EXTRACT_VC_ENV_BAT_FILE
32599      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32600          >> $EXTRACT_VC_ENV_BAT_FILE
32601
32602      # Now execute the newly created bat file.
32603      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32604      # Change directory so we don't need to mess with Windows paths in redirects.
32605      cd $VS_ENV_TMP_DIR
32606      cmd /c extract-vs-env.bat | $CAT
32607      cd $CURDIR
32608
32609      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32611$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32612        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32613$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32614        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32615$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32616        as_fn_error $? "Cannot continue" "$LINENO" 5
32617      fi
32618
32619      # Now set all paths and other env variables. This will allow the rest of
32620      # the configure script to find and run the compiler in the proper way.
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32622$as_echo "$as_me: Setting extracted environment variables" >&6;}
32623      . $VS_ENV_TMP_DIR/set-vs-env.sh
32624      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32625      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32626    else
32627      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32628      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32629$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32630    fi
32631  fi
32632
32633  # At this point, we should have correct variables in the environment, or we can't continue.
32634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32635$as_echo_n "checking for Visual Studio variables... " >&6; }
32636
32637  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32638      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32639    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32641$as_echo "present but broken" >&6; }
32642      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32643    else
32644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32645$as_echo "ok" >&6; }
32646      # Remove any trailing "\" ";" and " " from the variables.
32647      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32648      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32649      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32650      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32651      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32652      # Remove any paths containing # (typically F#) as that messes up make. This
32653      # is needed if visual studio was installed with F# support.
32654      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32655
32656
32657
32658
32659
32660      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32661      OLDIFS="$IFS"
32662      IFS=";"
32663      for i in $VS_INCLUDE; do
32664        ipath=$i
32665        # Only process non-empty elements
32666        if test "x$ipath" != x; then
32667          IFS="$OLDIFS"
32668          # Check that directory exists before calling fixup_path
32669          testpath=$ipath
32670
32671  windows_path="$testpath"
32672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32673    unix_path=`$CYGPATH -u "$windows_path"`
32674    testpath="$unix_path"
32675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32677    testpath="$unix_path"
32678  fi
32679
32680          if test -d "$testpath"; then
32681
32682  # Only process if variable expands to non-empty
32683
32684  if test "x$ipath" != x; then
32685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32686
32687  # Input might be given as Windows format, start by converting to
32688  # unix format.
32689  path="$ipath"
32690  new_path=`$CYGPATH -u "$path"`
32691
32692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32695  # "foo.exe" is OK but "foo" is an error.
32696  #
32697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32698  # It is also a way to make sure we got the proper file name for the real test later on.
32699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32700  if test "x$test_shortpath" = x; then
32701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32702$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32703    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32704  fi
32705
32706  # Call helper function which possibly converts this using DOS-style short mode.
32707  # If so, the updated path is stored in $new_path.
32708
32709  input_path="$new_path"
32710  # Check if we need to convert this using DOS-style short mode. If the path
32711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32712  # take no chances and rewrite it.
32713  # Note: m4 eats our [], so we need to use [ and ] instead.
32714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32715  if test "x$has_forbidden_chars" != x; then
32716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32720      # Going to short mode and back again did indeed matter. Since short mode is
32721      # case insensitive, let's make it lowercase to improve readability.
32722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32723      # Now convert it back to Unix-style (cygpath)
32724      input_path=`$CYGPATH -u "$shortmode_path"`
32725      new_path="$input_path"
32726    fi
32727  fi
32728
32729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32730  if test "x$test_cygdrive_prefix" = x; then
32731    # As a simple fix, exclude /usr/bin since it's not a real path.
32732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32734      # a path prefixed by /cygdrive for fixpath to work.
32735      new_path="$CYGWIN_ROOT_PATH$input_path"
32736    fi
32737  fi
32738
32739
32740  if test "x$path" != "x$new_path"; then
32741    ipath="$new_path"
32742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32743$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32744  fi
32745
32746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32747
32748  path="$ipath"
32749  has_colon=`$ECHO $path | $GREP ^.:`
32750  new_path="$path"
32751  if test "x$has_colon" = x; then
32752    # Not in mixed or Windows style, start by that.
32753    new_path=`cmd //c echo $path`
32754  fi
32755
32756
32757  input_path="$new_path"
32758  # Check if we need to convert this using DOS-style short mode. If the path
32759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32760  # take no chances and rewrite it.
32761  # Note: m4 eats our [], so we need to use [ and ] instead.
32762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32763  if test "x$has_forbidden_chars" != x; then
32764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32766  fi
32767
32768
32769  windows_path="$new_path"
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771    unix_path=`$CYGPATH -u "$windows_path"`
32772    new_path="$unix_path"
32773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32775    new_path="$unix_path"
32776  fi
32777
32778  if test "x$path" != "x$new_path"; then
32779    ipath="$new_path"
32780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32781$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32782  fi
32783
32784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32786
32787    else
32788      # We're on a unix platform. Hooray! :)
32789      path="$ipath"
32790      has_space=`$ECHO "$path" | $GREP " "`
32791      if test "x$has_space" != x; then
32792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32793$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32795      fi
32796
32797      # Use eval to expand a potential ~
32798      eval path="$path"
32799      if test ! -f "$path" && test ! -d "$path"; then
32800        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32801      fi
32802
32803      if test -d "$path"; then
32804        ipath="`cd "$path"; $THEPWDCMD -L`"
32805      else
32806        dir="`$DIRNAME "$path"`"
32807        base="`$BASENAME "$path"`"
32808        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32809      fi
32810    fi
32811  fi
32812
32813            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32814          fi
32815          IFS=";"
32816        fi
32817      done
32818      # Convert VS_LIB into SYSROOT_LDFLAGS
32819      for i in $VS_LIB; do
32820        libpath=$i
32821        # Only process non-empty elements
32822        if test "x$libpath" != x; then
32823          IFS="$OLDIFS"
32824          # Check that directory exists before calling fixup_path
32825          testpath=$libpath
32826
32827  windows_path="$testpath"
32828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32829    unix_path=`$CYGPATH -u "$windows_path"`
32830    testpath="$unix_path"
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32833    testpath="$unix_path"
32834  fi
32835
32836          if test -d "$testpath"; then
32837
32838  # Only process if variable expands to non-empty
32839
32840  if test "x$libpath" != x; then
32841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32842
32843  # Input might be given as Windows format, start by converting to
32844  # unix format.
32845  path="$libpath"
32846  new_path=`$CYGPATH -u "$path"`
32847
32848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32851  # "foo.exe" is OK but "foo" is an error.
32852  #
32853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32854  # It is also a way to make sure we got the proper file name for the real test later on.
32855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32856  if test "x$test_shortpath" = x; then
32857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32858$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32859    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32860  fi
32861
32862  # Call helper function which possibly converts this using DOS-style short mode.
32863  # If so, the updated path is stored in $new_path.
32864
32865  input_path="$new_path"
32866  # Check if we need to convert this using DOS-style short mode. If the path
32867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32868  # take no chances and rewrite it.
32869  # Note: m4 eats our [], so we need to use [ and ] instead.
32870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32871  if test "x$has_forbidden_chars" != x; then
32872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32876      # Going to short mode and back again did indeed matter. Since short mode is
32877      # case insensitive, let's make it lowercase to improve readability.
32878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32879      # Now convert it back to Unix-style (cygpath)
32880      input_path=`$CYGPATH -u "$shortmode_path"`
32881      new_path="$input_path"
32882    fi
32883  fi
32884
32885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32886  if test "x$test_cygdrive_prefix" = x; then
32887    # As a simple fix, exclude /usr/bin since it's not a real path.
32888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32890      # a path prefixed by /cygdrive for fixpath to work.
32891      new_path="$CYGWIN_ROOT_PATH$input_path"
32892    fi
32893  fi
32894
32895
32896  if test "x$path" != "x$new_path"; then
32897    libpath="$new_path"
32898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32899$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32900  fi
32901
32902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903
32904  path="$libpath"
32905  has_colon=`$ECHO $path | $GREP ^.:`
32906  new_path="$path"
32907  if test "x$has_colon" = x; then
32908    # Not in mixed or Windows style, start by that.
32909    new_path=`cmd //c echo $path`
32910  fi
32911
32912
32913  input_path="$new_path"
32914  # Check if we need to convert this using DOS-style short mode. If the path
32915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32916  # take no chances and rewrite it.
32917  # Note: m4 eats our [], so we need to use [ and ] instead.
32918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32919  if test "x$has_forbidden_chars" != x; then
32920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32922  fi
32923
32924
32925  windows_path="$new_path"
32926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32927    unix_path=`$CYGPATH -u "$windows_path"`
32928    new_path="$unix_path"
32929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32931    new_path="$unix_path"
32932  fi
32933
32934  if test "x$path" != "x$new_path"; then
32935    libpath="$new_path"
32936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32937$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32938  fi
32939
32940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32942
32943    else
32944      # We're on a unix platform. Hooray! :)
32945      path="$libpath"
32946      has_space=`$ECHO "$path" | $GREP " "`
32947      if test "x$has_space" != x; then
32948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32949$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32951      fi
32952
32953      # Use eval to expand a potential ~
32954      eval path="$path"
32955      if test ! -f "$path" && test ! -d "$path"; then
32956        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32957      fi
32958
32959      if test -d "$path"; then
32960        libpath="`cd "$path"; $THEPWDCMD -L`"
32961      else
32962        dir="`$DIRNAME "$path"`"
32963        base="`$BASENAME "$path"`"
32964        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32965      fi
32966    fi
32967  fi
32968
32969            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32970          fi
32971          IFS=";"
32972        fi
32973      done
32974      IFS="$OLDIFS"
32975    fi
32976  else
32977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32978$as_echo "not found" >&6; }
32979
32980    if test "x$VS_ENV_CMD" = x; then
32981      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32982$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32983      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32984$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32985    else
32986      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32987$as_echo "$as_me: Running the extraction script failed." >&6;}
32988    fi
32989    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32990$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32991    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32992$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32993    as_fn_error $? "Cannot continue" "$LINENO" 5
32994  fi
32995
32996    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32997    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32998    PATH="$VS_PATH"
32999    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33000    export INCLUDE="$VS_INCLUDE"
33001    export LIB="$VS_LIB"
33002  else
33003    if test "x$XCODE_VERSION_OUTPUT" != x; then
33004      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33005      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33006      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33007    else
33008      # Currently we do not define this for other toolchains. This might change as the need arise.
33009      TOOLCHAIN_VERSION=
33010    fi
33011  fi
33012
33013
33014  # For solaris we really need solaris tools, and not the GNU equivalent.
33015  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
33016  # so add that to path before starting to probe.
33017  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
33018  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
33019    PATH="/usr/ccs/bin:$PATH"
33020  fi
33021
33022  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33023  # override all other locations.
33024  if test "x$TOOLCHAIN_PATH" != x; then
33025    PATH=$TOOLCHAIN_PATH:$PATH
33026  fi
33027
33028
33029  #
33030  # Setup the compilers (CC and CXX)
33031  #
33032
33033  COMPILER_NAME=C
33034  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33035
33036  if test "x$CC" != x; then
33037    # User has supplied compiler name already, always let that override.
33038    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33039$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33040    if test "x`basename $CC`" = "x$CC"; then
33041      # A command without a complete path is provided, search $PATH.
33042
33043      for ac_prog in $CC
33044do
33045  # Extract the first word of "$ac_prog", so it can be a program name with args.
33046set dummy $ac_prog; ac_word=$2
33047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33048$as_echo_n "checking for $ac_word... " >&6; }
33049if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33050  $as_echo_n "(cached) " >&6
33051else
33052  case $POTENTIAL_CC in
33053  [\\/]* | ?:[\\/]*)
33054  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33055  ;;
33056  *)
33057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33058for as_dir in $PATH
33059do
33060  IFS=$as_save_IFS
33061  test -z "$as_dir" && as_dir=.
33062    for ac_exec_ext in '' $ac_executable_extensions; do
33063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33064    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33066    break 2
33067  fi
33068done
33069  done
33070IFS=$as_save_IFS
33071
33072  ;;
33073esac
33074fi
33075POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33076if test -n "$POTENTIAL_CC"; then
33077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33078$as_echo "$POTENTIAL_CC" >&6; }
33079else
33080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33081$as_echo "no" >&6; }
33082fi
33083
33084
33085  test -n "$POTENTIAL_CC" && break
33086done
33087
33088      if test "x$POTENTIAL_CC" != x; then
33089        CC=$POTENTIAL_CC
33090      else
33091        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33092      fi
33093    else
33094      # Otherwise it might already be a complete path
33095      if test ! -x "$CC"; then
33096        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33097      fi
33098    fi
33099  else
33100    # No user supplied value. Locate compiler ourselves.
33101
33102    # If we are cross compiling, assume cross compilation tools follows the
33103    # cross compilation standard where they are prefixed with the autoconf
33104    # standard name for the target. For example the binary
33105    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33106    # If we are not cross compiling, then the default compiler name will be
33107    # used.
33108
33109    CC=
33110    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33111    # before checking the rest of the PATH.
33112    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33113    # step, this should not be necessary.
33114    if test -n "$TOOLCHAIN_PATH"; then
33115      PATH_save="$PATH"
33116      PATH="$TOOLCHAIN_PATH"
33117      for ac_prog in $SEARCH_LIST
33118do
33119  # Extract the first word of "$ac_prog", so it can be a program name with args.
33120set dummy $ac_prog; ac_word=$2
33121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33122$as_echo_n "checking for $ac_word... " >&6; }
33123if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33124  $as_echo_n "(cached) " >&6
33125else
33126  case $TOOLCHAIN_PATH_CC in
33127  [\\/]* | ?:[\\/]*)
33128  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33129  ;;
33130  *)
33131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33132for as_dir in $PATH
33133do
33134  IFS=$as_save_IFS
33135  test -z "$as_dir" && as_dir=.
33136    for ac_exec_ext in '' $ac_executable_extensions; do
33137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33138    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33140    break 2
33141  fi
33142done
33143  done
33144IFS=$as_save_IFS
33145
33146  ;;
33147esac
33148fi
33149TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33150if test -n "$TOOLCHAIN_PATH_CC"; then
33151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33152$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33153else
33154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33155$as_echo "no" >&6; }
33156fi
33157
33158
33159  test -n "$TOOLCHAIN_PATH_CC" && break
33160done
33161
33162      CC=$TOOLCHAIN_PATH_CC
33163      PATH="$PATH_save"
33164    fi
33165
33166    # AC_PATH_PROGS can't be run multiple times with the same variable,
33167    # so create a new name for this run.
33168    if test "x$CC" = x; then
33169      for ac_prog in $SEARCH_LIST
33170do
33171  # Extract the first word of "$ac_prog", so it can be a program name with args.
33172set dummy $ac_prog; ac_word=$2
33173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174$as_echo_n "checking for $ac_word... " >&6; }
33175if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  case $POTENTIAL_CC in
33179  [\\/]* | ?:[\\/]*)
33180  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33181  ;;
33182  *)
33183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33184for as_dir in $PATH
33185do
33186  IFS=$as_save_IFS
33187  test -z "$as_dir" && as_dir=.
33188    for ac_exec_ext in '' $ac_executable_extensions; do
33189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33190    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33192    break 2
33193  fi
33194done
33195  done
33196IFS=$as_save_IFS
33197
33198  ;;
33199esac
33200fi
33201POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33202if test -n "$POTENTIAL_CC"; then
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33204$as_echo "$POTENTIAL_CC" >&6; }
33205else
33206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33207$as_echo "no" >&6; }
33208fi
33209
33210
33211  test -n "$POTENTIAL_CC" && break
33212done
33213
33214      CC=$POTENTIAL_CC
33215    fi
33216
33217    if test "x$CC" = x; then
33218
33219  # Print a helpful message on how to acquire the necessary build dependency.
33220  # devkit is the help tag: freetype, cups, alsa etc
33221  MISSING_DEPENDENCY=devkit
33222
33223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33224    cygwin_help $MISSING_DEPENDENCY
33225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33226    msys_help $MISSING_DEPENDENCY
33227  else
33228    PKGHANDLER_COMMAND=
33229
33230    case $PKGHANDLER in
33231      apt-get)
33232        apt_help     $MISSING_DEPENDENCY ;;
33233      yum)
33234        yum_help     $MISSING_DEPENDENCY ;;
33235      port)
33236        port_help    $MISSING_DEPENDENCY ;;
33237      pkgutil)
33238        pkgutil_help $MISSING_DEPENDENCY ;;
33239      pkgadd)
33240        pkgadd_help  $MISSING_DEPENDENCY ;;
33241    esac
33242
33243    if test "x$PKGHANDLER_COMMAND" != x; then
33244      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33245    fi
33246  fi
33247
33248      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33249    fi
33250  fi
33251
33252  # Now we have a compiler binary in CC. Make sure it's okay.
33253
33254  # Only process if variable expands to non-empty
33255
33256  if test "x$CC" != x; then
33257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33258
33259  # First separate the path from the arguments. This will split at the first
33260  # space.
33261  complete="$CC"
33262  path="${complete%% *}"
33263  tmp="$complete EOL"
33264  arguments="${tmp#* }"
33265
33266  # Input might be given as Windows format, start by converting to
33267  # unix format.
33268  new_path=`$CYGPATH -u "$path"`
33269
33270  # Now try to locate executable using which
33271  new_path=`$WHICH "$new_path" 2> /dev/null`
33272  # bat and cmd files are not always considered executable in cygwin causing which
33273  # to not find them
33274  if test "x$new_path" = x \
33275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33277    new_path=`$CYGPATH -u "$path"`
33278  fi
33279  if test "x$new_path" = x; then
33280    # Oops. Which didn't find the executable.
33281    # The splitting of arguments from the executable at a space might have been incorrect,
33282    # since paths with space are more likely in Windows. Give it another try with the whole
33283    # argument.
33284    path="$complete"
33285    arguments="EOL"
33286    new_path=`$CYGPATH -u "$path"`
33287    new_path=`$WHICH "$new_path" 2> /dev/null`
33288    # bat and cmd files are not always considered executable in cygwin causing which
33289    # to not find them
33290    if test "x$new_path" = x \
33291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33293      new_path=`$CYGPATH -u "$path"`
33294    fi
33295    if test "x$new_path" = x; then
33296      # It's still not found. Now this is an unrecoverable error.
33297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33298$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33299      has_space=`$ECHO "$complete" | $GREP " "`
33300      if test "x$has_space" != x; then
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33303      fi
33304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33305    fi
33306  fi
33307
33308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33311  # "foo.exe" is OK but "foo" is an error.
33312  #
33313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33314  # It is also a way to make sure we got the proper file name for the real test later on.
33315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33316  if test "x$test_shortpath" = x; then
33317    # Short path failed, file does not exist as specified.
33318    # Try adding .exe or .cmd
33319    if test -f "${new_path}.exe"; then
33320      input_to_shortpath="${new_path}.exe"
33321    elif test -f "${new_path}.cmd"; then
33322      input_to_shortpath="${new_path}.cmd"
33323    else
33324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33325$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33328      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33329    fi
33330  else
33331    input_to_shortpath="$new_path"
33332  fi
33333
33334  # Call helper function which possibly converts this using DOS-style short mode.
33335  # If so, the updated path is stored in $new_path.
33336  new_path="$input_to_shortpath"
33337
33338  input_path="$input_to_shortpath"
33339  # Check if we need to convert this using DOS-style short mode. If the path
33340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33341  # take no chances and rewrite it.
33342  # Note: m4 eats our [], so we need to use [ and ] instead.
33343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33344  if test "x$has_forbidden_chars" != x; then
33345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33349      # Going to short mode and back again did indeed matter. Since short mode is
33350      # case insensitive, let's make it lowercase to improve readability.
33351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33352      # Now convert it back to Unix-style (cygpath)
33353      input_path=`$CYGPATH -u "$shortmode_path"`
33354      new_path="$input_path"
33355    fi
33356  fi
33357
33358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33359  if test "x$test_cygdrive_prefix" = x; then
33360    # As a simple fix, exclude /usr/bin since it's not a real path.
33361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33363      # a path prefixed by /cygdrive for fixpath to work.
33364      new_path="$CYGWIN_ROOT_PATH$input_path"
33365    fi
33366  fi
33367
33368  # remove trailing .exe if any
33369  new_path="${new_path/%.exe/}"
33370
33371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33372
33373  # First separate the path from the arguments. This will split at the first
33374  # space.
33375  complete="$CC"
33376  path="${complete%% *}"
33377  tmp="$complete EOL"
33378  arguments="${tmp#* }"
33379
33380  # Input might be given as Windows format, start by converting to
33381  # unix format.
33382  new_path="$path"
33383
33384  windows_path="$new_path"
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    unix_path=`$CYGPATH -u "$windows_path"`
33387    new_path="$unix_path"
33388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390    new_path="$unix_path"
33391  fi
33392
33393
33394  # Now try to locate executable using which
33395  new_path=`$WHICH "$new_path" 2> /dev/null`
33396
33397  if test "x$new_path" = x; then
33398    # Oops. Which didn't find the executable.
33399    # The splitting of arguments from the executable at a space might have been incorrect,
33400    # since paths with space are more likely in Windows. Give it another try with the whole
33401    # argument.
33402    path="$complete"
33403    arguments="EOL"
33404    new_path="$path"
33405
33406  windows_path="$new_path"
33407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33408    unix_path=`$CYGPATH -u "$windows_path"`
33409    new_path="$unix_path"
33410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33412    new_path="$unix_path"
33413  fi
33414
33415
33416    new_path=`$WHICH "$new_path" 2> /dev/null`
33417    # bat and cmd files are not always considered executable in MSYS causing which
33418    # to not find them
33419    if test "x$new_path" = x \
33420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33422      new_path="$path"
33423
33424  windows_path="$new_path"
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426    unix_path=`$CYGPATH -u "$windows_path"`
33427    new_path="$unix_path"
33428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33430    new_path="$unix_path"
33431  fi
33432
33433    fi
33434
33435    if test "x$new_path" = x; then
33436      # It's still not found. Now this is an unrecoverable error.
33437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33438$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33439      has_space=`$ECHO "$complete" | $GREP " "`
33440      if test "x$has_space" != x; then
33441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33443      fi
33444      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33445    fi
33446  fi
33447
33448  # Now new_path has a complete unix path to the binary
33449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33450    # Keep paths in /bin as-is, but remove trailing .exe if any
33451    new_path="${new_path/%.exe/}"
33452    # Do not save /bin paths to all_fixpath_prefixes!
33453  else
33454    # Not in mixed or Windows style, start by that.
33455    new_path=`cmd //c echo $new_path`
33456
33457  input_path="$new_path"
33458  # Check if we need to convert this using DOS-style short mode. If the path
33459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33460  # take no chances and rewrite it.
33461  # Note: m4 eats our [], so we need to use [ and ] instead.
33462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33463  if test "x$has_forbidden_chars" != x; then
33464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33466  fi
33467
33468    # Output is in $new_path
33469
33470  windows_path="$new_path"
33471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33472    unix_path=`$CYGPATH -u "$windows_path"`
33473    new_path="$unix_path"
33474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33476    new_path="$unix_path"
33477  fi
33478
33479    # remove trailing .exe if any
33480    new_path="${new_path/%.exe/}"
33481
33482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33484  fi
33485
33486    else
33487      # We're on a unix platform. Hooray! :)
33488      # First separate the path from the arguments. This will split at the first
33489      # space.
33490      complete="$CC"
33491      path="${complete%% *}"
33492      tmp="$complete EOL"
33493      arguments="${tmp#* }"
33494
33495      # Cannot rely on the command "which" here since it doesn't always work.
33496      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33497      if test -z "$is_absolute_path"; then
33498        # Path to executable is not absolute. Find it.
33499        IFS_save="$IFS"
33500        IFS=:
33501        for p in $PATH; do
33502          if test -f "$p/$path" && test -x "$p/$path"; then
33503            new_path="$p/$path"
33504            break
33505          fi
33506        done
33507        IFS="$IFS_save"
33508      else
33509        # This is an absolute path, we can use it without further modifications.
33510        new_path="$path"
33511      fi
33512
33513      if test "x$new_path" = x; then
33514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33515$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33516        has_space=`$ECHO "$complete" | $GREP " "`
33517        if test "x$has_space" != x; then
33518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33520        fi
33521        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33522      fi
33523    fi
33524
33525    # Now join together the path and the arguments once again
33526    if test "x$arguments" != xEOL; then
33527      new_complete="$new_path ${arguments% *}"
33528    else
33529      new_complete="$new_path"
33530    fi
33531
33532    if test "x$complete" != "x$new_complete"; then
33533      CC="$new_complete"
33534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33535$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33536    fi
33537  fi
33538
33539  TEST_COMPILER="$CC"
33540
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33542$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33543  SYMLINK_ORIGINAL="$TEST_COMPILER"
33544
33545  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33546    # Follow a chain of symbolic links. Use readlink
33547    # where it exists, else fall back to horribly
33548    # complicated shell code.
33549    if test "x$READLINK_TESTED" != yes; then
33550      # On MacOSX there is a readlink tool with a different
33551      # purpose than the GNU readlink tool. Check the found readlink.
33552      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33553      if test "x$ISGNU" = x; then
33554        # A readlink that we do not know how to use.
33555        # Are there other non-GNU readlinks out there?
33556        READLINK_TESTED=yes
33557        READLINK=
33558      fi
33559    fi
33560
33561    if test "x$READLINK" != x; then
33562      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33563    else
33564      # Save the current directory for restoring afterwards
33565      STARTDIR=$PWD
33566      COUNTER=0
33567      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33568      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33569      cd $sym_link_dir
33570      # Use -P flag to resolve symlinks in directories.
33571      cd `$THEPWDCMD -P`
33572      sym_link_dir=`$THEPWDCMD -P`
33573      # Resolve file symlinks
33574      while test $COUNTER -lt 20; do
33575        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33576        if test "x$ISLINK" == x; then
33577          # This is not a symbolic link! We are done!
33578          break
33579        fi
33580        # Again resolve directory symlinks since the target of the just found
33581        # link could be in a different directory
33582        cd `$DIRNAME $ISLINK`
33583        sym_link_dir=`$THEPWDCMD -P`
33584        sym_link_file=`$BASENAME $ISLINK`
33585        let COUNTER=COUNTER+1
33586      done
33587      cd $STARTDIR
33588      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33589    fi
33590  fi
33591
33592  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33594$as_echo "no symlink" >&6; }
33595  else
33596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33597$as_echo "$SYMLINK_ORIGINAL" >&6; }
33598
33599    # We can't handle ccache by gcc wrappers, since we need to know if we're
33600    # using ccache. Instead ccache usage must be controlled by a configure option.
33601    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33602    if test "x$COMPILER_BASENAME" = "xccache"; then
33603      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33604$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33605      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33606    fi
33607  fi
33608
33609
33610  COMPILER=$CC
33611  COMPILER_NAME=$COMPILER_NAME
33612
33613  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33614    # cc -V output typically looks like
33615    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33616    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33617    # Check that this is likely to be the Solaris Studio cc.
33618    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33619    if test $? -ne 0; then
33620      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33621      { $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
33622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33626$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628    fi
33629    # Remove usage instructions (if present), and
33630    # collapse compiler output into a single line
33631    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632        $SED -e 's/ *[Uu]sage:.*//'`
33633    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33634        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33635  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33636    # xlc -qversion output typically looks like
33637    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33638    #     Version: 11.01.0000.0015
33639    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33640    # Check that this is likely to be the IBM XL C compiler.
33641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33642    if test $? -ne 0; then
33643      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644      { $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
33645$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33646      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33647$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33649$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33650      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651    fi
33652    # Collapse compiler output into a single line
33653    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33654    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33656  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33657    # There is no specific version flag, but all output starts with a version string.
33658    # First line typically looks something like:
33659    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33660    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33661    # Check that this is likely to be Microsoft CL.EXE.
33662    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33663    if test $? -ne 0; then
33664      { $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
33665$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33667$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33668      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33669    fi
33670    # Collapse compiler output into a single line
33671    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33672    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33673        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33674  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33675    # gcc --version output typically looks like
33676    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33677    #     Copyright (C) 2013 Free Software Foundation, Inc.
33678    #     This is free software; see the source for copying conditions.  There is NO
33679    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33680    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33681    # Check that this is likely to be GCC.
33682    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33683    if test $? -ne 0; then
33684      { $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
33685$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33686      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33687$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33688      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689    fi
33690    # Remove Copyright and legalese from version string, and
33691    # collapse into a single line
33692    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693        $SED -e 's/ *Copyright .*//'`
33694    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33695        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33696  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33697    # clang --version output typically looks like
33698    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33699    #    clang version 3.3 (tags/RELEASE_33/final)
33700    # or
33701    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33702    #    Target: x86_64-pc-linux-gnu
33703    #    Thread model: posix
33704    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33705    # Check that this is likely to be clang
33706    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33707    if test $? -ne 0; then
33708      { $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
33709$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33710      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33711$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33712      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33713    fi
33714    # Collapse compiler output into a single line
33715    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33716    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33717        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33718  else
33719      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33720  fi
33721  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33722  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33723  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33724  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33725
33726  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33727$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33728
33729
33730  # Now that we have resolved CC ourself, let autoconf have its go at it
33731  ac_ext=c
33732ac_cpp='$CPP $CPPFLAGS'
33733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33735ac_compiler_gnu=$ac_cv_c_compiler_gnu
33736if test -n "$ac_tool_prefix"; then
33737  for ac_prog in $CC
33738  do
33739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33742$as_echo_n "checking for $ac_word... " >&6; }
33743if ${ac_cv_prog_CC+:} false; then :
33744  $as_echo_n "(cached) " >&6
33745else
33746  if test -n "$CC"; then
33747  ac_cv_prog_CC="$CC" # Let the user override the test.
33748else
33749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33750for as_dir in $PATH
33751do
33752  IFS=$as_save_IFS
33753  test -z "$as_dir" && as_dir=.
33754    for ac_exec_ext in '' $ac_executable_extensions; do
33755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33756    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33758    break 2
33759  fi
33760done
33761  done
33762IFS=$as_save_IFS
33763
33764fi
33765fi
33766CC=$ac_cv_prog_CC
33767if test -n "$CC"; then
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33769$as_echo "$CC" >&6; }
33770else
33771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33772$as_echo "no" >&6; }
33773fi
33774
33775
33776    test -n "$CC" && break
33777  done
33778fi
33779if test -z "$CC"; then
33780  ac_ct_CC=$CC
33781  for ac_prog in $CC
33782do
33783  # Extract the first word of "$ac_prog", so it can be a program name with args.
33784set dummy $ac_prog; ac_word=$2
33785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33786$as_echo_n "checking for $ac_word... " >&6; }
33787if ${ac_cv_prog_ac_ct_CC+:} false; then :
33788  $as_echo_n "(cached) " >&6
33789else
33790  if test -n "$ac_ct_CC"; then
33791  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33792else
33793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33794for as_dir in $PATH
33795do
33796  IFS=$as_save_IFS
33797  test -z "$as_dir" && as_dir=.
33798    for ac_exec_ext in '' $ac_executable_extensions; do
33799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33800    ac_cv_prog_ac_ct_CC="$ac_prog"
33801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33802    break 2
33803  fi
33804done
33805  done
33806IFS=$as_save_IFS
33807
33808fi
33809fi
33810ac_ct_CC=$ac_cv_prog_ac_ct_CC
33811if test -n "$ac_ct_CC"; then
33812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33813$as_echo "$ac_ct_CC" >&6; }
33814else
33815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33816$as_echo "no" >&6; }
33817fi
33818
33819
33820  test -n "$ac_ct_CC" && break
33821done
33822
33823  if test "x$ac_ct_CC" = x; then
33824    CC=""
33825  else
33826    case $cross_compiling:$ac_tool_warned in
33827yes:)
33828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33830ac_tool_warned=yes ;;
33831esac
33832    CC=$ac_ct_CC
33833  fi
33834fi
33835
33836
33837test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33839as_fn_error $? "no acceptable C compiler found in \$PATH
33840See \`config.log' for more details" "$LINENO" 5; }
33841
33842# Provide some information about the compiler.
33843$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33844set X $ac_compile
33845ac_compiler=$2
33846for ac_option in --version -v -V -qversion; do
33847  { { ac_try="$ac_compiler $ac_option >&5"
33848case "(($ac_try" in
33849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33850  *) ac_try_echo=$ac_try;;
33851esac
33852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33853$as_echo "$ac_try_echo"; } >&5
33854  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33855  ac_status=$?
33856  if test -s conftest.err; then
33857    sed '10a\
33858... rest of stderr output deleted ...
33859         10q' conftest.err >conftest.er1
33860    cat conftest.er1 >&5
33861  fi
33862  rm -f conftest.er1 conftest.err
33863  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33864  test $ac_status = 0; }
33865done
33866
33867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33868/* end confdefs.h.  */
33869
33870int
33871main ()
33872{
33873
33874  ;
33875  return 0;
33876}
33877_ACEOF
33878ac_clean_files_save=$ac_clean_files
33879ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33880# Try to create an executable without -o first, disregard a.out.
33881# It will help us diagnose broken compilers, and finding out an intuition
33882# of exeext.
33883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33884$as_echo_n "checking whether the C compiler works... " >&6; }
33885ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33886
33887# The possible output files:
33888ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33889
33890ac_rmfiles=
33891for ac_file in $ac_files
33892do
33893  case $ac_file in
33894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33895    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33896  esac
33897done
33898rm -f $ac_rmfiles
33899
33900if { { ac_try="$ac_link_default"
33901case "(($ac_try" in
33902  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33903  *) ac_try_echo=$ac_try;;
33904esac
33905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33906$as_echo "$ac_try_echo"; } >&5
33907  (eval "$ac_link_default") 2>&5
33908  ac_status=$?
33909  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33910  test $ac_status = 0; }; then :
33911  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33912# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33913# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33914# so that the user can short-circuit this test for compilers unknown to
33915# Autoconf.
33916for ac_file in $ac_files ''
33917do
33918  test -f "$ac_file" || continue
33919  case $ac_file in
33920    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33921	;;
33922    [ab].out )
33923	# We found the default executable, but exeext='' is most
33924	# certainly right.
33925	break;;
33926    *.* )
33927	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33928	then :; else
33929	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33930	fi
33931	# We set ac_cv_exeext here because the later test for it is not
33932	# safe: cross compilers may not add the suffix if given an `-o'
33933	# argument, so we may need to know it at that point already.
33934	# Even if this section looks crufty: it has the advantage of
33935	# actually working.
33936	break;;
33937    * )
33938	break;;
33939  esac
33940done
33941test "$ac_cv_exeext" = no && ac_cv_exeext=
33942
33943else
33944  ac_file=''
33945fi
33946if test -z "$ac_file"; then :
33947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33948$as_echo "no" >&6; }
33949$as_echo "$as_me: failed program was:" >&5
33950sed 's/^/| /' conftest.$ac_ext >&5
33951
33952{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33954as_fn_error 77 "C compiler cannot create executables
33955See \`config.log' for more details" "$LINENO" 5; }
33956else
33957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33958$as_echo "yes" >&6; }
33959fi
33960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33961$as_echo_n "checking for C compiler default output file name... " >&6; }
33962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33963$as_echo "$ac_file" >&6; }
33964ac_exeext=$ac_cv_exeext
33965
33966rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33967ac_clean_files=$ac_clean_files_save
33968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33969$as_echo_n "checking for suffix of executables... " >&6; }
33970if { { ac_try="$ac_link"
33971case "(($ac_try" in
33972  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33973  *) ac_try_echo=$ac_try;;
33974esac
33975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33976$as_echo "$ac_try_echo"; } >&5
33977  (eval "$ac_link") 2>&5
33978  ac_status=$?
33979  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33980  test $ac_status = 0; }; then :
33981  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33982# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33983# work properly (i.e., refer to `conftest.exe'), while it won't with
33984# `rm'.
33985for ac_file in conftest.exe conftest conftest.*; do
33986  test -f "$ac_file" || continue
33987  case $ac_file in
33988    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33989    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33990	  break;;
33991    * ) break;;
33992  esac
33993done
33994else
33995  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33997as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33998See \`config.log' for more details" "$LINENO" 5; }
33999fi
34000rm -f conftest conftest$ac_cv_exeext
34001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34002$as_echo "$ac_cv_exeext" >&6; }
34003
34004rm -f conftest.$ac_ext
34005EXEEXT=$ac_cv_exeext
34006ac_exeext=$EXEEXT
34007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34008/* end confdefs.h.  */
34009#include <stdio.h>
34010int
34011main ()
34012{
34013FILE *f = fopen ("conftest.out", "w");
34014 return ferror (f) || fclose (f) != 0;
34015
34016  ;
34017  return 0;
34018}
34019_ACEOF
34020ac_clean_files="$ac_clean_files conftest.out"
34021# Check that the compiler produces executables we can run.  If not, either
34022# the compiler is broken, or we cross compile.
34023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34024$as_echo_n "checking whether we are cross compiling... " >&6; }
34025if test "$cross_compiling" != yes; then
34026  { { ac_try="$ac_link"
34027case "(($ac_try" in
34028  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34029  *) ac_try_echo=$ac_try;;
34030esac
34031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34032$as_echo "$ac_try_echo"; } >&5
34033  (eval "$ac_link") 2>&5
34034  ac_status=$?
34035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34036  test $ac_status = 0; }
34037  if { ac_try='./conftest$ac_cv_exeext'
34038  { { case "(($ac_try" in
34039  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34040  *) ac_try_echo=$ac_try;;
34041esac
34042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34043$as_echo "$ac_try_echo"; } >&5
34044  (eval "$ac_try") 2>&5
34045  ac_status=$?
34046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34047  test $ac_status = 0; }; }; then
34048    cross_compiling=no
34049  else
34050    if test "$cross_compiling" = maybe; then
34051	cross_compiling=yes
34052    else
34053	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34055as_fn_error $? "cannot run C compiled programs.
34056If you meant to cross compile, use \`--host'.
34057See \`config.log' for more details" "$LINENO" 5; }
34058    fi
34059  fi
34060fi
34061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34062$as_echo "$cross_compiling" >&6; }
34063
34064rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34065ac_clean_files=$ac_clean_files_save
34066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34067$as_echo_n "checking for suffix of object files... " >&6; }
34068if ${ac_cv_objext+:} false; then :
34069  $as_echo_n "(cached) " >&6
34070else
34071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34072/* end confdefs.h.  */
34073
34074int
34075main ()
34076{
34077
34078  ;
34079  return 0;
34080}
34081_ACEOF
34082rm -f conftest.o conftest.obj
34083if { { ac_try="$ac_compile"
34084case "(($ac_try" in
34085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34086  *) ac_try_echo=$ac_try;;
34087esac
34088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34089$as_echo "$ac_try_echo"; } >&5
34090  (eval "$ac_compile") 2>&5
34091  ac_status=$?
34092  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34093  test $ac_status = 0; }; then :
34094  for ac_file in conftest.o conftest.obj conftest.*; do
34095  test -f "$ac_file" || continue;
34096  case $ac_file in
34097    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34098    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34099       break;;
34100  esac
34101done
34102else
34103  $as_echo "$as_me: failed program was:" >&5
34104sed 's/^/| /' conftest.$ac_ext >&5
34105
34106{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34108as_fn_error $? "cannot compute suffix of object files: cannot compile
34109See \`config.log' for more details" "$LINENO" 5; }
34110fi
34111rm -f conftest.$ac_cv_objext conftest.$ac_ext
34112fi
34113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34114$as_echo "$ac_cv_objext" >&6; }
34115OBJEXT=$ac_cv_objext
34116ac_objext=$OBJEXT
34117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34118$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34119if ${ac_cv_c_compiler_gnu+:} false; then :
34120  $as_echo_n "(cached) " >&6
34121else
34122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34123/* end confdefs.h.  */
34124
34125int
34126main ()
34127{
34128#ifndef __GNUC__
34129       choke me
34130#endif
34131
34132  ;
34133  return 0;
34134}
34135_ACEOF
34136if ac_fn_c_try_compile "$LINENO"; then :
34137  ac_compiler_gnu=yes
34138else
34139  ac_compiler_gnu=no
34140fi
34141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34142ac_cv_c_compiler_gnu=$ac_compiler_gnu
34143
34144fi
34145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34146$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34147if test $ac_compiler_gnu = yes; then
34148  GCC=yes
34149else
34150  GCC=
34151fi
34152ac_test_CFLAGS=${CFLAGS+set}
34153ac_save_CFLAGS=$CFLAGS
34154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34155$as_echo_n "checking whether $CC accepts -g... " >&6; }
34156if ${ac_cv_prog_cc_g+:} false; then :
34157  $as_echo_n "(cached) " >&6
34158else
34159  ac_save_c_werror_flag=$ac_c_werror_flag
34160   ac_c_werror_flag=yes
34161   ac_cv_prog_cc_g=no
34162   CFLAGS="-g"
34163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34164/* end confdefs.h.  */
34165
34166int
34167main ()
34168{
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174if ac_fn_c_try_compile "$LINENO"; then :
34175  ac_cv_prog_cc_g=yes
34176else
34177  CFLAGS=""
34178      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34179/* end confdefs.h.  */
34180
34181int
34182main ()
34183{
34184
34185  ;
34186  return 0;
34187}
34188_ACEOF
34189if ac_fn_c_try_compile "$LINENO"; then :
34190
34191else
34192  ac_c_werror_flag=$ac_save_c_werror_flag
34193	 CFLAGS="-g"
34194	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34195/* end confdefs.h.  */
34196
34197int
34198main ()
34199{
34200
34201  ;
34202  return 0;
34203}
34204_ACEOF
34205if ac_fn_c_try_compile "$LINENO"; then :
34206  ac_cv_prog_cc_g=yes
34207fi
34208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34209fi
34210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34211fi
34212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34213   ac_c_werror_flag=$ac_save_c_werror_flag
34214fi
34215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34216$as_echo "$ac_cv_prog_cc_g" >&6; }
34217if test "$ac_test_CFLAGS" = set; then
34218  CFLAGS=$ac_save_CFLAGS
34219elif test $ac_cv_prog_cc_g = yes; then
34220  if test "$GCC" = yes; then
34221    CFLAGS="-g -O2"
34222  else
34223    CFLAGS="-g"
34224  fi
34225else
34226  if test "$GCC" = yes; then
34227    CFLAGS="-O2"
34228  else
34229    CFLAGS=
34230  fi
34231fi
34232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34233$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34234if ${ac_cv_prog_cc_c89+:} false; then :
34235  $as_echo_n "(cached) " >&6
34236else
34237  ac_cv_prog_cc_c89=no
34238ac_save_CC=$CC
34239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34240/* end confdefs.h.  */
34241#include <stdarg.h>
34242#include <stdio.h>
34243struct stat;
34244/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34245struct buf { int x; };
34246FILE * (*rcsopen) (struct buf *, struct stat *, int);
34247static char *e (p, i)
34248     char **p;
34249     int i;
34250{
34251  return p[i];
34252}
34253static char *f (char * (*g) (char **, int), char **p, ...)
34254{
34255  char *s;
34256  va_list v;
34257  va_start (v,p);
34258  s = g (p, va_arg (v,int));
34259  va_end (v);
34260  return s;
34261}
34262
34263/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34264   function prototypes and stuff, but not '\xHH' hex character constants.
34265   These don't provoke an error unfortunately, instead are silently treated
34266   as 'x'.  The following induces an error, until -std is added to get
34267   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34268   array size at least.  It's necessary to write '\x00'==0 to get something
34269   that's true only with -std.  */
34270int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34271
34272/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34273   inside strings and character constants.  */
34274#define FOO(x) 'x'
34275int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34276
34277int test (int i, double x);
34278struct s1 {int (*f) (int a);};
34279struct s2 {int (*f) (double a);};
34280int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34281int argc;
34282char **argv;
34283int
34284main ()
34285{
34286return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34287  ;
34288  return 0;
34289}
34290_ACEOF
34291for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34292	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34293do
34294  CC="$ac_save_CC $ac_arg"
34295  if ac_fn_c_try_compile "$LINENO"; then :
34296  ac_cv_prog_cc_c89=$ac_arg
34297fi
34298rm -f core conftest.err conftest.$ac_objext
34299  test "x$ac_cv_prog_cc_c89" != "xno" && break
34300done
34301rm -f conftest.$ac_ext
34302CC=$ac_save_CC
34303
34304fi
34305# AC_CACHE_VAL
34306case "x$ac_cv_prog_cc_c89" in
34307  x)
34308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34309$as_echo "none needed" >&6; } ;;
34310  xno)
34311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34312$as_echo "unsupported" >&6; } ;;
34313  *)
34314    CC="$CC $ac_cv_prog_cc_c89"
34315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34316$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34317esac
34318if test "x$ac_cv_prog_cc_c89" != xno; then :
34319
34320fi
34321
34322ac_ext=cpp
34323ac_cpp='$CXXCPP $CPPFLAGS'
34324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34327
34328
34329
34330  COMPILER_NAME=C++
34331  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34332
34333  if test "x$CXX" != x; then
34334    # User has supplied compiler name already, always let that override.
34335    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34336$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34337    if test "x`basename $CXX`" = "x$CXX"; then
34338      # A command without a complete path is provided, search $PATH.
34339
34340      for ac_prog in $CXX
34341do
34342  # Extract the first word of "$ac_prog", so it can be a program name with args.
34343set dummy $ac_prog; ac_word=$2
34344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34345$as_echo_n "checking for $ac_word... " >&6; }
34346if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34347  $as_echo_n "(cached) " >&6
34348else
34349  case $POTENTIAL_CXX in
34350  [\\/]* | ?:[\\/]*)
34351  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34352  ;;
34353  *)
34354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34355for as_dir in $PATH
34356do
34357  IFS=$as_save_IFS
34358  test -z "$as_dir" && as_dir=.
34359    for ac_exec_ext in '' $ac_executable_extensions; do
34360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34361    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34363    break 2
34364  fi
34365done
34366  done
34367IFS=$as_save_IFS
34368
34369  ;;
34370esac
34371fi
34372POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34373if test -n "$POTENTIAL_CXX"; then
34374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34375$as_echo "$POTENTIAL_CXX" >&6; }
34376else
34377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34378$as_echo "no" >&6; }
34379fi
34380
34381
34382  test -n "$POTENTIAL_CXX" && break
34383done
34384
34385      if test "x$POTENTIAL_CXX" != x; then
34386        CXX=$POTENTIAL_CXX
34387      else
34388        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34389      fi
34390    else
34391      # Otherwise it might already be a complete path
34392      if test ! -x "$CXX"; then
34393        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34394      fi
34395    fi
34396  else
34397    # No user supplied value. Locate compiler ourselves.
34398
34399    # If we are cross compiling, assume cross compilation tools follows the
34400    # cross compilation standard where they are prefixed with the autoconf
34401    # standard name for the target. For example the binary
34402    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34403    # If we are not cross compiling, then the default compiler name will be
34404    # used.
34405
34406    CXX=
34407    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34408    # before checking the rest of the PATH.
34409    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34410    # step, this should not be necessary.
34411    if test -n "$TOOLCHAIN_PATH"; then
34412      PATH_save="$PATH"
34413      PATH="$TOOLCHAIN_PATH"
34414      for ac_prog in $SEARCH_LIST
34415do
34416  # Extract the first word of "$ac_prog", so it can be a program name with args.
34417set dummy $ac_prog; ac_word=$2
34418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34419$as_echo_n "checking for $ac_word... " >&6; }
34420if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34421  $as_echo_n "(cached) " >&6
34422else
34423  case $TOOLCHAIN_PATH_CXX in
34424  [\\/]* | ?:[\\/]*)
34425  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34426  ;;
34427  *)
34428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34429for as_dir in $PATH
34430do
34431  IFS=$as_save_IFS
34432  test -z "$as_dir" && as_dir=.
34433    for ac_exec_ext in '' $ac_executable_extensions; do
34434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34435    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34437    break 2
34438  fi
34439done
34440  done
34441IFS=$as_save_IFS
34442
34443  ;;
34444esac
34445fi
34446TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34447if test -n "$TOOLCHAIN_PATH_CXX"; then
34448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34449$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34450else
34451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34452$as_echo "no" >&6; }
34453fi
34454
34455
34456  test -n "$TOOLCHAIN_PATH_CXX" && break
34457done
34458
34459      CXX=$TOOLCHAIN_PATH_CXX
34460      PATH="$PATH_save"
34461    fi
34462
34463    # AC_PATH_PROGS can't be run multiple times with the same variable,
34464    # so create a new name for this run.
34465    if test "x$CXX" = x; then
34466      for ac_prog in $SEARCH_LIST
34467do
34468  # Extract the first word of "$ac_prog", so it can be a program name with args.
34469set dummy $ac_prog; ac_word=$2
34470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34471$as_echo_n "checking for $ac_word... " >&6; }
34472if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34473  $as_echo_n "(cached) " >&6
34474else
34475  case $POTENTIAL_CXX in
34476  [\\/]* | ?:[\\/]*)
34477  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34478  ;;
34479  *)
34480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34481for as_dir in $PATH
34482do
34483  IFS=$as_save_IFS
34484  test -z "$as_dir" && as_dir=.
34485    for ac_exec_ext in '' $ac_executable_extensions; do
34486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34487    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34489    break 2
34490  fi
34491done
34492  done
34493IFS=$as_save_IFS
34494
34495  ;;
34496esac
34497fi
34498POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34499if test -n "$POTENTIAL_CXX"; then
34500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34501$as_echo "$POTENTIAL_CXX" >&6; }
34502else
34503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34504$as_echo "no" >&6; }
34505fi
34506
34507
34508  test -n "$POTENTIAL_CXX" && break
34509done
34510
34511      CXX=$POTENTIAL_CXX
34512    fi
34513
34514    if test "x$CXX" = x; then
34515
34516  # Print a helpful message on how to acquire the necessary build dependency.
34517  # devkit is the help tag: freetype, cups, alsa etc
34518  MISSING_DEPENDENCY=devkit
34519
34520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34521    cygwin_help $MISSING_DEPENDENCY
34522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34523    msys_help $MISSING_DEPENDENCY
34524  else
34525    PKGHANDLER_COMMAND=
34526
34527    case $PKGHANDLER in
34528      apt-get)
34529        apt_help     $MISSING_DEPENDENCY ;;
34530      yum)
34531        yum_help     $MISSING_DEPENDENCY ;;
34532      port)
34533        port_help    $MISSING_DEPENDENCY ;;
34534      pkgutil)
34535        pkgutil_help $MISSING_DEPENDENCY ;;
34536      pkgadd)
34537        pkgadd_help  $MISSING_DEPENDENCY ;;
34538    esac
34539
34540    if test "x$PKGHANDLER_COMMAND" != x; then
34541      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34542    fi
34543  fi
34544
34545      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34546    fi
34547  fi
34548
34549  # Now we have a compiler binary in CXX. Make sure it's okay.
34550
34551  # Only process if variable expands to non-empty
34552
34553  if test "x$CXX" != x; then
34554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34555
34556  # First separate the path from the arguments. This will split at the first
34557  # space.
34558  complete="$CXX"
34559  path="${complete%% *}"
34560  tmp="$complete EOL"
34561  arguments="${tmp#* }"
34562
34563  # Input might be given as Windows format, start by converting to
34564  # unix format.
34565  new_path=`$CYGPATH -u "$path"`
34566
34567  # Now try to locate executable using which
34568  new_path=`$WHICH "$new_path" 2> /dev/null`
34569  # bat and cmd files are not always considered executable in cygwin causing which
34570  # to not find them
34571  if test "x$new_path" = x \
34572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34574    new_path=`$CYGPATH -u "$path"`
34575  fi
34576  if test "x$new_path" = x; then
34577    # Oops. Which didn't find the executable.
34578    # The splitting of arguments from the executable at a space might have been incorrect,
34579    # since paths with space are more likely in Windows. Give it another try with the whole
34580    # argument.
34581    path="$complete"
34582    arguments="EOL"
34583    new_path=`$CYGPATH -u "$path"`
34584    new_path=`$WHICH "$new_path" 2> /dev/null`
34585    # bat and cmd files are not always considered executable in cygwin causing which
34586    # to not find them
34587    if test "x$new_path" = x \
34588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34590      new_path=`$CYGPATH -u "$path"`
34591    fi
34592    if test "x$new_path" = x; then
34593      # It's still not found. Now this is an unrecoverable error.
34594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34595$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34596      has_space=`$ECHO "$complete" | $GREP " "`
34597      if test "x$has_space" != x; then
34598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34600      fi
34601      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34602    fi
34603  fi
34604
34605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34608  # "foo.exe" is OK but "foo" is an error.
34609  #
34610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34611  # It is also a way to make sure we got the proper file name for the real test later on.
34612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34613  if test "x$test_shortpath" = x; then
34614    # Short path failed, file does not exist as specified.
34615    # Try adding .exe or .cmd
34616    if test -f "${new_path}.exe"; then
34617      input_to_shortpath="${new_path}.exe"
34618    elif test -f "${new_path}.cmd"; then
34619      input_to_shortpath="${new_path}.cmd"
34620    else
34621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34622$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34625      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34626    fi
34627  else
34628    input_to_shortpath="$new_path"
34629  fi
34630
34631  # Call helper function which possibly converts this using DOS-style short mode.
34632  # If so, the updated path is stored in $new_path.
34633  new_path="$input_to_shortpath"
34634
34635  input_path="$input_to_shortpath"
34636  # Check if we need to convert this using DOS-style short mode. If the path
34637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34638  # take no chances and rewrite it.
34639  # Note: m4 eats our [], so we need to use [ and ] instead.
34640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34641  if test "x$has_forbidden_chars" != x; then
34642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34646      # Going to short mode and back again did indeed matter. Since short mode is
34647      # case insensitive, let's make it lowercase to improve readability.
34648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34649      # Now convert it back to Unix-style (cygpath)
34650      input_path=`$CYGPATH -u "$shortmode_path"`
34651      new_path="$input_path"
34652    fi
34653  fi
34654
34655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34656  if test "x$test_cygdrive_prefix" = x; then
34657    # As a simple fix, exclude /usr/bin since it's not a real path.
34658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34660      # a path prefixed by /cygdrive for fixpath to work.
34661      new_path="$CYGWIN_ROOT_PATH$input_path"
34662    fi
34663  fi
34664
34665  # remove trailing .exe if any
34666  new_path="${new_path/%.exe/}"
34667
34668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34669
34670  # First separate the path from the arguments. This will split at the first
34671  # space.
34672  complete="$CXX"
34673  path="${complete%% *}"
34674  tmp="$complete EOL"
34675  arguments="${tmp#* }"
34676
34677  # Input might be given as Windows format, start by converting to
34678  # unix format.
34679  new_path="$path"
34680
34681  windows_path="$new_path"
34682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34683    unix_path=`$CYGPATH -u "$windows_path"`
34684    new_path="$unix_path"
34685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34687    new_path="$unix_path"
34688  fi
34689
34690
34691  # Now try to locate executable using which
34692  new_path=`$WHICH "$new_path" 2> /dev/null`
34693
34694  if test "x$new_path" = x; then
34695    # Oops. Which didn't find the executable.
34696    # The splitting of arguments from the executable at a space might have been incorrect,
34697    # since paths with space are more likely in Windows. Give it another try with the whole
34698    # argument.
34699    path="$complete"
34700    arguments="EOL"
34701    new_path="$path"
34702
34703  windows_path="$new_path"
34704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34705    unix_path=`$CYGPATH -u "$windows_path"`
34706    new_path="$unix_path"
34707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34709    new_path="$unix_path"
34710  fi
34711
34712
34713    new_path=`$WHICH "$new_path" 2> /dev/null`
34714    # bat and cmd files are not always considered executable in MSYS causing which
34715    # to not find them
34716    if test "x$new_path" = x \
34717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34719      new_path="$path"
34720
34721  windows_path="$new_path"
34722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34723    unix_path=`$CYGPATH -u "$windows_path"`
34724    new_path="$unix_path"
34725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34727    new_path="$unix_path"
34728  fi
34729
34730    fi
34731
34732    if test "x$new_path" = x; then
34733      # It's still not found. Now this is an unrecoverable error.
34734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34735$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34736      has_space=`$ECHO "$complete" | $GREP " "`
34737      if test "x$has_space" != x; then
34738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34740      fi
34741      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34742    fi
34743  fi
34744
34745  # Now new_path has a complete unix path to the binary
34746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34747    # Keep paths in /bin as-is, but remove trailing .exe if any
34748    new_path="${new_path/%.exe/}"
34749    # Do not save /bin paths to all_fixpath_prefixes!
34750  else
34751    # Not in mixed or Windows style, start by that.
34752    new_path=`cmd //c echo $new_path`
34753
34754  input_path="$new_path"
34755  # Check if we need to convert this using DOS-style short mode. If the path
34756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34757  # take no chances and rewrite it.
34758  # Note: m4 eats our [], so we need to use [ and ] instead.
34759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34760  if test "x$has_forbidden_chars" != x; then
34761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34763  fi
34764
34765    # Output is in $new_path
34766
34767  windows_path="$new_path"
34768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34769    unix_path=`$CYGPATH -u "$windows_path"`
34770    new_path="$unix_path"
34771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34773    new_path="$unix_path"
34774  fi
34775
34776    # remove trailing .exe if any
34777    new_path="${new_path/%.exe/}"
34778
34779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34781  fi
34782
34783    else
34784      # We're on a unix platform. Hooray! :)
34785      # First separate the path from the arguments. This will split at the first
34786      # space.
34787      complete="$CXX"
34788      path="${complete%% *}"
34789      tmp="$complete EOL"
34790      arguments="${tmp#* }"
34791
34792      # Cannot rely on the command "which" here since it doesn't always work.
34793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34794      if test -z "$is_absolute_path"; then
34795        # Path to executable is not absolute. Find it.
34796        IFS_save="$IFS"
34797        IFS=:
34798        for p in $PATH; do
34799          if test -f "$p/$path" && test -x "$p/$path"; then
34800            new_path="$p/$path"
34801            break
34802          fi
34803        done
34804        IFS="$IFS_save"
34805      else
34806        # This is an absolute path, we can use it without further modifications.
34807        new_path="$path"
34808      fi
34809
34810      if test "x$new_path" = x; then
34811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34812$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34813        has_space=`$ECHO "$complete" | $GREP " "`
34814        if test "x$has_space" != x; then
34815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34817        fi
34818        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34819      fi
34820    fi
34821
34822    # Now join together the path and the arguments once again
34823    if test "x$arguments" != xEOL; then
34824      new_complete="$new_path ${arguments% *}"
34825    else
34826      new_complete="$new_path"
34827    fi
34828
34829    if test "x$complete" != "x$new_complete"; then
34830      CXX="$new_complete"
34831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34832$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34833    fi
34834  fi
34835
34836  TEST_COMPILER="$CXX"
34837
34838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34839$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34840  SYMLINK_ORIGINAL="$TEST_COMPILER"
34841
34842  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34843    # Follow a chain of symbolic links. Use readlink
34844    # where it exists, else fall back to horribly
34845    # complicated shell code.
34846    if test "x$READLINK_TESTED" != yes; then
34847      # On MacOSX there is a readlink tool with a different
34848      # purpose than the GNU readlink tool. Check the found readlink.
34849      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34850      if test "x$ISGNU" = x; then
34851        # A readlink that we do not know how to use.
34852        # Are there other non-GNU readlinks out there?
34853        READLINK_TESTED=yes
34854        READLINK=
34855      fi
34856    fi
34857
34858    if test "x$READLINK" != x; then
34859      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34860    else
34861      # Save the current directory for restoring afterwards
34862      STARTDIR=$PWD
34863      COUNTER=0
34864      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34865      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34866      cd $sym_link_dir
34867      # Use -P flag to resolve symlinks in directories.
34868      cd `$THEPWDCMD -P`
34869      sym_link_dir=`$THEPWDCMD -P`
34870      # Resolve file symlinks
34871      while test $COUNTER -lt 20; do
34872        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34873        if test "x$ISLINK" == x; then
34874          # This is not a symbolic link! We are done!
34875          break
34876        fi
34877        # Again resolve directory symlinks since the target of the just found
34878        # link could be in a different directory
34879        cd `$DIRNAME $ISLINK`
34880        sym_link_dir=`$THEPWDCMD -P`
34881        sym_link_file=`$BASENAME $ISLINK`
34882        let COUNTER=COUNTER+1
34883      done
34884      cd $STARTDIR
34885      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34886    fi
34887  fi
34888
34889  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34891$as_echo "no symlink" >&6; }
34892  else
34893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34894$as_echo "$SYMLINK_ORIGINAL" >&6; }
34895
34896    # We can't handle ccache by gcc wrappers, since we need to know if we're
34897    # using ccache. Instead ccache usage must be controlled by a configure option.
34898    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34899    if test "x$COMPILER_BASENAME" = "xccache"; then
34900      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34901$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34902      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34903    fi
34904  fi
34905
34906
34907  COMPILER=$CXX
34908  COMPILER_NAME=$COMPILER_NAME
34909
34910  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34911    # cc -V output typically looks like
34912    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34913    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34914    # Check that this is likely to be the Solaris Studio cc.
34915    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34916    if test $? -ne 0; then
34917      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34918      { $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
34919$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34921$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34922      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34923$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34924      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34925    fi
34926    # Remove usage instructions (if present), and
34927    # collapse compiler output into a single line
34928    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34929        $SED -e 's/ *[Uu]sage:.*//'`
34930    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34931        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34932  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34933    # xlc -qversion output typically looks like
34934    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34935    #     Version: 11.01.0000.0015
34936    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34937    # Check that this is likely to be the IBM XL C compiler.
34938    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34939    if test $? -ne 0; then
34940      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34941      { $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
34942$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34944$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34945      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34946$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34947      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34948    fi
34949    # Collapse compiler output into a single line
34950    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34951    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34952        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34953  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34954    # There is no specific version flag, but all output starts with a version string.
34955    # First line typically looks something like:
34956    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34957    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34958    # Check that this is likely to be Microsoft CL.EXE.
34959    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34960    if test $? -ne 0; then
34961      { $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
34962$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34963      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34964$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34965      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34966    fi
34967    # Collapse compiler output into a single line
34968    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34969    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34970        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34971  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34972    # gcc --version output typically looks like
34973    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34974    #     Copyright (C) 2013 Free Software Foundation, Inc.
34975    #     This is free software; see the source for copying conditions.  There is NO
34976    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34977    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34978    # Check that this is likely to be GCC.
34979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34980    if test $? -ne 0; then
34981      { $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
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34984$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34986    fi
34987    # Remove Copyright and legalese from version string, and
34988    # collapse into a single line
34989    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34990        $SED -e 's/ *Copyright .*//'`
34991    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34992        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34993  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34994    # clang --version output typically looks like
34995    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34996    #    clang version 3.3 (tags/RELEASE_33/final)
34997    # or
34998    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34999    #    Target: x86_64-pc-linux-gnu
35000    #    Thread model: posix
35001    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35002    # Check that this is likely to be clang
35003    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35004    if test $? -ne 0; then
35005      { $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
35006$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35007      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35008$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35009      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35010    fi
35011    # Collapse compiler output into a single line
35012    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35013    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35014        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35015  else
35016      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35017  fi
35018  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35019  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35020  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35021  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35022
35023  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35024$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35025
35026
35027  # Now that we have resolved CXX ourself, let autoconf have its go at it
35028  ac_ext=cpp
35029ac_cpp='$CXXCPP $CPPFLAGS'
35030ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35031ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35032ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35033if test -z "$CXX"; then
35034  if test -n "$CCC"; then
35035    CXX=$CCC
35036  else
35037    if test -n "$ac_tool_prefix"; then
35038  for ac_prog in $CXX
35039  do
35040    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35041set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35043$as_echo_n "checking for $ac_word... " >&6; }
35044if ${ac_cv_prog_CXX+:} false; then :
35045  $as_echo_n "(cached) " >&6
35046else
35047  if test -n "$CXX"; then
35048  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35049else
35050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35051for as_dir in $PATH
35052do
35053  IFS=$as_save_IFS
35054  test -z "$as_dir" && as_dir=.
35055    for ac_exec_ext in '' $ac_executable_extensions; do
35056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35057    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35059    break 2
35060  fi
35061done
35062  done
35063IFS=$as_save_IFS
35064
35065fi
35066fi
35067CXX=$ac_cv_prog_CXX
35068if test -n "$CXX"; then
35069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35070$as_echo "$CXX" >&6; }
35071else
35072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35073$as_echo "no" >&6; }
35074fi
35075
35076
35077    test -n "$CXX" && break
35078  done
35079fi
35080if test -z "$CXX"; then
35081  ac_ct_CXX=$CXX
35082  for ac_prog in $CXX
35083do
35084  # Extract the first word of "$ac_prog", so it can be a program name with args.
35085set dummy $ac_prog; ac_word=$2
35086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35087$as_echo_n "checking for $ac_word... " >&6; }
35088if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35089  $as_echo_n "(cached) " >&6
35090else
35091  if test -n "$ac_ct_CXX"; then
35092  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35093else
35094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35095for as_dir in $PATH
35096do
35097  IFS=$as_save_IFS
35098  test -z "$as_dir" && as_dir=.
35099    for ac_exec_ext in '' $ac_executable_extensions; do
35100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35101    ac_cv_prog_ac_ct_CXX="$ac_prog"
35102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35103    break 2
35104  fi
35105done
35106  done
35107IFS=$as_save_IFS
35108
35109fi
35110fi
35111ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35112if test -n "$ac_ct_CXX"; then
35113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35114$as_echo "$ac_ct_CXX" >&6; }
35115else
35116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35117$as_echo "no" >&6; }
35118fi
35119
35120
35121  test -n "$ac_ct_CXX" && break
35122done
35123
35124  if test "x$ac_ct_CXX" = x; then
35125    CXX="g++"
35126  else
35127    case $cross_compiling:$ac_tool_warned in
35128yes:)
35129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35131ac_tool_warned=yes ;;
35132esac
35133    CXX=$ac_ct_CXX
35134  fi
35135fi
35136
35137  fi
35138fi
35139# Provide some information about the compiler.
35140$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35141set X $ac_compile
35142ac_compiler=$2
35143for ac_option in --version -v -V -qversion; do
35144  { { ac_try="$ac_compiler $ac_option >&5"
35145case "(($ac_try" in
35146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35147  *) ac_try_echo=$ac_try;;
35148esac
35149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35150$as_echo "$ac_try_echo"; } >&5
35151  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35152  ac_status=$?
35153  if test -s conftest.err; then
35154    sed '10a\
35155... rest of stderr output deleted ...
35156         10q' conftest.err >conftest.er1
35157    cat conftest.er1 >&5
35158  fi
35159  rm -f conftest.er1 conftest.err
35160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35161  test $ac_status = 0; }
35162done
35163
35164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35165$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35166if ${ac_cv_cxx_compiler_gnu+:} false; then :
35167  $as_echo_n "(cached) " >&6
35168else
35169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35170/* end confdefs.h.  */
35171
35172int
35173main ()
35174{
35175#ifndef __GNUC__
35176       choke me
35177#endif
35178
35179  ;
35180  return 0;
35181}
35182_ACEOF
35183if ac_fn_cxx_try_compile "$LINENO"; then :
35184  ac_compiler_gnu=yes
35185else
35186  ac_compiler_gnu=no
35187fi
35188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35189ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35190
35191fi
35192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35193$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35194if test $ac_compiler_gnu = yes; then
35195  GXX=yes
35196else
35197  GXX=
35198fi
35199ac_test_CXXFLAGS=${CXXFLAGS+set}
35200ac_save_CXXFLAGS=$CXXFLAGS
35201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35202$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35203if ${ac_cv_prog_cxx_g+:} false; then :
35204  $as_echo_n "(cached) " >&6
35205else
35206  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35207   ac_cxx_werror_flag=yes
35208   ac_cv_prog_cxx_g=no
35209   CXXFLAGS="-g"
35210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35211/* end confdefs.h.  */
35212
35213int
35214main ()
35215{
35216
35217  ;
35218  return 0;
35219}
35220_ACEOF
35221if ac_fn_cxx_try_compile "$LINENO"; then :
35222  ac_cv_prog_cxx_g=yes
35223else
35224  CXXFLAGS=""
35225      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35226/* end confdefs.h.  */
35227
35228int
35229main ()
35230{
35231
35232  ;
35233  return 0;
35234}
35235_ACEOF
35236if ac_fn_cxx_try_compile "$LINENO"; then :
35237
35238else
35239  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35240	 CXXFLAGS="-g"
35241	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35242/* end confdefs.h.  */
35243
35244int
35245main ()
35246{
35247
35248  ;
35249  return 0;
35250}
35251_ACEOF
35252if ac_fn_cxx_try_compile "$LINENO"; then :
35253  ac_cv_prog_cxx_g=yes
35254fi
35255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35256fi
35257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35258fi
35259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35260   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35261fi
35262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35263$as_echo "$ac_cv_prog_cxx_g" >&6; }
35264if test "$ac_test_CXXFLAGS" = set; then
35265  CXXFLAGS=$ac_save_CXXFLAGS
35266elif test $ac_cv_prog_cxx_g = yes; then
35267  if test "$GXX" = yes; then
35268    CXXFLAGS="-g -O2"
35269  else
35270    CXXFLAGS="-g"
35271  fi
35272else
35273  if test "$GXX" = yes; then
35274    CXXFLAGS="-O2"
35275  else
35276    CXXFLAGS=
35277  fi
35278fi
35279ac_ext=cpp
35280ac_cpp='$CXXCPP $CPPFLAGS'
35281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35284
35285
35286  # This is the compiler version number on the form X.Y[.Z]
35287
35288
35289
35290
35291  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35293$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35294    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35295$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35296  fi
35297
35298  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35299  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35300    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35301$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35302  fi
35303
35304  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35305    { $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
35306$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35307  fi
35308
35309  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35310
35311
35312  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362    # Execute function body
35363
35364  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35365  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35366
35367  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35368    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35369  fi
35370
35371  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35372    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35373  fi
35374
35375  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35376  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35377
35378  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35379    :
35380
35381  else
35382    :
35383
35384          { $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
35385$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35386
35387
35388  fi
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403  fi
35404
35405  #
35406  # Setup the preprocessor (CPP and CXXCPP)
35407  #
35408  ac_ext=c
35409ac_cpp='$CPP $CPPFLAGS'
35410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35412ac_compiler_gnu=$ac_cv_c_compiler_gnu
35413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35414$as_echo_n "checking how to run the C preprocessor... " >&6; }
35415# On Suns, sometimes $CPP names a directory.
35416if test -n "$CPP" && test -d "$CPP"; then
35417  CPP=
35418fi
35419if test -z "$CPP"; then
35420  if ${ac_cv_prog_CPP+:} false; then :
35421  $as_echo_n "(cached) " >&6
35422else
35423      # Double quotes because CPP needs to be expanded
35424    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35425    do
35426      ac_preproc_ok=false
35427for ac_c_preproc_warn_flag in '' yes
35428do
35429  # Use a header file that comes with gcc, so configuring glibc
35430  # with a fresh cross-compiler works.
35431  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35432  # <limits.h> exists even on freestanding compilers.
35433  # On the NeXT, cc -E runs the code through the compiler's parser,
35434  # not just through cpp. "Syntax error" is here to catch this case.
35435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35436/* end confdefs.h.  */
35437#ifdef __STDC__
35438# include <limits.h>
35439#else
35440# include <assert.h>
35441#endif
35442		     Syntax error
35443_ACEOF
35444if ac_fn_c_try_cpp "$LINENO"; then :
35445
35446else
35447  # Broken: fails on valid input.
35448continue
35449fi
35450rm -f conftest.err conftest.i conftest.$ac_ext
35451
35452  # OK, works on sane cases.  Now check whether nonexistent headers
35453  # can be detected and how.
35454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35455/* end confdefs.h.  */
35456#include <ac_nonexistent.h>
35457_ACEOF
35458if ac_fn_c_try_cpp "$LINENO"; then :
35459  # Broken: success on invalid input.
35460continue
35461else
35462  # Passes both tests.
35463ac_preproc_ok=:
35464break
35465fi
35466rm -f conftest.err conftest.i conftest.$ac_ext
35467
35468done
35469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35470rm -f conftest.i conftest.err conftest.$ac_ext
35471if $ac_preproc_ok; then :
35472  break
35473fi
35474
35475    done
35476    ac_cv_prog_CPP=$CPP
35477
35478fi
35479  CPP=$ac_cv_prog_CPP
35480else
35481  ac_cv_prog_CPP=$CPP
35482fi
35483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35484$as_echo "$CPP" >&6; }
35485ac_preproc_ok=false
35486for ac_c_preproc_warn_flag in '' yes
35487do
35488  # Use a header file that comes with gcc, so configuring glibc
35489  # with a fresh cross-compiler works.
35490  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35491  # <limits.h> exists even on freestanding compilers.
35492  # On the NeXT, cc -E runs the code through the compiler's parser,
35493  # not just through cpp. "Syntax error" is here to catch this case.
35494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35495/* end confdefs.h.  */
35496#ifdef __STDC__
35497# include <limits.h>
35498#else
35499# include <assert.h>
35500#endif
35501		     Syntax error
35502_ACEOF
35503if ac_fn_c_try_cpp "$LINENO"; then :
35504
35505else
35506  # Broken: fails on valid input.
35507continue
35508fi
35509rm -f conftest.err conftest.i conftest.$ac_ext
35510
35511  # OK, works on sane cases.  Now check whether nonexistent headers
35512  # can be detected and how.
35513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35514/* end confdefs.h.  */
35515#include <ac_nonexistent.h>
35516_ACEOF
35517if ac_fn_c_try_cpp "$LINENO"; then :
35518  # Broken: success on invalid input.
35519continue
35520else
35521  # Passes both tests.
35522ac_preproc_ok=:
35523break
35524fi
35525rm -f conftest.err conftest.i conftest.$ac_ext
35526
35527done
35528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35529rm -f conftest.i conftest.err conftest.$ac_ext
35530if $ac_preproc_ok; then :
35531
35532else
35533  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35536See \`config.log' for more details" "$LINENO" 5; }
35537fi
35538
35539ac_ext=cpp
35540ac_cpp='$CXXCPP $CPPFLAGS'
35541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35544
35545
35546  # Only process if variable expands to non-empty
35547
35548  if test "x$CPP" != x; then
35549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35550
35551  # First separate the path from the arguments. This will split at the first
35552  # space.
35553  complete="$CPP"
35554  path="${complete%% *}"
35555  tmp="$complete EOL"
35556  arguments="${tmp#* }"
35557
35558  # Input might be given as Windows format, start by converting to
35559  # unix format.
35560  new_path=`$CYGPATH -u "$path"`
35561
35562  # Now try to locate executable using which
35563  new_path=`$WHICH "$new_path" 2> /dev/null`
35564  # bat and cmd files are not always considered executable in cygwin causing which
35565  # to not find them
35566  if test "x$new_path" = x \
35567      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35568      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35569    new_path=`$CYGPATH -u "$path"`
35570  fi
35571  if test "x$new_path" = x; then
35572    # Oops. Which didn't find the executable.
35573    # The splitting of arguments from the executable at a space might have been incorrect,
35574    # since paths with space are more likely in Windows. Give it another try with the whole
35575    # argument.
35576    path="$complete"
35577    arguments="EOL"
35578    new_path=`$CYGPATH -u "$path"`
35579    new_path=`$WHICH "$new_path" 2> /dev/null`
35580    # bat and cmd files are not always considered executable in cygwin causing which
35581    # to not find them
35582    if test "x$new_path" = x \
35583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35585      new_path=`$CYGPATH -u "$path"`
35586    fi
35587    if test "x$new_path" = x; then
35588      # It's still not found. Now this is an unrecoverable error.
35589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35590$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35591      has_space=`$ECHO "$complete" | $GREP " "`
35592      if test "x$has_space" != x; then
35593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35595      fi
35596      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35597    fi
35598  fi
35599
35600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35603  # "foo.exe" is OK but "foo" is an error.
35604  #
35605  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35606  # It is also a way to make sure we got the proper file name for the real test later on.
35607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35608  if test "x$test_shortpath" = x; then
35609    # Short path failed, file does not exist as specified.
35610    # Try adding .exe or .cmd
35611    if test -f "${new_path}.exe"; then
35612      input_to_shortpath="${new_path}.exe"
35613    elif test -f "${new_path}.cmd"; then
35614      input_to_shortpath="${new_path}.cmd"
35615    else
35616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35617$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35620      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35621    fi
35622  else
35623    input_to_shortpath="$new_path"
35624  fi
35625
35626  # Call helper function which possibly converts this using DOS-style short mode.
35627  # If so, the updated path is stored in $new_path.
35628  new_path="$input_to_shortpath"
35629
35630  input_path="$input_to_shortpath"
35631  # Check if we need to convert this using DOS-style short mode. If the path
35632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35633  # take no chances and rewrite it.
35634  # Note: m4 eats our [], so we need to use [ and ] instead.
35635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35636  if test "x$has_forbidden_chars" != x; then
35637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35641      # Going to short mode and back again did indeed matter. Since short mode is
35642      # case insensitive, let's make it lowercase to improve readability.
35643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35644      # Now convert it back to Unix-style (cygpath)
35645      input_path=`$CYGPATH -u "$shortmode_path"`
35646      new_path="$input_path"
35647    fi
35648  fi
35649
35650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35651  if test "x$test_cygdrive_prefix" = x; then
35652    # As a simple fix, exclude /usr/bin since it's not a real path.
35653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35655      # a path prefixed by /cygdrive for fixpath to work.
35656      new_path="$CYGWIN_ROOT_PATH$input_path"
35657    fi
35658  fi
35659
35660  # remove trailing .exe if any
35661  new_path="${new_path/%.exe/}"
35662
35663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35664
35665  # First separate the path from the arguments. This will split at the first
35666  # space.
35667  complete="$CPP"
35668  path="${complete%% *}"
35669  tmp="$complete EOL"
35670  arguments="${tmp#* }"
35671
35672  # Input might be given as Windows format, start by converting to
35673  # unix format.
35674  new_path="$path"
35675
35676  windows_path="$new_path"
35677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35678    unix_path=`$CYGPATH -u "$windows_path"`
35679    new_path="$unix_path"
35680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35682    new_path="$unix_path"
35683  fi
35684
35685
35686  # Now try to locate executable using which
35687  new_path=`$WHICH "$new_path" 2> /dev/null`
35688
35689  if test "x$new_path" = x; then
35690    # Oops. Which didn't find the executable.
35691    # The splitting of arguments from the executable at a space might have been incorrect,
35692    # since paths with space are more likely in Windows. Give it another try with the whole
35693    # argument.
35694    path="$complete"
35695    arguments="EOL"
35696    new_path="$path"
35697
35698  windows_path="$new_path"
35699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35700    unix_path=`$CYGPATH -u "$windows_path"`
35701    new_path="$unix_path"
35702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35704    new_path="$unix_path"
35705  fi
35706
35707
35708    new_path=`$WHICH "$new_path" 2> /dev/null`
35709    # bat and cmd files are not always considered executable in MSYS causing which
35710    # to not find them
35711    if test "x$new_path" = x \
35712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35714      new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725    fi
35726
35727    if test "x$new_path" = x; then
35728      # It's still not found. Now this is an unrecoverable error.
35729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35730$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35731      has_space=`$ECHO "$complete" | $GREP " "`
35732      if test "x$has_space" != x; then
35733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35735      fi
35736      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35737    fi
35738  fi
35739
35740  # Now new_path has a complete unix path to the binary
35741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35742    # Keep paths in /bin as-is, but remove trailing .exe if any
35743    new_path="${new_path/%.exe/}"
35744    # Do not save /bin paths to all_fixpath_prefixes!
35745  else
35746    # Not in mixed or Windows style, start by that.
35747    new_path=`cmd //c echo $new_path`
35748
35749  input_path="$new_path"
35750  # Check if we need to convert this using DOS-style short mode. If the path
35751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35752  # take no chances and rewrite it.
35753  # Note: m4 eats our [], so we need to use [ and ] instead.
35754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35755  if test "x$has_forbidden_chars" != x; then
35756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35758  fi
35759
35760    # Output is in $new_path
35761
35762  windows_path="$new_path"
35763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35764    unix_path=`$CYGPATH -u "$windows_path"`
35765    new_path="$unix_path"
35766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35768    new_path="$unix_path"
35769  fi
35770
35771    # remove trailing .exe if any
35772    new_path="${new_path/%.exe/}"
35773
35774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35776  fi
35777
35778    else
35779      # We're on a unix platform. Hooray! :)
35780      # First separate the path from the arguments. This will split at the first
35781      # space.
35782      complete="$CPP"
35783      path="${complete%% *}"
35784      tmp="$complete EOL"
35785      arguments="${tmp#* }"
35786
35787      # Cannot rely on the command "which" here since it doesn't always work.
35788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35789      if test -z "$is_absolute_path"; then
35790        # Path to executable is not absolute. Find it.
35791        IFS_save="$IFS"
35792        IFS=:
35793        for p in $PATH; do
35794          if test -f "$p/$path" && test -x "$p/$path"; then
35795            new_path="$p/$path"
35796            break
35797          fi
35798        done
35799        IFS="$IFS_save"
35800      else
35801        # This is an absolute path, we can use it without further modifications.
35802        new_path="$path"
35803      fi
35804
35805      if test "x$new_path" = x; then
35806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35807$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35808        has_space=`$ECHO "$complete" | $GREP " "`
35809        if test "x$has_space" != x; then
35810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35812        fi
35813        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35814      fi
35815    fi
35816
35817    # Now join together the path and the arguments once again
35818    if test "x$arguments" != xEOL; then
35819      new_complete="$new_path ${arguments% *}"
35820    else
35821      new_complete="$new_path"
35822    fi
35823
35824    if test "x$complete" != "x$new_complete"; then
35825      CPP="$new_complete"
35826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35827$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35828    fi
35829  fi
35830
35831  ac_ext=cpp
35832ac_cpp='$CXXCPP $CPPFLAGS'
35833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35837$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35838if test -z "$CXXCPP"; then
35839  if ${ac_cv_prog_CXXCPP+:} false; then :
35840  $as_echo_n "(cached) " >&6
35841else
35842      # Double quotes because CXXCPP needs to be expanded
35843    for CXXCPP in "$CXX -E" "/lib/cpp"
35844    do
35845      ac_preproc_ok=false
35846for ac_cxx_preproc_warn_flag in '' yes
35847do
35848  # Use a header file that comes with gcc, so configuring glibc
35849  # with a fresh cross-compiler works.
35850  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35851  # <limits.h> exists even on freestanding compilers.
35852  # On the NeXT, cc -E runs the code through the compiler's parser,
35853  # not just through cpp. "Syntax error" is here to catch this case.
35854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35855/* end confdefs.h.  */
35856#ifdef __STDC__
35857# include <limits.h>
35858#else
35859# include <assert.h>
35860#endif
35861		     Syntax error
35862_ACEOF
35863if ac_fn_cxx_try_cpp "$LINENO"; then :
35864
35865else
35866  # Broken: fails on valid input.
35867continue
35868fi
35869rm -f conftest.err conftest.i conftest.$ac_ext
35870
35871  # OK, works on sane cases.  Now check whether nonexistent headers
35872  # can be detected and how.
35873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35874/* end confdefs.h.  */
35875#include <ac_nonexistent.h>
35876_ACEOF
35877if ac_fn_cxx_try_cpp "$LINENO"; then :
35878  # Broken: success on invalid input.
35879continue
35880else
35881  # Passes both tests.
35882ac_preproc_ok=:
35883break
35884fi
35885rm -f conftest.err conftest.i conftest.$ac_ext
35886
35887done
35888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35889rm -f conftest.i conftest.err conftest.$ac_ext
35890if $ac_preproc_ok; then :
35891  break
35892fi
35893
35894    done
35895    ac_cv_prog_CXXCPP=$CXXCPP
35896
35897fi
35898  CXXCPP=$ac_cv_prog_CXXCPP
35899else
35900  ac_cv_prog_CXXCPP=$CXXCPP
35901fi
35902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35903$as_echo "$CXXCPP" >&6; }
35904ac_preproc_ok=false
35905for ac_cxx_preproc_warn_flag in '' yes
35906do
35907  # Use a header file that comes with gcc, so configuring glibc
35908  # with a fresh cross-compiler works.
35909  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35910  # <limits.h> exists even on freestanding compilers.
35911  # On the NeXT, cc -E runs the code through the compiler's parser,
35912  # not just through cpp. "Syntax error" is here to catch this case.
35913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35914/* end confdefs.h.  */
35915#ifdef __STDC__
35916# include <limits.h>
35917#else
35918# include <assert.h>
35919#endif
35920		     Syntax error
35921_ACEOF
35922if ac_fn_cxx_try_cpp "$LINENO"; then :
35923
35924else
35925  # Broken: fails on valid input.
35926continue
35927fi
35928rm -f conftest.err conftest.i conftest.$ac_ext
35929
35930  # OK, works on sane cases.  Now check whether nonexistent headers
35931  # can be detected and how.
35932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35933/* end confdefs.h.  */
35934#include <ac_nonexistent.h>
35935_ACEOF
35936if ac_fn_cxx_try_cpp "$LINENO"; then :
35937  # Broken: success on invalid input.
35938continue
35939else
35940  # Passes both tests.
35941ac_preproc_ok=:
35942break
35943fi
35944rm -f conftest.err conftest.i conftest.$ac_ext
35945
35946done
35947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35948rm -f conftest.i conftest.err conftest.$ac_ext
35949if $ac_preproc_ok; then :
35950
35951else
35952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35954as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35955See \`config.log' for more details" "$LINENO" 5; }
35956fi
35957
35958ac_ext=cpp
35959ac_cpp='$CXXCPP $CPPFLAGS'
35960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35963
35964
35965  # Only process if variable expands to non-empty
35966
35967  if test "x$CXXCPP" != x; then
35968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35969
35970  # First separate the path from the arguments. This will split at the first
35971  # space.
35972  complete="$CXXCPP"
35973  path="${complete%% *}"
35974  tmp="$complete EOL"
35975  arguments="${tmp#* }"
35976
35977  # Input might be given as Windows format, start by converting to
35978  # unix format.
35979  new_path=`$CYGPATH -u "$path"`
35980
35981  # Now try to locate executable using which
35982  new_path=`$WHICH "$new_path" 2> /dev/null`
35983  # bat and cmd files are not always considered executable in cygwin causing which
35984  # to not find them
35985  if test "x$new_path" = x \
35986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35988    new_path=`$CYGPATH -u "$path"`
35989  fi
35990  if test "x$new_path" = x; then
35991    # Oops. Which didn't find the executable.
35992    # The splitting of arguments from the executable at a space might have been incorrect,
35993    # since paths with space are more likely in Windows. Give it another try with the whole
35994    # argument.
35995    path="$complete"
35996    arguments="EOL"
35997    new_path=`$CYGPATH -u "$path"`
35998    new_path=`$WHICH "$new_path" 2> /dev/null`
35999    # bat and cmd files are not always considered executable in cygwin causing which
36000    # to not find them
36001    if test "x$new_path" = x \
36002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36004      new_path=`$CYGPATH -u "$path"`
36005    fi
36006    if test "x$new_path" = x; then
36007      # It's still not found. Now this is an unrecoverable error.
36008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36009$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36010      has_space=`$ECHO "$complete" | $GREP " "`
36011      if test "x$has_space" != x; then
36012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36014      fi
36015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36016    fi
36017  fi
36018
36019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36022  # "foo.exe" is OK but "foo" is an error.
36023  #
36024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36025  # It is also a way to make sure we got the proper file name for the real test later on.
36026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36027  if test "x$test_shortpath" = x; then
36028    # Short path failed, file does not exist as specified.
36029    # Try adding .exe or .cmd
36030    if test -f "${new_path}.exe"; then
36031      input_to_shortpath="${new_path}.exe"
36032    elif test -f "${new_path}.cmd"; then
36033      input_to_shortpath="${new_path}.cmd"
36034    else
36035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36036$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36039      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36040    fi
36041  else
36042    input_to_shortpath="$new_path"
36043  fi
36044
36045  # Call helper function which possibly converts this using DOS-style short mode.
36046  # If so, the updated path is stored in $new_path.
36047  new_path="$input_to_shortpath"
36048
36049  input_path="$input_to_shortpath"
36050  # Check if we need to convert this using DOS-style short mode. If the path
36051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36052  # take no chances and rewrite it.
36053  # Note: m4 eats our [], so we need to use [ and ] instead.
36054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36055  if test "x$has_forbidden_chars" != x; then
36056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36060      # Going to short mode and back again did indeed matter. Since short mode is
36061      # case insensitive, let's make it lowercase to improve readability.
36062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36063      # Now convert it back to Unix-style (cygpath)
36064      input_path=`$CYGPATH -u "$shortmode_path"`
36065      new_path="$input_path"
36066    fi
36067  fi
36068
36069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36070  if test "x$test_cygdrive_prefix" = x; then
36071    # As a simple fix, exclude /usr/bin since it's not a real path.
36072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36074      # a path prefixed by /cygdrive for fixpath to work.
36075      new_path="$CYGWIN_ROOT_PATH$input_path"
36076    fi
36077  fi
36078
36079  # remove trailing .exe if any
36080  new_path="${new_path/%.exe/}"
36081
36082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36083
36084  # First separate the path from the arguments. This will split at the first
36085  # space.
36086  complete="$CXXCPP"
36087  path="${complete%% *}"
36088  tmp="$complete EOL"
36089  arguments="${tmp#* }"
36090
36091  # Input might be given as Windows format, start by converting to
36092  # unix format.
36093  new_path="$path"
36094
36095  windows_path="$new_path"
36096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36097    unix_path=`$CYGPATH -u "$windows_path"`
36098    new_path="$unix_path"
36099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36101    new_path="$unix_path"
36102  fi
36103
36104
36105  # Now try to locate executable using which
36106  new_path=`$WHICH "$new_path" 2> /dev/null`
36107
36108  if test "x$new_path" = x; then
36109    # Oops. Which didn't find the executable.
36110    # The splitting of arguments from the executable at a space might have been incorrect,
36111    # since paths with space are more likely in Windows. Give it another try with the whole
36112    # argument.
36113    path="$complete"
36114    arguments="EOL"
36115    new_path="$path"
36116
36117  windows_path="$new_path"
36118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36119    unix_path=`$CYGPATH -u "$windows_path"`
36120    new_path="$unix_path"
36121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36123    new_path="$unix_path"
36124  fi
36125
36126
36127    new_path=`$WHICH "$new_path" 2> /dev/null`
36128    # bat and cmd files are not always considered executable in MSYS causing which
36129    # to not find them
36130    if test "x$new_path" = x \
36131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36133      new_path="$path"
36134
36135  windows_path="$new_path"
36136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36137    unix_path=`$CYGPATH -u "$windows_path"`
36138    new_path="$unix_path"
36139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36141    new_path="$unix_path"
36142  fi
36143
36144    fi
36145
36146    if test "x$new_path" = x; then
36147      # It's still not found. Now this is an unrecoverable error.
36148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36149$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36150      has_space=`$ECHO "$complete" | $GREP " "`
36151      if test "x$has_space" != x; then
36152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36154      fi
36155      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36156    fi
36157  fi
36158
36159  # Now new_path has a complete unix path to the binary
36160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36161    # Keep paths in /bin as-is, but remove trailing .exe if any
36162    new_path="${new_path/%.exe/}"
36163    # Do not save /bin paths to all_fixpath_prefixes!
36164  else
36165    # Not in mixed or Windows style, start by that.
36166    new_path=`cmd //c echo $new_path`
36167
36168  input_path="$new_path"
36169  # Check if we need to convert this using DOS-style short mode. If the path
36170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36171  # take no chances and rewrite it.
36172  # Note: m4 eats our [], so we need to use [ and ] instead.
36173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36174  if test "x$has_forbidden_chars" != x; then
36175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36177  fi
36178
36179    # Output is in $new_path
36180
36181  windows_path="$new_path"
36182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36183    unix_path=`$CYGPATH -u "$windows_path"`
36184    new_path="$unix_path"
36185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36187    new_path="$unix_path"
36188  fi
36189
36190    # remove trailing .exe if any
36191    new_path="${new_path/%.exe/}"
36192
36193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36195  fi
36196
36197    else
36198      # We're on a unix platform. Hooray! :)
36199      # First separate the path from the arguments. This will split at the first
36200      # space.
36201      complete="$CXXCPP"
36202      path="${complete%% *}"
36203      tmp="$complete EOL"
36204      arguments="${tmp#* }"
36205
36206      # Cannot rely on the command "which" here since it doesn't always work.
36207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36208      if test -z "$is_absolute_path"; then
36209        # Path to executable is not absolute. Find it.
36210        IFS_save="$IFS"
36211        IFS=:
36212        for p in $PATH; do
36213          if test -f "$p/$path" && test -x "$p/$path"; then
36214            new_path="$p/$path"
36215            break
36216          fi
36217        done
36218        IFS="$IFS_save"
36219      else
36220        # This is an absolute path, we can use it without further modifications.
36221        new_path="$path"
36222      fi
36223
36224      if test "x$new_path" = x; then
36225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36226$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36227        has_space=`$ECHO "$complete" | $GREP " "`
36228        if test "x$has_space" != x; then
36229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36231        fi
36232        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36233      fi
36234    fi
36235
36236    # Now join together the path and the arguments once again
36237    if test "x$arguments" != xEOL; then
36238      new_complete="$new_path ${arguments% *}"
36239    else
36240      new_complete="$new_path"
36241    fi
36242
36243    if test "x$complete" != "x$new_complete"; then
36244      CXXCPP="$new_complete"
36245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36246$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36247    fi
36248  fi
36249
36250
36251  #
36252  # Setup the linker (LD)
36253  #
36254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36255    # In the Microsoft toolchain we have a separate LD command "link".
36256    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36257    # a cygwin program for something completely different.
36258    # Extract the first word of "link", so it can be a program name with args.
36259set dummy link; ac_word=$2
36260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36261$as_echo_n "checking for $ac_word... " >&6; }
36262if ${ac_cv_prog_LD+:} false; then :
36263  $as_echo_n "(cached) " >&6
36264else
36265  if test -n "$LD"; then
36266  ac_cv_prog_LD="$LD" # Let the user override the test.
36267else
36268  ac_prog_rejected=no
36269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36270for as_dir in $PATH
36271do
36272  IFS=$as_save_IFS
36273  test -z "$as_dir" && as_dir=.
36274    for ac_exec_ext in '' $ac_executable_extensions; do
36275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36276    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36277       ac_prog_rejected=yes
36278       continue
36279     fi
36280    ac_cv_prog_LD="link"
36281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36282    break 2
36283  fi
36284done
36285  done
36286IFS=$as_save_IFS
36287
36288if test $ac_prog_rejected = yes; then
36289  # We found a bogon in the path, so make sure we never use it.
36290  set dummy $ac_cv_prog_LD
36291  shift
36292  if test $# != 0; then
36293    # We chose a different compiler from the bogus one.
36294    # However, it has the same basename, so the bogon will be chosen
36295    # first if we set LD to just the basename; use the full file name.
36296    shift
36297    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36298  fi
36299fi
36300fi
36301fi
36302LD=$ac_cv_prog_LD
36303if test -n "$LD"; then
36304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36305$as_echo "$LD" >&6; }
36306else
36307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36308$as_echo "no" >&6; }
36309fi
36310
36311
36312
36313  # Only process if variable expands to non-empty
36314
36315  if test "x$LD" != x; then
36316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36317
36318  # First separate the path from the arguments. This will split at the first
36319  # space.
36320  complete="$LD"
36321  path="${complete%% *}"
36322  tmp="$complete EOL"
36323  arguments="${tmp#* }"
36324
36325  # Input might be given as Windows format, start by converting to
36326  # unix format.
36327  new_path=`$CYGPATH -u "$path"`
36328
36329  # Now try to locate executable using which
36330  new_path=`$WHICH "$new_path" 2> /dev/null`
36331  # bat and cmd files are not always considered executable in cygwin causing which
36332  # to not find them
36333  if test "x$new_path" = x \
36334      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36335      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36336    new_path=`$CYGPATH -u "$path"`
36337  fi
36338  if test "x$new_path" = x; then
36339    # Oops. Which didn't find the executable.
36340    # The splitting of arguments from the executable at a space might have been incorrect,
36341    # since paths with space are more likely in Windows. Give it another try with the whole
36342    # argument.
36343    path="$complete"
36344    arguments="EOL"
36345    new_path=`$CYGPATH -u "$path"`
36346    new_path=`$WHICH "$new_path" 2> /dev/null`
36347    # bat and cmd files are not always considered executable in cygwin causing which
36348    # to not find them
36349    if test "x$new_path" = x \
36350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36352      new_path=`$CYGPATH -u "$path"`
36353    fi
36354    if test "x$new_path" = x; then
36355      # It's still not found. Now this is an unrecoverable error.
36356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36357$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36358      has_space=`$ECHO "$complete" | $GREP " "`
36359      if test "x$has_space" != x; then
36360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36362      fi
36363      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36364    fi
36365  fi
36366
36367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36370  # "foo.exe" is OK but "foo" is an error.
36371  #
36372  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36373  # It is also a way to make sure we got the proper file name for the real test later on.
36374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36375  if test "x$test_shortpath" = x; then
36376    # Short path failed, file does not exist as specified.
36377    # Try adding .exe or .cmd
36378    if test -f "${new_path}.exe"; then
36379      input_to_shortpath="${new_path}.exe"
36380    elif test -f "${new_path}.cmd"; then
36381      input_to_shortpath="${new_path}.cmd"
36382    else
36383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36384$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36387      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36388    fi
36389  else
36390    input_to_shortpath="$new_path"
36391  fi
36392
36393  # Call helper function which possibly converts this using DOS-style short mode.
36394  # If so, the updated path is stored in $new_path.
36395  new_path="$input_to_shortpath"
36396
36397  input_path="$input_to_shortpath"
36398  # Check if we need to convert this using DOS-style short mode. If the path
36399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36400  # take no chances and rewrite it.
36401  # Note: m4 eats our [], so we need to use [ and ] instead.
36402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36403  if test "x$has_forbidden_chars" != x; then
36404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36408      # Going to short mode and back again did indeed matter. Since short mode is
36409      # case insensitive, let's make it lowercase to improve readability.
36410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36411      # Now convert it back to Unix-style (cygpath)
36412      input_path=`$CYGPATH -u "$shortmode_path"`
36413      new_path="$input_path"
36414    fi
36415  fi
36416
36417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36418  if test "x$test_cygdrive_prefix" = x; then
36419    # As a simple fix, exclude /usr/bin since it's not a real path.
36420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36422      # a path prefixed by /cygdrive for fixpath to work.
36423      new_path="$CYGWIN_ROOT_PATH$input_path"
36424    fi
36425  fi
36426
36427  # remove trailing .exe if any
36428  new_path="${new_path/%.exe/}"
36429
36430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36431
36432  # First separate the path from the arguments. This will split at the first
36433  # space.
36434  complete="$LD"
36435  path="${complete%% *}"
36436  tmp="$complete EOL"
36437  arguments="${tmp#* }"
36438
36439  # Input might be given as Windows format, start by converting to
36440  # unix format.
36441  new_path="$path"
36442
36443  windows_path="$new_path"
36444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36445    unix_path=`$CYGPATH -u "$windows_path"`
36446    new_path="$unix_path"
36447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36449    new_path="$unix_path"
36450  fi
36451
36452
36453  # Now try to locate executable using which
36454  new_path=`$WHICH "$new_path" 2> /dev/null`
36455
36456  if test "x$new_path" = x; then
36457    # Oops. Which didn't find the executable.
36458    # The splitting of arguments from the executable at a space might have been incorrect,
36459    # since paths with space are more likely in Windows. Give it another try with the whole
36460    # argument.
36461    path="$complete"
36462    arguments="EOL"
36463    new_path="$path"
36464
36465  windows_path="$new_path"
36466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36467    unix_path=`$CYGPATH -u "$windows_path"`
36468    new_path="$unix_path"
36469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36471    new_path="$unix_path"
36472  fi
36473
36474
36475    new_path=`$WHICH "$new_path" 2> /dev/null`
36476    # bat and cmd files are not always considered executable in MSYS causing which
36477    # to not find them
36478    if test "x$new_path" = x \
36479        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36480        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36481      new_path="$path"
36482
36483  windows_path="$new_path"
36484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36485    unix_path=`$CYGPATH -u "$windows_path"`
36486    new_path="$unix_path"
36487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36489    new_path="$unix_path"
36490  fi
36491
36492    fi
36493
36494    if test "x$new_path" = x; then
36495      # It's still not found. Now this is an unrecoverable error.
36496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36497$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36498      has_space=`$ECHO "$complete" | $GREP " "`
36499      if test "x$has_space" != x; then
36500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36502      fi
36503      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36504    fi
36505  fi
36506
36507  # Now new_path has a complete unix path to the binary
36508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36509    # Keep paths in /bin as-is, but remove trailing .exe if any
36510    new_path="${new_path/%.exe/}"
36511    # Do not save /bin paths to all_fixpath_prefixes!
36512  else
36513    # Not in mixed or Windows style, start by that.
36514    new_path=`cmd //c echo $new_path`
36515
36516  input_path="$new_path"
36517  # Check if we need to convert this using DOS-style short mode. If the path
36518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36519  # take no chances and rewrite it.
36520  # Note: m4 eats our [], so we need to use [ and ] instead.
36521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36522  if test "x$has_forbidden_chars" != x; then
36523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36525  fi
36526
36527    # Output is in $new_path
36528
36529  windows_path="$new_path"
36530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36531    unix_path=`$CYGPATH -u "$windows_path"`
36532    new_path="$unix_path"
36533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36535    new_path="$unix_path"
36536  fi
36537
36538    # remove trailing .exe if any
36539    new_path="${new_path/%.exe/}"
36540
36541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36543  fi
36544
36545    else
36546      # We're on a unix platform. Hooray! :)
36547      # First separate the path from the arguments. This will split at the first
36548      # space.
36549      complete="$LD"
36550      path="${complete%% *}"
36551      tmp="$complete EOL"
36552      arguments="${tmp#* }"
36553
36554      # Cannot rely on the command "which" here since it doesn't always work.
36555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36556      if test -z "$is_absolute_path"; then
36557        # Path to executable is not absolute. Find it.
36558        IFS_save="$IFS"
36559        IFS=:
36560        for p in $PATH; do
36561          if test -f "$p/$path" && test -x "$p/$path"; then
36562            new_path="$p/$path"
36563            break
36564          fi
36565        done
36566        IFS="$IFS_save"
36567      else
36568        # This is an absolute path, we can use it without further modifications.
36569        new_path="$path"
36570      fi
36571
36572      if test "x$new_path" = x; then
36573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36574$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36575        has_space=`$ECHO "$complete" | $GREP " "`
36576        if test "x$has_space" != x; then
36577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36579        fi
36580        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36581      fi
36582    fi
36583
36584    # Now join together the path and the arguments once again
36585    if test "x$arguments" != xEOL; then
36586      new_complete="$new_path ${arguments% *}"
36587    else
36588      new_complete="$new_path"
36589    fi
36590
36591    if test "x$complete" != "x$new_complete"; then
36592      LD="$new_complete"
36593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36594$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36595    fi
36596  fi
36597
36598    # Verify that we indeed succeeded with this trick.
36599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36600$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36601    "$LD" --version > /dev/null
36602    if test $? -eq 0 ; then
36603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36604$as_echo "no" >&6; }
36605      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36606    else
36607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36608$as_echo "yes" >&6; }
36609    fi
36610    LDCXX="$LD"
36611  else
36612    # All other toolchains use the compiler to link.
36613    LD="$CC"
36614    LDCXX="$CXX"
36615  fi
36616
36617  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36618
36619
36620  #
36621  # Setup the assembler (AS)
36622  #
36623  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36624
36625
36626  # Publish this variable in the help.
36627
36628
36629  if [ -z "${AS+x}" ]; then
36630    # The variable is not set by user, try to locate tool using the code snippet
36631    for ac_prog in as
36632do
36633  # Extract the first word of "$ac_prog", so it can be a program name with args.
36634set dummy $ac_prog; ac_word=$2
36635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36636$as_echo_n "checking for $ac_word... " >&6; }
36637if ${ac_cv_path_AS+:} false; then :
36638  $as_echo_n "(cached) " >&6
36639else
36640  case $AS in
36641  [\\/]* | ?:[\\/]*)
36642  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36643  ;;
36644  *)
36645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36646for as_dir in $PATH
36647do
36648  IFS=$as_save_IFS
36649  test -z "$as_dir" && as_dir=.
36650    for ac_exec_ext in '' $ac_executable_extensions; do
36651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36652    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36654    break 2
36655  fi
36656done
36657  done
36658IFS=$as_save_IFS
36659
36660  ;;
36661esac
36662fi
36663AS=$ac_cv_path_AS
36664if test -n "$AS"; then
36665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36666$as_echo "$AS" >&6; }
36667else
36668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36669$as_echo "no" >&6; }
36670fi
36671
36672
36673  test -n "$AS" && break
36674done
36675
36676  else
36677    # The variable is set, but is it from the command line or the environment?
36678
36679    # Try to remove the string !AS! from our list.
36680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36682      # If it failed, the variable was not from the command line. Ignore it,
36683      # but warn the user (except for BASH, which is always set by the calling BASH).
36684      if test "xAS" != xBASH; then
36685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36686$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36687      fi
36688      # Try to locate tool using the code snippet
36689      for ac_prog in as
36690do
36691  # Extract the first word of "$ac_prog", so it can be a program name with args.
36692set dummy $ac_prog; ac_word=$2
36693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36694$as_echo_n "checking for $ac_word... " >&6; }
36695if ${ac_cv_path_AS+:} false; then :
36696  $as_echo_n "(cached) " >&6
36697else
36698  case $AS in
36699  [\\/]* | ?:[\\/]*)
36700  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36701  ;;
36702  *)
36703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36704for as_dir in $PATH
36705do
36706  IFS=$as_save_IFS
36707  test -z "$as_dir" && as_dir=.
36708    for ac_exec_ext in '' $ac_executable_extensions; do
36709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36710    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36712    break 2
36713  fi
36714done
36715  done
36716IFS=$as_save_IFS
36717
36718  ;;
36719esac
36720fi
36721AS=$ac_cv_path_AS
36722if test -n "$AS"; then
36723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36724$as_echo "$AS" >&6; }
36725else
36726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36727$as_echo "no" >&6; }
36728fi
36729
36730
36731  test -n "$AS" && break
36732done
36733
36734    else
36735      # If it succeeded, then it was overridden by the user. We will use it
36736      # for the tool.
36737
36738      # First remove it from the list of overridden variables, so we can test
36739      # for unknown variables in the end.
36740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36741
36742      # Check if we try to supply an empty value
36743      if test "x$AS" = x; then
36744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36745$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36747$as_echo_n "checking for AS... " >&6; }
36748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36749$as_echo "disabled" >&6; }
36750      else
36751        # Check if the provided tool contains a complete path.
36752        tool_specified="$AS"
36753        tool_basename="${tool_specified##*/}"
36754        if test "x$tool_basename" = "x$tool_specified"; then
36755          # A command without a complete path is provided, search $PATH.
36756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36757$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36758          # Extract the first word of "$tool_basename", so it can be a program name with args.
36759set dummy $tool_basename; ac_word=$2
36760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36761$as_echo_n "checking for $ac_word... " >&6; }
36762if ${ac_cv_path_AS+:} false; then :
36763  $as_echo_n "(cached) " >&6
36764else
36765  case $AS in
36766  [\\/]* | ?:[\\/]*)
36767  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36768  ;;
36769  *)
36770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36771for as_dir in $PATH
36772do
36773  IFS=$as_save_IFS
36774  test -z "$as_dir" && as_dir=.
36775    for ac_exec_ext in '' $ac_executable_extensions; do
36776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36777    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36779    break 2
36780  fi
36781done
36782  done
36783IFS=$as_save_IFS
36784
36785  ;;
36786esac
36787fi
36788AS=$ac_cv_path_AS
36789if test -n "$AS"; then
36790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36791$as_echo "$AS" >&6; }
36792else
36793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36794$as_echo "no" >&6; }
36795fi
36796
36797
36798          if test "x$AS" = x; then
36799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36800          fi
36801        else
36802          # Otherwise we believe it is a complete path. Use it as it is.
36803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36804$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36806$as_echo_n "checking for AS... " >&6; }
36807          if test ! -x "$tool_specified"; then
36808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36809$as_echo "not found" >&6; }
36810            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36811          fi
36812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36813$as_echo "$tool_specified" >&6; }
36814        fi
36815      fi
36816    fi
36817
36818  fi
36819
36820
36821
36822  # Only process if variable expands to non-empty
36823
36824  if test "x$AS" != x; then
36825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36826
36827  # First separate the path from the arguments. This will split at the first
36828  # space.
36829  complete="$AS"
36830  path="${complete%% *}"
36831  tmp="$complete EOL"
36832  arguments="${tmp#* }"
36833
36834  # Input might be given as Windows format, start by converting to
36835  # unix format.
36836  new_path=`$CYGPATH -u "$path"`
36837
36838  # Now try to locate executable using which
36839  new_path=`$WHICH "$new_path" 2> /dev/null`
36840  # bat and cmd files are not always considered executable in cygwin causing which
36841  # to not find them
36842  if test "x$new_path" = x \
36843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36845    new_path=`$CYGPATH -u "$path"`
36846  fi
36847  if test "x$new_path" = x; then
36848    # Oops. Which didn't find the executable.
36849    # The splitting of arguments from the executable at a space might have been incorrect,
36850    # since paths with space are more likely in Windows. Give it another try with the whole
36851    # argument.
36852    path="$complete"
36853    arguments="EOL"
36854    new_path=`$CYGPATH -u "$path"`
36855    new_path=`$WHICH "$new_path" 2> /dev/null`
36856    # bat and cmd files are not always considered executable in cygwin causing which
36857    # to not find them
36858    if test "x$new_path" = x \
36859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36861      new_path=`$CYGPATH -u "$path"`
36862    fi
36863    if test "x$new_path" = x; then
36864      # It's still not found. Now this is an unrecoverable error.
36865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36866$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36867      has_space=`$ECHO "$complete" | $GREP " "`
36868      if test "x$has_space" != x; then
36869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36871      fi
36872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36873    fi
36874  fi
36875
36876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36879  # "foo.exe" is OK but "foo" is an error.
36880  #
36881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36882  # It is also a way to make sure we got the proper file name for the real test later on.
36883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36884  if test "x$test_shortpath" = x; then
36885    # Short path failed, file does not exist as specified.
36886    # Try adding .exe or .cmd
36887    if test -f "${new_path}.exe"; then
36888      input_to_shortpath="${new_path}.exe"
36889    elif test -f "${new_path}.cmd"; then
36890      input_to_shortpath="${new_path}.cmd"
36891    else
36892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36893$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36896      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36897    fi
36898  else
36899    input_to_shortpath="$new_path"
36900  fi
36901
36902  # Call helper function which possibly converts this using DOS-style short mode.
36903  # If so, the updated path is stored in $new_path.
36904  new_path="$input_to_shortpath"
36905
36906  input_path="$input_to_shortpath"
36907  # Check if we need to convert this using DOS-style short mode. If the path
36908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36909  # take no chances and rewrite it.
36910  # Note: m4 eats our [], so we need to use [ and ] instead.
36911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36912  if test "x$has_forbidden_chars" != x; then
36913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36917      # Going to short mode and back again did indeed matter. Since short mode is
36918      # case insensitive, let's make it lowercase to improve readability.
36919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36920      # Now convert it back to Unix-style (cygpath)
36921      input_path=`$CYGPATH -u "$shortmode_path"`
36922      new_path="$input_path"
36923    fi
36924  fi
36925
36926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36927  if test "x$test_cygdrive_prefix" = x; then
36928    # As a simple fix, exclude /usr/bin since it's not a real path.
36929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36931      # a path prefixed by /cygdrive for fixpath to work.
36932      new_path="$CYGWIN_ROOT_PATH$input_path"
36933    fi
36934  fi
36935
36936  # remove trailing .exe if any
36937  new_path="${new_path/%.exe/}"
36938
36939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36940
36941  # First separate the path from the arguments. This will split at the first
36942  # space.
36943  complete="$AS"
36944  path="${complete%% *}"
36945  tmp="$complete EOL"
36946  arguments="${tmp#* }"
36947
36948  # Input might be given as Windows format, start by converting to
36949  # unix format.
36950  new_path="$path"
36951
36952  windows_path="$new_path"
36953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36954    unix_path=`$CYGPATH -u "$windows_path"`
36955    new_path="$unix_path"
36956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36958    new_path="$unix_path"
36959  fi
36960
36961
36962  # Now try to locate executable using which
36963  new_path=`$WHICH "$new_path" 2> /dev/null`
36964
36965  if test "x$new_path" = x; then
36966    # Oops. Which didn't find the executable.
36967    # The splitting of arguments from the executable at a space might have been incorrect,
36968    # since paths with space are more likely in Windows. Give it another try with the whole
36969    # argument.
36970    path="$complete"
36971    arguments="EOL"
36972    new_path="$path"
36973
36974  windows_path="$new_path"
36975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36976    unix_path=`$CYGPATH -u "$windows_path"`
36977    new_path="$unix_path"
36978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36980    new_path="$unix_path"
36981  fi
36982
36983
36984    new_path=`$WHICH "$new_path" 2> /dev/null`
36985    # bat and cmd files are not always considered executable in MSYS causing which
36986    # to not find them
36987    if test "x$new_path" = x \
36988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36990      new_path="$path"
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001    fi
37002
37003    if test "x$new_path" = x; then
37004      # It's still not found. Now this is an unrecoverable error.
37005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37006$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37007      has_space=`$ECHO "$complete" | $GREP " "`
37008      if test "x$has_space" != x; then
37009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37011      fi
37012      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37013    fi
37014  fi
37015
37016  # Now new_path has a complete unix path to the binary
37017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37018    # Keep paths in /bin as-is, but remove trailing .exe if any
37019    new_path="${new_path/%.exe/}"
37020    # Do not save /bin paths to all_fixpath_prefixes!
37021  else
37022    # Not in mixed or Windows style, start by that.
37023    new_path=`cmd //c echo $new_path`
37024
37025  input_path="$new_path"
37026  # Check if we need to convert this using DOS-style short mode. If the path
37027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37028  # take no chances and rewrite it.
37029  # Note: m4 eats our [], so we need to use [ and ] instead.
37030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37031  if test "x$has_forbidden_chars" != x; then
37032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37034  fi
37035
37036    # Output is in $new_path
37037
37038  windows_path="$new_path"
37039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37040    unix_path=`$CYGPATH -u "$windows_path"`
37041    new_path="$unix_path"
37042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37044    new_path="$unix_path"
37045  fi
37046
37047    # remove trailing .exe if any
37048    new_path="${new_path/%.exe/}"
37049
37050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37052  fi
37053
37054    else
37055      # We're on a unix platform. Hooray! :)
37056      # First separate the path from the arguments. This will split at the first
37057      # space.
37058      complete="$AS"
37059      path="${complete%% *}"
37060      tmp="$complete EOL"
37061      arguments="${tmp#* }"
37062
37063      # Cannot rely on the command "which" here since it doesn't always work.
37064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37065      if test -z "$is_absolute_path"; then
37066        # Path to executable is not absolute. Find it.
37067        IFS_save="$IFS"
37068        IFS=:
37069        for p in $PATH; do
37070          if test -f "$p/$path" && test -x "$p/$path"; then
37071            new_path="$p/$path"
37072            break
37073          fi
37074        done
37075        IFS="$IFS_save"
37076      else
37077        # This is an absolute path, we can use it without further modifications.
37078        new_path="$path"
37079      fi
37080
37081      if test "x$new_path" = x; then
37082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37083$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37084        has_space=`$ECHO "$complete" | $GREP " "`
37085        if test "x$has_space" != x; then
37086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37088        fi
37089        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37090      fi
37091    fi
37092
37093    # Now join together the path and the arguments once again
37094    if test "x$arguments" != xEOL; then
37095      new_complete="$new_path ${arguments% *}"
37096    else
37097      new_complete="$new_path"
37098    fi
37099
37100    if test "x$complete" != "x$new_complete"; then
37101      AS="$new_complete"
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37103$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37104    fi
37105  fi
37106
37107    if test "x$AS" = x; then
37108      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37109    fi
37110  else
37111    # FIXME: is this correct for microsoft?
37112    AS="$CC -c"
37113  fi
37114
37115
37116  #
37117  # Setup the archiver (AR)
37118  #
37119  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37120    # The corresponding ar tool is lib.exe (used to create static libraries)
37121    # Extract the first word of "lib", so it can be a program name with args.
37122set dummy lib; ac_word=$2
37123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37124$as_echo_n "checking for $ac_word... " >&6; }
37125if ${ac_cv_prog_AR+:} false; then :
37126  $as_echo_n "(cached) " >&6
37127else
37128  if test -n "$AR"; then
37129  ac_cv_prog_AR="$AR" # Let the user override the test.
37130else
37131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37132for as_dir in $PATH
37133do
37134  IFS=$as_save_IFS
37135  test -z "$as_dir" && as_dir=.
37136    for ac_exec_ext in '' $ac_executable_extensions; do
37137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37138    ac_cv_prog_AR="lib"
37139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37140    break 2
37141  fi
37142done
37143  done
37144IFS=$as_save_IFS
37145
37146fi
37147fi
37148AR=$ac_cv_prog_AR
37149if test -n "$AR"; then
37150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37151$as_echo "$AR" >&6; }
37152else
37153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37154$as_echo "no" >&6; }
37155fi
37156
37157
37158  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37159
37160
37161  # Publish this variable in the help.
37162
37163
37164  if [ -z "${AR+x}" ]; then
37165    # The variable is not set by user, try to locate tool using the code snippet
37166    if test -n "$ac_tool_prefix"; then
37167  for ac_prog in ar gcc-ar
37168  do
37169    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37170set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37172$as_echo_n "checking for $ac_word... " >&6; }
37173if ${ac_cv_prog_AR+:} false; then :
37174  $as_echo_n "(cached) " >&6
37175else
37176  if test -n "$AR"; then
37177  ac_cv_prog_AR="$AR" # Let the user override the test.
37178else
37179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37180for as_dir in $PATH
37181do
37182  IFS=$as_save_IFS
37183  test -z "$as_dir" && as_dir=.
37184    for ac_exec_ext in '' $ac_executable_extensions; do
37185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37186    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37188    break 2
37189  fi
37190done
37191  done
37192IFS=$as_save_IFS
37193
37194fi
37195fi
37196AR=$ac_cv_prog_AR
37197if test -n "$AR"; then
37198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37199$as_echo "$AR" >&6; }
37200else
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37202$as_echo "no" >&6; }
37203fi
37204
37205
37206    test -n "$AR" && break
37207  done
37208fi
37209if test -z "$AR"; then
37210  ac_ct_AR=$AR
37211  for ac_prog in ar gcc-ar
37212do
37213  # Extract the first word of "$ac_prog", so it can be a program name with args.
37214set dummy $ac_prog; ac_word=$2
37215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37216$as_echo_n "checking for $ac_word... " >&6; }
37217if ${ac_cv_prog_ac_ct_AR+:} false; then :
37218  $as_echo_n "(cached) " >&6
37219else
37220  if test -n "$ac_ct_AR"; then
37221  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37222else
37223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37224for as_dir in $PATH
37225do
37226  IFS=$as_save_IFS
37227  test -z "$as_dir" && as_dir=.
37228    for ac_exec_ext in '' $ac_executable_extensions; do
37229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37230    ac_cv_prog_ac_ct_AR="$ac_prog"
37231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37232    break 2
37233  fi
37234done
37235  done
37236IFS=$as_save_IFS
37237
37238fi
37239fi
37240ac_ct_AR=$ac_cv_prog_ac_ct_AR
37241if test -n "$ac_ct_AR"; then
37242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37243$as_echo "$ac_ct_AR" >&6; }
37244else
37245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37246$as_echo "no" >&6; }
37247fi
37248
37249
37250  test -n "$ac_ct_AR" && break
37251done
37252
37253  if test "x$ac_ct_AR" = x; then
37254    AR=""
37255  else
37256    case $cross_compiling:$ac_tool_warned in
37257yes:)
37258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37260ac_tool_warned=yes ;;
37261esac
37262    AR=$ac_ct_AR
37263  fi
37264fi
37265
37266  else
37267    # The variable is set, but is it from the command line or the environment?
37268
37269    # Try to remove the string !AR! from our list.
37270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37272      # If it failed, the variable was not from the command line. Ignore it,
37273      # but warn the user (except for BASH, which is always set by the calling BASH).
37274      if test "xAR" != xBASH; then
37275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37276$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37277      fi
37278      # Try to locate tool using the code snippet
37279      if test -n "$ac_tool_prefix"; then
37280  for ac_prog in ar gcc-ar
37281  do
37282    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37283set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37285$as_echo_n "checking for $ac_word... " >&6; }
37286if ${ac_cv_prog_AR+:} false; then :
37287  $as_echo_n "(cached) " >&6
37288else
37289  if test -n "$AR"; then
37290  ac_cv_prog_AR="$AR" # Let the user override the test.
37291else
37292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37293for as_dir in $PATH
37294do
37295  IFS=$as_save_IFS
37296  test -z "$as_dir" && as_dir=.
37297    for ac_exec_ext in '' $ac_executable_extensions; do
37298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37299    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37301    break 2
37302  fi
37303done
37304  done
37305IFS=$as_save_IFS
37306
37307fi
37308fi
37309AR=$ac_cv_prog_AR
37310if test -n "$AR"; then
37311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37312$as_echo "$AR" >&6; }
37313else
37314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37315$as_echo "no" >&6; }
37316fi
37317
37318
37319    test -n "$AR" && break
37320  done
37321fi
37322if test -z "$AR"; then
37323  ac_ct_AR=$AR
37324  for ac_prog in ar gcc-ar
37325do
37326  # Extract the first word of "$ac_prog", so it can be a program name with args.
37327set dummy $ac_prog; ac_word=$2
37328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37329$as_echo_n "checking for $ac_word... " >&6; }
37330if ${ac_cv_prog_ac_ct_AR+:} false; then :
37331  $as_echo_n "(cached) " >&6
37332else
37333  if test -n "$ac_ct_AR"; then
37334  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37335else
37336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37337for as_dir in $PATH
37338do
37339  IFS=$as_save_IFS
37340  test -z "$as_dir" && as_dir=.
37341    for ac_exec_ext in '' $ac_executable_extensions; do
37342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37343    ac_cv_prog_ac_ct_AR="$ac_prog"
37344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37345    break 2
37346  fi
37347done
37348  done
37349IFS=$as_save_IFS
37350
37351fi
37352fi
37353ac_ct_AR=$ac_cv_prog_ac_ct_AR
37354if test -n "$ac_ct_AR"; then
37355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37356$as_echo "$ac_ct_AR" >&6; }
37357else
37358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37359$as_echo "no" >&6; }
37360fi
37361
37362
37363  test -n "$ac_ct_AR" && break
37364done
37365
37366  if test "x$ac_ct_AR" = x; then
37367    AR=""
37368  else
37369    case $cross_compiling:$ac_tool_warned in
37370yes:)
37371{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37372$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37373ac_tool_warned=yes ;;
37374esac
37375    AR=$ac_ct_AR
37376  fi
37377fi
37378
37379    else
37380      # If it succeeded, then it was overridden by the user. We will use it
37381      # for the tool.
37382
37383      # First remove it from the list of overridden variables, so we can test
37384      # for unknown variables in the end.
37385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37386
37387      # Check if we try to supply an empty value
37388      if test "x$AR" = x; then
37389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37390$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37392$as_echo_n "checking for AR... " >&6; }
37393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37394$as_echo "disabled" >&6; }
37395      else
37396        # Check if the provided tool contains a complete path.
37397        tool_specified="$AR"
37398        tool_basename="${tool_specified##*/}"
37399        if test "x$tool_basename" = "x$tool_specified"; then
37400          # A command without a complete path is provided, search $PATH.
37401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37402$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37403          # Extract the first word of "$tool_basename", so it can be a program name with args.
37404set dummy $tool_basename; ac_word=$2
37405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37406$as_echo_n "checking for $ac_word... " >&6; }
37407if ${ac_cv_path_AR+:} false; then :
37408  $as_echo_n "(cached) " >&6
37409else
37410  case $AR in
37411  [\\/]* | ?:[\\/]*)
37412  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37413  ;;
37414  *)
37415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37416for as_dir in $PATH
37417do
37418  IFS=$as_save_IFS
37419  test -z "$as_dir" && as_dir=.
37420    for ac_exec_ext in '' $ac_executable_extensions; do
37421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37422    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37424    break 2
37425  fi
37426done
37427  done
37428IFS=$as_save_IFS
37429
37430  ;;
37431esac
37432fi
37433AR=$ac_cv_path_AR
37434if test -n "$AR"; then
37435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37436$as_echo "$AR" >&6; }
37437else
37438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37439$as_echo "no" >&6; }
37440fi
37441
37442
37443          if test "x$AR" = x; then
37444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37445          fi
37446        else
37447          # Otherwise we believe it is a complete path. Use it as it is.
37448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37449$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37451$as_echo_n "checking for AR... " >&6; }
37452          if test ! -x "$tool_specified"; then
37453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37454$as_echo "not found" >&6; }
37455            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37456          fi
37457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37458$as_echo "$tool_specified" >&6; }
37459        fi
37460      fi
37461    fi
37462
37463  fi
37464
37465
37466  else
37467
37468
37469  # Publish this variable in the help.
37470
37471
37472  if [ -z "${AR+x}" ]; then
37473    # The variable is not set by user, try to locate tool using the code snippet
37474    if test -n "$ac_tool_prefix"; then
37475  for ac_prog in ar
37476  do
37477    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37478set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37480$as_echo_n "checking for $ac_word... " >&6; }
37481if ${ac_cv_prog_AR+:} false; then :
37482  $as_echo_n "(cached) " >&6
37483else
37484  if test -n "$AR"; then
37485  ac_cv_prog_AR="$AR" # Let the user override the test.
37486else
37487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37488for as_dir in $PATH
37489do
37490  IFS=$as_save_IFS
37491  test -z "$as_dir" && as_dir=.
37492    for ac_exec_ext in '' $ac_executable_extensions; do
37493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37494    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37496    break 2
37497  fi
37498done
37499  done
37500IFS=$as_save_IFS
37501
37502fi
37503fi
37504AR=$ac_cv_prog_AR
37505if test -n "$AR"; then
37506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37507$as_echo "$AR" >&6; }
37508else
37509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37510$as_echo "no" >&6; }
37511fi
37512
37513
37514    test -n "$AR" && break
37515  done
37516fi
37517if test -z "$AR"; then
37518  ac_ct_AR=$AR
37519  for ac_prog in ar
37520do
37521  # Extract the first word of "$ac_prog", so it can be a program name with args.
37522set dummy $ac_prog; ac_word=$2
37523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37524$as_echo_n "checking for $ac_word... " >&6; }
37525if ${ac_cv_prog_ac_ct_AR+:} false; then :
37526  $as_echo_n "(cached) " >&6
37527else
37528  if test -n "$ac_ct_AR"; then
37529  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37530else
37531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37532for as_dir in $PATH
37533do
37534  IFS=$as_save_IFS
37535  test -z "$as_dir" && as_dir=.
37536    for ac_exec_ext in '' $ac_executable_extensions; do
37537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37538    ac_cv_prog_ac_ct_AR="$ac_prog"
37539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37540    break 2
37541  fi
37542done
37543  done
37544IFS=$as_save_IFS
37545
37546fi
37547fi
37548ac_ct_AR=$ac_cv_prog_ac_ct_AR
37549if test -n "$ac_ct_AR"; then
37550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37551$as_echo "$ac_ct_AR" >&6; }
37552else
37553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37554$as_echo "no" >&6; }
37555fi
37556
37557
37558  test -n "$ac_ct_AR" && break
37559done
37560
37561  if test "x$ac_ct_AR" = x; then
37562    AR=""
37563  else
37564    case $cross_compiling:$ac_tool_warned in
37565yes:)
37566{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37567$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37568ac_tool_warned=yes ;;
37569esac
37570    AR=$ac_ct_AR
37571  fi
37572fi
37573
37574  else
37575    # The variable is set, but is it from the command line or the environment?
37576
37577    # Try to remove the string !AR! from our list.
37578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37580      # If it failed, the variable was not from the command line. Ignore it,
37581      # but warn the user (except for BASH, which is always set by the calling BASH).
37582      if test "xAR" != xBASH; then
37583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37584$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37585      fi
37586      # Try to locate tool using the code snippet
37587      if test -n "$ac_tool_prefix"; then
37588  for ac_prog in ar
37589  do
37590    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37591set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593$as_echo_n "checking for $ac_word... " >&6; }
37594if ${ac_cv_prog_AR+:} false; then :
37595  $as_echo_n "(cached) " >&6
37596else
37597  if test -n "$AR"; then
37598  ac_cv_prog_AR="$AR" # Let the user override the test.
37599else
37600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37601for as_dir in $PATH
37602do
37603  IFS=$as_save_IFS
37604  test -z "$as_dir" && as_dir=.
37605    for ac_exec_ext in '' $ac_executable_extensions; do
37606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37607    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37609    break 2
37610  fi
37611done
37612  done
37613IFS=$as_save_IFS
37614
37615fi
37616fi
37617AR=$ac_cv_prog_AR
37618if test -n "$AR"; then
37619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37620$as_echo "$AR" >&6; }
37621else
37622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37623$as_echo "no" >&6; }
37624fi
37625
37626
37627    test -n "$AR" && break
37628  done
37629fi
37630if test -z "$AR"; then
37631  ac_ct_AR=$AR
37632  for ac_prog in ar
37633do
37634  # Extract the first word of "$ac_prog", so it can be a program name with args.
37635set dummy $ac_prog; ac_word=$2
37636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37637$as_echo_n "checking for $ac_word... " >&6; }
37638if ${ac_cv_prog_ac_ct_AR+:} false; then :
37639  $as_echo_n "(cached) " >&6
37640else
37641  if test -n "$ac_ct_AR"; then
37642  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37643else
37644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37645for as_dir in $PATH
37646do
37647  IFS=$as_save_IFS
37648  test -z "$as_dir" && as_dir=.
37649    for ac_exec_ext in '' $ac_executable_extensions; do
37650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37651    ac_cv_prog_ac_ct_AR="$ac_prog"
37652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37653    break 2
37654  fi
37655done
37656  done
37657IFS=$as_save_IFS
37658
37659fi
37660fi
37661ac_ct_AR=$ac_cv_prog_ac_ct_AR
37662if test -n "$ac_ct_AR"; then
37663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37664$as_echo "$ac_ct_AR" >&6; }
37665else
37666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37667$as_echo "no" >&6; }
37668fi
37669
37670
37671  test -n "$ac_ct_AR" && break
37672done
37673
37674  if test "x$ac_ct_AR" = x; then
37675    AR=""
37676  else
37677    case $cross_compiling:$ac_tool_warned in
37678yes:)
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37681ac_tool_warned=yes ;;
37682esac
37683    AR=$ac_ct_AR
37684  fi
37685fi
37686
37687    else
37688      # If it succeeded, then it was overridden by the user. We will use it
37689      # for the tool.
37690
37691      # First remove it from the list of overridden variables, so we can test
37692      # for unknown variables in the end.
37693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37694
37695      # Check if we try to supply an empty value
37696      if test "x$AR" = x; then
37697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37698$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37700$as_echo_n "checking for AR... " >&6; }
37701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37702$as_echo "disabled" >&6; }
37703      else
37704        # Check if the provided tool contains a complete path.
37705        tool_specified="$AR"
37706        tool_basename="${tool_specified##*/}"
37707        if test "x$tool_basename" = "x$tool_specified"; then
37708          # A command without a complete path is provided, search $PATH.
37709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37710$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37711          # Extract the first word of "$tool_basename", so it can be a program name with args.
37712set dummy $tool_basename; ac_word=$2
37713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37714$as_echo_n "checking for $ac_word... " >&6; }
37715if ${ac_cv_path_AR+:} false; then :
37716  $as_echo_n "(cached) " >&6
37717else
37718  case $AR in
37719  [\\/]* | ?:[\\/]*)
37720  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37721  ;;
37722  *)
37723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37724for as_dir in $PATH
37725do
37726  IFS=$as_save_IFS
37727  test -z "$as_dir" && as_dir=.
37728    for ac_exec_ext in '' $ac_executable_extensions; do
37729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37730    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37732    break 2
37733  fi
37734done
37735  done
37736IFS=$as_save_IFS
37737
37738  ;;
37739esac
37740fi
37741AR=$ac_cv_path_AR
37742if test -n "$AR"; then
37743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37744$as_echo "$AR" >&6; }
37745else
37746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37747$as_echo "no" >&6; }
37748fi
37749
37750
37751          if test "x$AR" = x; then
37752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37753          fi
37754        else
37755          # Otherwise we believe it is a complete path. Use it as it is.
37756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37757$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37759$as_echo_n "checking for AR... " >&6; }
37760          if test ! -x "$tool_specified"; then
37761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37762$as_echo "not found" >&6; }
37763            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37764          fi
37765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37766$as_echo "$tool_specified" >&6; }
37767        fi
37768      fi
37769    fi
37770
37771  fi
37772
37773
37774  fi
37775
37776  # Only process if variable expands to non-empty
37777
37778  if test "x$AR" != x; then
37779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37780
37781  # First separate the path from the arguments. This will split at the first
37782  # space.
37783  complete="$AR"
37784  path="${complete%% *}"
37785  tmp="$complete EOL"
37786  arguments="${tmp#* }"
37787
37788  # Input might be given as Windows format, start by converting to
37789  # unix format.
37790  new_path=`$CYGPATH -u "$path"`
37791
37792  # Now try to locate executable using which
37793  new_path=`$WHICH "$new_path" 2> /dev/null`
37794  # bat and cmd files are not always considered executable in cygwin causing which
37795  # to not find them
37796  if test "x$new_path" = x \
37797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37799    new_path=`$CYGPATH -u "$path"`
37800  fi
37801  if test "x$new_path" = x; then
37802    # Oops. Which didn't find the executable.
37803    # The splitting of arguments from the executable at a space might have been incorrect,
37804    # since paths with space are more likely in Windows. Give it another try with the whole
37805    # argument.
37806    path="$complete"
37807    arguments="EOL"
37808    new_path=`$CYGPATH -u "$path"`
37809    new_path=`$WHICH "$new_path" 2> /dev/null`
37810    # bat and cmd files are not always considered executable in cygwin causing which
37811    # to not find them
37812    if test "x$new_path" = x \
37813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37815      new_path=`$CYGPATH -u "$path"`
37816    fi
37817    if test "x$new_path" = x; then
37818      # It's still not found. Now this is an unrecoverable error.
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37820$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37821      has_space=`$ECHO "$complete" | $GREP " "`
37822      if test "x$has_space" != x; then
37823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37825      fi
37826      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37827    fi
37828  fi
37829
37830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37833  # "foo.exe" is OK but "foo" is an error.
37834  #
37835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37836  # It is also a way to make sure we got the proper file name for the real test later on.
37837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37838  if test "x$test_shortpath" = x; then
37839    # Short path failed, file does not exist as specified.
37840    # Try adding .exe or .cmd
37841    if test -f "${new_path}.exe"; then
37842      input_to_shortpath="${new_path}.exe"
37843    elif test -f "${new_path}.cmd"; then
37844      input_to_shortpath="${new_path}.cmd"
37845    else
37846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37847$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37850      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37851    fi
37852  else
37853    input_to_shortpath="$new_path"
37854  fi
37855
37856  # Call helper function which possibly converts this using DOS-style short mode.
37857  # If so, the updated path is stored in $new_path.
37858  new_path="$input_to_shortpath"
37859
37860  input_path="$input_to_shortpath"
37861  # Check if we need to convert this using DOS-style short mode. If the path
37862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37863  # take no chances and rewrite it.
37864  # Note: m4 eats our [], so we need to use [ and ] instead.
37865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37866  if test "x$has_forbidden_chars" != x; then
37867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37871      # Going to short mode and back again did indeed matter. Since short mode is
37872      # case insensitive, let's make it lowercase to improve readability.
37873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37874      # Now convert it back to Unix-style (cygpath)
37875      input_path=`$CYGPATH -u "$shortmode_path"`
37876      new_path="$input_path"
37877    fi
37878  fi
37879
37880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37881  if test "x$test_cygdrive_prefix" = x; then
37882    # As a simple fix, exclude /usr/bin since it's not a real path.
37883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37885      # a path prefixed by /cygdrive for fixpath to work.
37886      new_path="$CYGWIN_ROOT_PATH$input_path"
37887    fi
37888  fi
37889
37890  # remove trailing .exe if any
37891  new_path="${new_path/%.exe/}"
37892
37893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37894
37895  # First separate the path from the arguments. This will split at the first
37896  # space.
37897  complete="$AR"
37898  path="${complete%% *}"
37899  tmp="$complete EOL"
37900  arguments="${tmp#* }"
37901
37902  # Input might be given as Windows format, start by converting to
37903  # unix format.
37904  new_path="$path"
37905
37906  windows_path="$new_path"
37907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908    unix_path=`$CYGPATH -u "$windows_path"`
37909    new_path="$unix_path"
37910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37912    new_path="$unix_path"
37913  fi
37914
37915
37916  # Now try to locate executable using which
37917  new_path=`$WHICH "$new_path" 2> /dev/null`
37918
37919  if test "x$new_path" = x; then
37920    # Oops. Which didn't find the executable.
37921    # The splitting of arguments from the executable at a space might have been incorrect,
37922    # since paths with space are more likely in Windows. Give it another try with the whole
37923    # argument.
37924    path="$complete"
37925    arguments="EOL"
37926    new_path="$path"
37927
37928  windows_path="$new_path"
37929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37930    unix_path=`$CYGPATH -u "$windows_path"`
37931    new_path="$unix_path"
37932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37934    new_path="$unix_path"
37935  fi
37936
37937
37938    new_path=`$WHICH "$new_path" 2> /dev/null`
37939    # bat and cmd files are not always considered executable in MSYS causing which
37940    # to not find them
37941    if test "x$new_path" = x \
37942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37944      new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955    fi
37956
37957    if test "x$new_path" = x; then
37958      # It's still not found. Now this is an unrecoverable error.
37959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37960$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37961      has_space=`$ECHO "$complete" | $GREP " "`
37962      if test "x$has_space" != x; then
37963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37965      fi
37966      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37967    fi
37968  fi
37969
37970  # Now new_path has a complete unix path to the binary
37971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37972    # Keep paths in /bin as-is, but remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974    # Do not save /bin paths to all_fixpath_prefixes!
37975  else
37976    # Not in mixed or Windows style, start by that.
37977    new_path=`cmd //c echo $new_path`
37978
37979  input_path="$new_path"
37980  # Check if we need to convert this using DOS-style short mode. If the path
37981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37982  # take no chances and rewrite it.
37983  # Note: m4 eats our [], so we need to use [ and ] instead.
37984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37985  if test "x$has_forbidden_chars" != x; then
37986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37988  fi
37989
37990    # Output is in $new_path
37991
37992  windows_path="$new_path"
37993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37994    unix_path=`$CYGPATH -u "$windows_path"`
37995    new_path="$unix_path"
37996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37998    new_path="$unix_path"
37999  fi
38000
38001    # remove trailing .exe if any
38002    new_path="${new_path/%.exe/}"
38003
38004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38006  fi
38007
38008    else
38009      # We're on a unix platform. Hooray! :)
38010      # First separate the path from the arguments. This will split at the first
38011      # space.
38012      complete="$AR"
38013      path="${complete%% *}"
38014      tmp="$complete EOL"
38015      arguments="${tmp#* }"
38016
38017      # Cannot rely on the command "which" here since it doesn't always work.
38018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38019      if test -z "$is_absolute_path"; then
38020        # Path to executable is not absolute. Find it.
38021        IFS_save="$IFS"
38022        IFS=:
38023        for p in $PATH; do
38024          if test -f "$p/$path" && test -x "$p/$path"; then
38025            new_path="$p/$path"
38026            break
38027          fi
38028        done
38029        IFS="$IFS_save"
38030      else
38031        # This is an absolute path, we can use it without further modifications.
38032        new_path="$path"
38033      fi
38034
38035      if test "x$new_path" = x; then
38036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38037$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38038        has_space=`$ECHO "$complete" | $GREP " "`
38039        if test "x$has_space" != x; then
38040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38042        fi
38043        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38044      fi
38045    fi
38046
38047    # Now join together the path and the arguments once again
38048    if test "x$arguments" != xEOL; then
38049      new_complete="$new_path ${arguments% *}"
38050    else
38051      new_complete="$new_path"
38052    fi
38053
38054    if test "x$complete" != "x$new_complete"; then
38055      AR="$new_complete"
38056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38057$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38058    fi
38059  fi
38060
38061
38062
38063  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38064
38065
38066  # Publish this variable in the help.
38067
38068
38069  if [ -z "${LIPO+x}" ]; then
38070    # The variable is not set by user, try to locate tool using the code snippet
38071    for ac_prog in lipo
38072do
38073  # Extract the first word of "$ac_prog", so it can be a program name with args.
38074set dummy $ac_prog; ac_word=$2
38075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38076$as_echo_n "checking for $ac_word... " >&6; }
38077if ${ac_cv_path_LIPO+:} false; then :
38078  $as_echo_n "(cached) " >&6
38079else
38080  case $LIPO in
38081  [\\/]* | ?:[\\/]*)
38082  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38083  ;;
38084  *)
38085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38086for as_dir in $PATH
38087do
38088  IFS=$as_save_IFS
38089  test -z "$as_dir" && as_dir=.
38090    for ac_exec_ext in '' $ac_executable_extensions; do
38091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38092    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38094    break 2
38095  fi
38096done
38097  done
38098IFS=$as_save_IFS
38099
38100  ;;
38101esac
38102fi
38103LIPO=$ac_cv_path_LIPO
38104if test -n "$LIPO"; then
38105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38106$as_echo "$LIPO" >&6; }
38107else
38108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38109$as_echo "no" >&6; }
38110fi
38111
38112
38113  test -n "$LIPO" && break
38114done
38115
38116  else
38117    # The variable is set, but is it from the command line or the environment?
38118
38119    # Try to remove the string !LIPO! from our list.
38120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38122      # If it failed, the variable was not from the command line. Ignore it,
38123      # but warn the user (except for BASH, which is always set by the calling BASH).
38124      if test "xLIPO" != xBASH; then
38125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38126$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38127      fi
38128      # Try to locate tool using the code snippet
38129      for ac_prog in lipo
38130do
38131  # Extract the first word of "$ac_prog", so it can be a program name with args.
38132set dummy $ac_prog; ac_word=$2
38133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38134$as_echo_n "checking for $ac_word... " >&6; }
38135if ${ac_cv_path_LIPO+:} false; then :
38136  $as_echo_n "(cached) " >&6
38137else
38138  case $LIPO in
38139  [\\/]* | ?:[\\/]*)
38140  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38141  ;;
38142  *)
38143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38144for as_dir in $PATH
38145do
38146  IFS=$as_save_IFS
38147  test -z "$as_dir" && as_dir=.
38148    for ac_exec_ext in '' $ac_executable_extensions; do
38149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38150    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38152    break 2
38153  fi
38154done
38155  done
38156IFS=$as_save_IFS
38157
38158  ;;
38159esac
38160fi
38161LIPO=$ac_cv_path_LIPO
38162if test -n "$LIPO"; then
38163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38164$as_echo "$LIPO" >&6; }
38165else
38166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38167$as_echo "no" >&6; }
38168fi
38169
38170
38171  test -n "$LIPO" && break
38172done
38173
38174    else
38175      # If it succeeded, then it was overridden by the user. We will use it
38176      # for the tool.
38177
38178      # First remove it from the list of overridden variables, so we can test
38179      # for unknown variables in the end.
38180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38181
38182      # Check if we try to supply an empty value
38183      if test "x$LIPO" = x; then
38184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38185$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38187$as_echo_n "checking for LIPO... " >&6; }
38188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38189$as_echo "disabled" >&6; }
38190      else
38191        # Check if the provided tool contains a complete path.
38192        tool_specified="$LIPO"
38193        tool_basename="${tool_specified##*/}"
38194        if test "x$tool_basename" = "x$tool_specified"; then
38195          # A command without a complete path is provided, search $PATH.
38196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38197$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38198          # Extract the first word of "$tool_basename", so it can be a program name with args.
38199set dummy $tool_basename; ac_word=$2
38200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38201$as_echo_n "checking for $ac_word... " >&6; }
38202if ${ac_cv_path_LIPO+:} false; then :
38203  $as_echo_n "(cached) " >&6
38204else
38205  case $LIPO in
38206  [\\/]* | ?:[\\/]*)
38207  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38208  ;;
38209  *)
38210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38211for as_dir in $PATH
38212do
38213  IFS=$as_save_IFS
38214  test -z "$as_dir" && as_dir=.
38215    for ac_exec_ext in '' $ac_executable_extensions; do
38216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38217    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38219    break 2
38220  fi
38221done
38222  done
38223IFS=$as_save_IFS
38224
38225  ;;
38226esac
38227fi
38228LIPO=$ac_cv_path_LIPO
38229if test -n "$LIPO"; then
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38231$as_echo "$LIPO" >&6; }
38232else
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38234$as_echo "no" >&6; }
38235fi
38236
38237
38238          if test "x$LIPO" = x; then
38239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38240          fi
38241        else
38242          # Otherwise we believe it is a complete path. Use it as it is.
38243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38244$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38246$as_echo_n "checking for LIPO... " >&6; }
38247          if test ! -x "$tool_specified"; then
38248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38249$as_echo "not found" >&6; }
38250            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38251          fi
38252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38253$as_echo "$tool_specified" >&6; }
38254        fi
38255      fi
38256    fi
38257
38258  fi
38259
38260
38261
38262  # Only process if variable expands to non-empty
38263
38264  if test "x$LIPO" != x; then
38265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38266
38267  # First separate the path from the arguments. This will split at the first
38268  # space.
38269  complete="$LIPO"
38270  path="${complete%% *}"
38271  tmp="$complete EOL"
38272  arguments="${tmp#* }"
38273
38274  # Input might be given as Windows format, start by converting to
38275  # unix format.
38276  new_path=`$CYGPATH -u "$path"`
38277
38278  # Now try to locate executable using which
38279  new_path=`$WHICH "$new_path" 2> /dev/null`
38280  # bat and cmd files are not always considered executable in cygwin causing which
38281  # to not find them
38282  if test "x$new_path" = x \
38283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38285    new_path=`$CYGPATH -u "$path"`
38286  fi
38287  if test "x$new_path" = x; then
38288    # Oops. Which didn't find the executable.
38289    # The splitting of arguments from the executable at a space might have been incorrect,
38290    # since paths with space are more likely in Windows. Give it another try with the whole
38291    # argument.
38292    path="$complete"
38293    arguments="EOL"
38294    new_path=`$CYGPATH -u "$path"`
38295    new_path=`$WHICH "$new_path" 2> /dev/null`
38296    # bat and cmd files are not always considered executable in cygwin causing which
38297    # to not find them
38298    if test "x$new_path" = x \
38299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38301      new_path=`$CYGPATH -u "$path"`
38302    fi
38303    if test "x$new_path" = x; then
38304      # It's still not found. Now this is an unrecoverable error.
38305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38306$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38307      has_space=`$ECHO "$complete" | $GREP " "`
38308      if test "x$has_space" != x; then
38309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38311      fi
38312      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38313    fi
38314  fi
38315
38316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38319  # "foo.exe" is OK but "foo" is an error.
38320  #
38321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38322  # It is also a way to make sure we got the proper file name for the real test later on.
38323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38324  if test "x$test_shortpath" = x; then
38325    # Short path failed, file does not exist as specified.
38326    # Try adding .exe or .cmd
38327    if test -f "${new_path}.exe"; then
38328      input_to_shortpath="${new_path}.exe"
38329    elif test -f "${new_path}.cmd"; then
38330      input_to_shortpath="${new_path}.cmd"
38331    else
38332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38333$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38336      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38337    fi
38338  else
38339    input_to_shortpath="$new_path"
38340  fi
38341
38342  # Call helper function which possibly converts this using DOS-style short mode.
38343  # If so, the updated path is stored in $new_path.
38344  new_path="$input_to_shortpath"
38345
38346  input_path="$input_to_shortpath"
38347  # Check if we need to convert this using DOS-style short mode. If the path
38348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38349  # take no chances and rewrite it.
38350  # Note: m4 eats our [], so we need to use [ and ] instead.
38351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38352  if test "x$has_forbidden_chars" != x; then
38353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38357      # Going to short mode and back again did indeed matter. Since short mode is
38358      # case insensitive, let's make it lowercase to improve readability.
38359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38360      # Now convert it back to Unix-style (cygpath)
38361      input_path=`$CYGPATH -u "$shortmode_path"`
38362      new_path="$input_path"
38363    fi
38364  fi
38365
38366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38367  if test "x$test_cygdrive_prefix" = x; then
38368    # As a simple fix, exclude /usr/bin since it's not a real path.
38369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38371      # a path prefixed by /cygdrive for fixpath to work.
38372      new_path="$CYGWIN_ROOT_PATH$input_path"
38373    fi
38374  fi
38375
38376  # remove trailing .exe if any
38377  new_path="${new_path/%.exe/}"
38378
38379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38380
38381  # First separate the path from the arguments. This will split at the first
38382  # space.
38383  complete="$LIPO"
38384  path="${complete%% *}"
38385  tmp="$complete EOL"
38386  arguments="${tmp#* }"
38387
38388  # Input might be given as Windows format, start by converting to
38389  # unix format.
38390  new_path="$path"
38391
38392  windows_path="$new_path"
38393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38394    unix_path=`$CYGPATH -u "$windows_path"`
38395    new_path="$unix_path"
38396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38398    new_path="$unix_path"
38399  fi
38400
38401
38402  # Now try to locate executable using which
38403  new_path=`$WHICH "$new_path" 2> /dev/null`
38404
38405  if test "x$new_path" = x; then
38406    # Oops. Which didn't find the executable.
38407    # The splitting of arguments from the executable at a space might have been incorrect,
38408    # since paths with space are more likely in Windows. Give it another try with the whole
38409    # argument.
38410    path="$complete"
38411    arguments="EOL"
38412    new_path="$path"
38413
38414  windows_path="$new_path"
38415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38416    unix_path=`$CYGPATH -u "$windows_path"`
38417    new_path="$unix_path"
38418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38420    new_path="$unix_path"
38421  fi
38422
38423
38424    new_path=`$WHICH "$new_path" 2> /dev/null`
38425    # bat and cmd files are not always considered executable in MSYS causing which
38426    # to not find them
38427    if test "x$new_path" = x \
38428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38430      new_path="$path"
38431
38432  windows_path="$new_path"
38433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38434    unix_path=`$CYGPATH -u "$windows_path"`
38435    new_path="$unix_path"
38436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38438    new_path="$unix_path"
38439  fi
38440
38441    fi
38442
38443    if test "x$new_path" = x; then
38444      # It's still not found. Now this is an unrecoverable error.
38445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38446$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38447      has_space=`$ECHO "$complete" | $GREP " "`
38448      if test "x$has_space" != x; then
38449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38451      fi
38452      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38453    fi
38454  fi
38455
38456  # Now new_path has a complete unix path to the binary
38457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38458    # Keep paths in /bin as-is, but remove trailing .exe if any
38459    new_path="${new_path/%.exe/}"
38460    # Do not save /bin paths to all_fixpath_prefixes!
38461  else
38462    # Not in mixed or Windows style, start by that.
38463    new_path=`cmd //c echo $new_path`
38464
38465  input_path="$new_path"
38466  # Check if we need to convert this using DOS-style short mode. If the path
38467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38468  # take no chances and rewrite it.
38469  # Note: m4 eats our [], so we need to use [ and ] instead.
38470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38471  if test "x$has_forbidden_chars" != x; then
38472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38474  fi
38475
38476    # Output is in $new_path
38477
38478  windows_path="$new_path"
38479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38480    unix_path=`$CYGPATH -u "$windows_path"`
38481    new_path="$unix_path"
38482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38484    new_path="$unix_path"
38485  fi
38486
38487    # remove trailing .exe if any
38488    new_path="${new_path/%.exe/}"
38489
38490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38492  fi
38493
38494    else
38495      # We're on a unix platform. Hooray! :)
38496      # First separate the path from the arguments. This will split at the first
38497      # space.
38498      complete="$LIPO"
38499      path="${complete%% *}"
38500      tmp="$complete EOL"
38501      arguments="${tmp#* }"
38502
38503      # Cannot rely on the command "which" here since it doesn't always work.
38504      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38505      if test -z "$is_absolute_path"; then
38506        # Path to executable is not absolute. Find it.
38507        IFS_save="$IFS"
38508        IFS=:
38509        for p in $PATH; do
38510          if test -f "$p/$path" && test -x "$p/$path"; then
38511            new_path="$p/$path"
38512            break
38513          fi
38514        done
38515        IFS="$IFS_save"
38516      else
38517        # This is an absolute path, we can use it without further modifications.
38518        new_path="$path"
38519      fi
38520
38521      if test "x$new_path" = x; then
38522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38523$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38524        has_space=`$ECHO "$complete" | $GREP " "`
38525        if test "x$has_space" != x; then
38526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38528        fi
38529        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38530      fi
38531    fi
38532
38533    # Now join together the path and the arguments once again
38534    if test "x$arguments" != xEOL; then
38535      new_complete="$new_path ${arguments% *}"
38536    else
38537      new_complete="$new_path"
38538    fi
38539
38540    if test "x$complete" != "x$new_complete"; then
38541      LIPO="$new_complete"
38542      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38543$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38544    fi
38545  fi
38546
38547  fi
38548
38549  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38550    # Extract the first word of "mt", so it can be a program name with args.
38551set dummy mt; ac_word=$2
38552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38553$as_echo_n "checking for $ac_word... " >&6; }
38554if ${ac_cv_prog_MT+:} false; then :
38555  $as_echo_n "(cached) " >&6
38556else
38557  if test -n "$MT"; then
38558  ac_cv_prog_MT="$MT" # Let the user override the test.
38559else
38560  ac_prog_rejected=no
38561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38562for as_dir in $PATH
38563do
38564  IFS=$as_save_IFS
38565  test -z "$as_dir" && as_dir=.
38566    for ac_exec_ext in '' $ac_executable_extensions; do
38567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38568    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38569       ac_prog_rejected=yes
38570       continue
38571     fi
38572    ac_cv_prog_MT="mt"
38573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38574    break 2
38575  fi
38576done
38577  done
38578IFS=$as_save_IFS
38579
38580if test $ac_prog_rejected = yes; then
38581  # We found a bogon in the path, so make sure we never use it.
38582  set dummy $ac_cv_prog_MT
38583  shift
38584  if test $# != 0; then
38585    # We chose a different compiler from the bogus one.
38586    # However, it has the same basename, so the bogon will be chosen
38587    # first if we set MT to just the basename; use the full file name.
38588    shift
38589    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38590  fi
38591fi
38592fi
38593fi
38594MT=$ac_cv_prog_MT
38595if test -n "$MT"; then
38596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38597$as_echo "$MT" >&6; }
38598else
38599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38600$as_echo "no" >&6; }
38601fi
38602
38603
38604
38605  # Only process if variable expands to non-empty
38606
38607  if test "x$MT" != x; then
38608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38609
38610  # First separate the path from the arguments. This will split at the first
38611  # space.
38612  complete="$MT"
38613  path="${complete%% *}"
38614  tmp="$complete EOL"
38615  arguments="${tmp#* }"
38616
38617  # Input might be given as Windows format, start by converting to
38618  # unix format.
38619  new_path=`$CYGPATH -u "$path"`
38620
38621  # Now try to locate executable using which
38622  new_path=`$WHICH "$new_path" 2> /dev/null`
38623  # bat and cmd files are not always considered executable in cygwin causing which
38624  # to not find them
38625  if test "x$new_path" = x \
38626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38628    new_path=`$CYGPATH -u "$path"`
38629  fi
38630  if test "x$new_path" = x; then
38631    # Oops. Which didn't find the executable.
38632    # The splitting of arguments from the executable at a space might have been incorrect,
38633    # since paths with space are more likely in Windows. Give it another try with the whole
38634    # argument.
38635    path="$complete"
38636    arguments="EOL"
38637    new_path=`$CYGPATH -u "$path"`
38638    new_path=`$WHICH "$new_path" 2> /dev/null`
38639    # bat and cmd files are not always considered executable in cygwin causing which
38640    # to not find them
38641    if test "x$new_path" = x \
38642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38644      new_path=`$CYGPATH -u "$path"`
38645    fi
38646    if test "x$new_path" = x; then
38647      # It's still not found. Now this is an unrecoverable error.
38648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38649$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38650      has_space=`$ECHO "$complete" | $GREP " "`
38651      if test "x$has_space" != x; then
38652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38654      fi
38655      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38656    fi
38657  fi
38658
38659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38662  # "foo.exe" is OK but "foo" is an error.
38663  #
38664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38665  # It is also a way to make sure we got the proper file name for the real test later on.
38666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38667  if test "x$test_shortpath" = x; then
38668    # Short path failed, file does not exist as specified.
38669    # Try adding .exe or .cmd
38670    if test -f "${new_path}.exe"; then
38671      input_to_shortpath="${new_path}.exe"
38672    elif test -f "${new_path}.cmd"; then
38673      input_to_shortpath="${new_path}.cmd"
38674    else
38675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38676$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38679      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38680    fi
38681  else
38682    input_to_shortpath="$new_path"
38683  fi
38684
38685  # Call helper function which possibly converts this using DOS-style short mode.
38686  # If so, the updated path is stored in $new_path.
38687  new_path="$input_to_shortpath"
38688
38689  input_path="$input_to_shortpath"
38690  # Check if we need to convert this using DOS-style short mode. If the path
38691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38692  # take no chances and rewrite it.
38693  # Note: m4 eats our [], so we need to use [ and ] instead.
38694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38695  if test "x$has_forbidden_chars" != x; then
38696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38700      # Going to short mode and back again did indeed matter. Since short mode is
38701      # case insensitive, let's make it lowercase to improve readability.
38702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38703      # Now convert it back to Unix-style (cygpath)
38704      input_path=`$CYGPATH -u "$shortmode_path"`
38705      new_path="$input_path"
38706    fi
38707  fi
38708
38709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38710  if test "x$test_cygdrive_prefix" = x; then
38711    # As a simple fix, exclude /usr/bin since it's not a real path.
38712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38714      # a path prefixed by /cygdrive for fixpath to work.
38715      new_path="$CYGWIN_ROOT_PATH$input_path"
38716    fi
38717  fi
38718
38719  # remove trailing .exe if any
38720  new_path="${new_path/%.exe/}"
38721
38722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38723
38724  # First separate the path from the arguments. This will split at the first
38725  # space.
38726  complete="$MT"
38727  path="${complete%% *}"
38728  tmp="$complete EOL"
38729  arguments="${tmp#* }"
38730
38731  # Input might be given as Windows format, start by converting to
38732  # unix format.
38733  new_path="$path"
38734
38735  windows_path="$new_path"
38736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38737    unix_path=`$CYGPATH -u "$windows_path"`
38738    new_path="$unix_path"
38739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38741    new_path="$unix_path"
38742  fi
38743
38744
38745  # Now try to locate executable using which
38746  new_path=`$WHICH "$new_path" 2> /dev/null`
38747
38748  if test "x$new_path" = x; then
38749    # Oops. Which didn't find the executable.
38750    # The splitting of arguments from the executable at a space might have been incorrect,
38751    # since paths with space are more likely in Windows. Give it another try with the whole
38752    # argument.
38753    path="$complete"
38754    arguments="EOL"
38755    new_path="$path"
38756
38757  windows_path="$new_path"
38758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38759    unix_path=`$CYGPATH -u "$windows_path"`
38760    new_path="$unix_path"
38761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38763    new_path="$unix_path"
38764  fi
38765
38766
38767    new_path=`$WHICH "$new_path" 2> /dev/null`
38768    # bat and cmd files are not always considered executable in MSYS causing which
38769    # to not find them
38770    if test "x$new_path" = x \
38771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38773      new_path="$path"
38774
38775  windows_path="$new_path"
38776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38777    unix_path=`$CYGPATH -u "$windows_path"`
38778    new_path="$unix_path"
38779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38781    new_path="$unix_path"
38782  fi
38783
38784    fi
38785
38786    if test "x$new_path" = x; then
38787      # It's still not found. Now this is an unrecoverable error.
38788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38789$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38790      has_space=`$ECHO "$complete" | $GREP " "`
38791      if test "x$has_space" != x; then
38792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38794      fi
38795      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38796    fi
38797  fi
38798
38799  # Now new_path has a complete unix path to the binary
38800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38801    # Keep paths in /bin as-is, but remove trailing .exe if any
38802    new_path="${new_path/%.exe/}"
38803    # Do not save /bin paths to all_fixpath_prefixes!
38804  else
38805    # Not in mixed or Windows style, start by that.
38806    new_path=`cmd //c echo $new_path`
38807
38808  input_path="$new_path"
38809  # Check if we need to convert this using DOS-style short mode. If the path
38810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38811  # take no chances and rewrite it.
38812  # Note: m4 eats our [], so we need to use [ and ] instead.
38813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38814  if test "x$has_forbidden_chars" != x; then
38815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38817  fi
38818
38819    # Output is in $new_path
38820
38821  windows_path="$new_path"
38822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38823    unix_path=`$CYGPATH -u "$windows_path"`
38824    new_path="$unix_path"
38825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38827    new_path="$unix_path"
38828  fi
38829
38830    # remove trailing .exe if any
38831    new_path="${new_path/%.exe/}"
38832
38833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38835  fi
38836
38837    else
38838      # We're on a unix platform. Hooray! :)
38839      # First separate the path from the arguments. This will split at the first
38840      # space.
38841      complete="$MT"
38842      path="${complete%% *}"
38843      tmp="$complete EOL"
38844      arguments="${tmp#* }"
38845
38846      # Cannot rely on the command "which" here since it doesn't always work.
38847      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38848      if test -z "$is_absolute_path"; then
38849        # Path to executable is not absolute. Find it.
38850        IFS_save="$IFS"
38851        IFS=:
38852        for p in $PATH; do
38853          if test -f "$p/$path" && test -x "$p/$path"; then
38854            new_path="$p/$path"
38855            break
38856          fi
38857        done
38858        IFS="$IFS_save"
38859      else
38860        # This is an absolute path, we can use it without further modifications.
38861        new_path="$path"
38862      fi
38863
38864      if test "x$new_path" = x; then
38865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38866$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38867        has_space=`$ECHO "$complete" | $GREP " "`
38868        if test "x$has_space" != x; then
38869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38871        fi
38872        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38873      fi
38874    fi
38875
38876    # Now join together the path and the arguments once again
38877    if test "x$arguments" != xEOL; then
38878      new_complete="$new_path ${arguments% *}"
38879    else
38880      new_complete="$new_path"
38881    fi
38882
38883    if test "x$complete" != "x$new_complete"; then
38884      MT="$new_complete"
38885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38886$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38887    fi
38888  fi
38889
38890    # Setup the resource compiler (RC)
38891    # Extract the first word of "rc", so it can be a program name with args.
38892set dummy rc; ac_word=$2
38893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38894$as_echo_n "checking for $ac_word... " >&6; }
38895if ${ac_cv_prog_RC+:} false; then :
38896  $as_echo_n "(cached) " >&6
38897else
38898  if test -n "$RC"; then
38899  ac_cv_prog_RC="$RC" # Let the user override the test.
38900else
38901  ac_prog_rejected=no
38902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38903for as_dir in $PATH
38904do
38905  IFS=$as_save_IFS
38906  test -z "$as_dir" && as_dir=.
38907    for ac_exec_ext in '' $ac_executable_extensions; do
38908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38909    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38910       ac_prog_rejected=yes
38911       continue
38912     fi
38913    ac_cv_prog_RC="rc"
38914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38915    break 2
38916  fi
38917done
38918  done
38919IFS=$as_save_IFS
38920
38921if test $ac_prog_rejected = yes; then
38922  # We found a bogon in the path, so make sure we never use it.
38923  set dummy $ac_cv_prog_RC
38924  shift
38925  if test $# != 0; then
38926    # We chose a different compiler from the bogus one.
38927    # However, it has the same basename, so the bogon will be chosen
38928    # first if we set RC to just the basename; use the full file name.
38929    shift
38930    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38931  fi
38932fi
38933fi
38934fi
38935RC=$ac_cv_prog_RC
38936if test -n "$RC"; then
38937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38938$as_echo "$RC" >&6; }
38939else
38940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38941$as_echo "no" >&6; }
38942fi
38943
38944
38945
38946  # Only process if variable expands to non-empty
38947
38948  if test "x$RC" != x; then
38949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38950
38951  # First separate the path from the arguments. This will split at the first
38952  # space.
38953  complete="$RC"
38954  path="${complete%% *}"
38955  tmp="$complete EOL"
38956  arguments="${tmp#* }"
38957
38958  # Input might be given as Windows format, start by converting to
38959  # unix format.
38960  new_path=`$CYGPATH -u "$path"`
38961
38962  # Now try to locate executable using which
38963  new_path=`$WHICH "$new_path" 2> /dev/null`
38964  # bat and cmd files are not always considered executable in cygwin causing which
38965  # to not find them
38966  if test "x$new_path" = x \
38967      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38968      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38969    new_path=`$CYGPATH -u "$path"`
38970  fi
38971  if test "x$new_path" = x; then
38972    # Oops. Which didn't find the executable.
38973    # The splitting of arguments from the executable at a space might have been incorrect,
38974    # since paths with space are more likely in Windows. Give it another try with the whole
38975    # argument.
38976    path="$complete"
38977    arguments="EOL"
38978    new_path=`$CYGPATH -u "$path"`
38979    new_path=`$WHICH "$new_path" 2> /dev/null`
38980    # bat and cmd files are not always considered executable in cygwin causing which
38981    # to not find them
38982    if test "x$new_path" = x \
38983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38985      new_path=`$CYGPATH -u "$path"`
38986    fi
38987    if test "x$new_path" = x; then
38988      # It's still not found. Now this is an unrecoverable error.
38989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38990$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38991      has_space=`$ECHO "$complete" | $GREP " "`
38992      if test "x$has_space" != x; then
38993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38995      fi
38996      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38997    fi
38998  fi
38999
39000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39003  # "foo.exe" is OK but "foo" is an error.
39004  #
39005  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39006  # It is also a way to make sure we got the proper file name for the real test later on.
39007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39008  if test "x$test_shortpath" = x; then
39009    # Short path failed, file does not exist as specified.
39010    # Try adding .exe or .cmd
39011    if test -f "${new_path}.exe"; then
39012      input_to_shortpath="${new_path}.exe"
39013    elif test -f "${new_path}.cmd"; then
39014      input_to_shortpath="${new_path}.cmd"
39015    else
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39017$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39018      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39019$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39020      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39021    fi
39022  else
39023    input_to_shortpath="$new_path"
39024  fi
39025
39026  # Call helper function which possibly converts this using DOS-style short mode.
39027  # If so, the updated path is stored in $new_path.
39028  new_path="$input_to_shortpath"
39029
39030  input_path="$input_to_shortpath"
39031  # Check if we need to convert this using DOS-style short mode. If the path
39032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39033  # take no chances and rewrite it.
39034  # Note: m4 eats our [], so we need to use [ and ] instead.
39035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39036  if test "x$has_forbidden_chars" != x; then
39037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39041      # Going to short mode and back again did indeed matter. Since short mode is
39042      # case insensitive, let's make it lowercase to improve readability.
39043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39044      # Now convert it back to Unix-style (cygpath)
39045      input_path=`$CYGPATH -u "$shortmode_path"`
39046      new_path="$input_path"
39047    fi
39048  fi
39049
39050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39051  if test "x$test_cygdrive_prefix" = x; then
39052    # As a simple fix, exclude /usr/bin since it's not a real path.
39053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39055      # a path prefixed by /cygdrive for fixpath to work.
39056      new_path="$CYGWIN_ROOT_PATH$input_path"
39057    fi
39058  fi
39059
39060  # remove trailing .exe if any
39061  new_path="${new_path/%.exe/}"
39062
39063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39064
39065  # First separate the path from the arguments. This will split at the first
39066  # space.
39067  complete="$RC"
39068  path="${complete%% *}"
39069  tmp="$complete EOL"
39070  arguments="${tmp#* }"
39071
39072  # Input might be given as Windows format, start by converting to
39073  # unix format.
39074  new_path="$path"
39075
39076  windows_path="$new_path"
39077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39078    unix_path=`$CYGPATH -u "$windows_path"`
39079    new_path="$unix_path"
39080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39082    new_path="$unix_path"
39083  fi
39084
39085
39086  # Now try to locate executable using which
39087  new_path=`$WHICH "$new_path" 2> /dev/null`
39088
39089  if test "x$new_path" = x; then
39090    # Oops. Which didn't find the executable.
39091    # The splitting of arguments from the executable at a space might have been incorrect,
39092    # since paths with space are more likely in Windows. Give it another try with the whole
39093    # argument.
39094    path="$complete"
39095    arguments="EOL"
39096    new_path="$path"
39097
39098  windows_path="$new_path"
39099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39100    unix_path=`$CYGPATH -u "$windows_path"`
39101    new_path="$unix_path"
39102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39104    new_path="$unix_path"
39105  fi
39106
39107
39108    new_path=`$WHICH "$new_path" 2> /dev/null`
39109    # bat and cmd files are not always considered executable in MSYS causing which
39110    # to not find them
39111    if test "x$new_path" = x \
39112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39114      new_path="$path"
39115
39116  windows_path="$new_path"
39117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39118    unix_path=`$CYGPATH -u "$windows_path"`
39119    new_path="$unix_path"
39120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39122    new_path="$unix_path"
39123  fi
39124
39125    fi
39126
39127    if test "x$new_path" = x; then
39128      # It's still not found. Now this is an unrecoverable error.
39129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39130$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39131      has_space=`$ECHO "$complete" | $GREP " "`
39132      if test "x$has_space" != x; then
39133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39135      fi
39136      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39137    fi
39138  fi
39139
39140  # Now new_path has a complete unix path to the binary
39141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39142    # Keep paths in /bin as-is, but remove trailing .exe if any
39143    new_path="${new_path/%.exe/}"
39144    # Do not save /bin paths to all_fixpath_prefixes!
39145  else
39146    # Not in mixed or Windows style, start by that.
39147    new_path=`cmd //c echo $new_path`
39148
39149  input_path="$new_path"
39150  # Check if we need to convert this using DOS-style short mode. If the path
39151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39152  # take no chances and rewrite it.
39153  # Note: m4 eats our [], so we need to use [ and ] instead.
39154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39155  if test "x$has_forbidden_chars" != x; then
39156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39158  fi
39159
39160    # Output is in $new_path
39161
39162  windows_path="$new_path"
39163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39164    unix_path=`$CYGPATH -u "$windows_path"`
39165    new_path="$unix_path"
39166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39168    new_path="$unix_path"
39169  fi
39170
39171    # remove trailing .exe if any
39172    new_path="${new_path/%.exe/}"
39173
39174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39176  fi
39177
39178    else
39179      # We're on a unix platform. Hooray! :)
39180      # First separate the path from the arguments. This will split at the first
39181      # space.
39182      complete="$RC"
39183      path="${complete%% *}"
39184      tmp="$complete EOL"
39185      arguments="${tmp#* }"
39186
39187      # Cannot rely on the command "which" here since it doesn't always work.
39188      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39189      if test -z "$is_absolute_path"; then
39190        # Path to executable is not absolute. Find it.
39191        IFS_save="$IFS"
39192        IFS=:
39193        for p in $PATH; do
39194          if test -f "$p/$path" && test -x "$p/$path"; then
39195            new_path="$p/$path"
39196            break
39197          fi
39198        done
39199        IFS="$IFS_save"
39200      else
39201        # This is an absolute path, we can use it without further modifications.
39202        new_path="$path"
39203      fi
39204
39205      if test "x$new_path" = x; then
39206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39207$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39208        has_space=`$ECHO "$complete" | $GREP " "`
39209        if test "x$has_space" != x; then
39210          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39212        fi
39213        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39214      fi
39215    fi
39216
39217    # Now join together the path and the arguments once again
39218    if test "x$arguments" != xEOL; then
39219      new_complete="$new_path ${arguments% *}"
39220    else
39221      new_complete="$new_path"
39222    fi
39223
39224    if test "x$complete" != "x$new_complete"; then
39225      RC="$new_complete"
39226      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39227$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39228    fi
39229  fi
39230
39231    # Extract the first word of "dumpbin", so it can be a program name with args.
39232set dummy dumpbin; ac_word=$2
39233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39234$as_echo_n "checking for $ac_word... " >&6; }
39235if ${ac_cv_prog_DUMPBIN+:} false; then :
39236  $as_echo_n "(cached) " >&6
39237else
39238  if test -n "$DUMPBIN"; then
39239  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39240else
39241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39242for as_dir in $PATH
39243do
39244  IFS=$as_save_IFS
39245  test -z "$as_dir" && as_dir=.
39246    for ac_exec_ext in '' $ac_executable_extensions; do
39247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39248    ac_cv_prog_DUMPBIN="dumpbin"
39249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39250    break 2
39251  fi
39252done
39253  done
39254IFS=$as_save_IFS
39255
39256fi
39257fi
39258DUMPBIN=$ac_cv_prog_DUMPBIN
39259if test -n "$DUMPBIN"; then
39260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39261$as_echo "$DUMPBIN" >&6; }
39262else
39263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39264$as_echo "no" >&6; }
39265fi
39266
39267
39268
39269  # Only process if variable expands to non-empty
39270
39271  if test "x$DUMPBIN" != x; then
39272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39273
39274  # First separate the path from the arguments. This will split at the first
39275  # space.
39276  complete="$DUMPBIN"
39277  path="${complete%% *}"
39278  tmp="$complete EOL"
39279  arguments="${tmp#* }"
39280
39281  # Input might be given as Windows format, start by converting to
39282  # unix format.
39283  new_path=`$CYGPATH -u "$path"`
39284
39285  # Now try to locate executable using which
39286  new_path=`$WHICH "$new_path" 2> /dev/null`
39287  # bat and cmd files are not always considered executable in cygwin causing which
39288  # to not find them
39289  if test "x$new_path" = x \
39290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39292    new_path=`$CYGPATH -u "$path"`
39293  fi
39294  if test "x$new_path" = x; then
39295    # Oops. Which didn't find the executable.
39296    # The splitting of arguments from the executable at a space might have been incorrect,
39297    # since paths with space are more likely in Windows. Give it another try with the whole
39298    # argument.
39299    path="$complete"
39300    arguments="EOL"
39301    new_path=`$CYGPATH -u "$path"`
39302    new_path=`$WHICH "$new_path" 2> /dev/null`
39303    # bat and cmd files are not always considered executable in cygwin causing which
39304    # to not find them
39305    if test "x$new_path" = x \
39306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39308      new_path=`$CYGPATH -u "$path"`
39309    fi
39310    if test "x$new_path" = x; then
39311      # It's still not found. Now this is an unrecoverable error.
39312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39313$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39314      has_space=`$ECHO "$complete" | $GREP " "`
39315      if test "x$has_space" != x; then
39316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39318      fi
39319      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39320    fi
39321  fi
39322
39323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39326  # "foo.exe" is OK but "foo" is an error.
39327  #
39328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39329  # It is also a way to make sure we got the proper file name for the real test later on.
39330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39331  if test "x$test_shortpath" = x; then
39332    # Short path failed, file does not exist as specified.
39333    # Try adding .exe or .cmd
39334    if test -f "${new_path}.exe"; then
39335      input_to_shortpath="${new_path}.exe"
39336    elif test -f "${new_path}.cmd"; then
39337      input_to_shortpath="${new_path}.cmd"
39338    else
39339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39340$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39343      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39344    fi
39345  else
39346    input_to_shortpath="$new_path"
39347  fi
39348
39349  # Call helper function which possibly converts this using DOS-style short mode.
39350  # If so, the updated path is stored in $new_path.
39351  new_path="$input_to_shortpath"
39352
39353  input_path="$input_to_shortpath"
39354  # Check if we need to convert this using DOS-style short mode. If the path
39355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39356  # take no chances and rewrite it.
39357  # Note: m4 eats our [], so we need to use [ and ] instead.
39358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39359  if test "x$has_forbidden_chars" != x; then
39360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39364      # Going to short mode and back again did indeed matter. Since short mode is
39365      # case insensitive, let's make it lowercase to improve readability.
39366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39367      # Now convert it back to Unix-style (cygpath)
39368      input_path=`$CYGPATH -u "$shortmode_path"`
39369      new_path="$input_path"
39370    fi
39371  fi
39372
39373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39374  if test "x$test_cygdrive_prefix" = x; then
39375    # As a simple fix, exclude /usr/bin since it's not a real path.
39376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39378      # a path prefixed by /cygdrive for fixpath to work.
39379      new_path="$CYGWIN_ROOT_PATH$input_path"
39380    fi
39381  fi
39382
39383  # remove trailing .exe if any
39384  new_path="${new_path/%.exe/}"
39385
39386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39387
39388  # First separate the path from the arguments. This will split at the first
39389  # space.
39390  complete="$DUMPBIN"
39391  path="${complete%% *}"
39392  tmp="$complete EOL"
39393  arguments="${tmp#* }"
39394
39395  # Input might be given as Windows format, start by converting to
39396  # unix format.
39397  new_path="$path"
39398
39399  windows_path="$new_path"
39400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39401    unix_path=`$CYGPATH -u "$windows_path"`
39402    new_path="$unix_path"
39403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39405    new_path="$unix_path"
39406  fi
39407
39408
39409  # Now try to locate executable using which
39410  new_path=`$WHICH "$new_path" 2> /dev/null`
39411
39412  if test "x$new_path" = x; then
39413    # Oops. Which didn't find the executable.
39414    # The splitting of arguments from the executable at a space might have been incorrect,
39415    # since paths with space are more likely in Windows. Give it another try with the whole
39416    # argument.
39417    path="$complete"
39418    arguments="EOL"
39419    new_path="$path"
39420
39421  windows_path="$new_path"
39422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39423    unix_path=`$CYGPATH -u "$windows_path"`
39424    new_path="$unix_path"
39425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39427    new_path="$unix_path"
39428  fi
39429
39430
39431    new_path=`$WHICH "$new_path" 2> /dev/null`
39432    # bat and cmd files are not always considered executable in MSYS causing which
39433    # to not find them
39434    if test "x$new_path" = x \
39435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39437      new_path="$path"
39438
39439  windows_path="$new_path"
39440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39441    unix_path=`$CYGPATH -u "$windows_path"`
39442    new_path="$unix_path"
39443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39445    new_path="$unix_path"
39446  fi
39447
39448    fi
39449
39450    if test "x$new_path" = x; then
39451      # It's still not found. Now this is an unrecoverable error.
39452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39453$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39454      has_space=`$ECHO "$complete" | $GREP " "`
39455      if test "x$has_space" != x; then
39456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39458      fi
39459      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39460    fi
39461  fi
39462
39463  # Now new_path has a complete unix path to the binary
39464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39465    # Keep paths in /bin as-is, but remove trailing .exe if any
39466    new_path="${new_path/%.exe/}"
39467    # Do not save /bin paths to all_fixpath_prefixes!
39468  else
39469    # Not in mixed or Windows style, start by that.
39470    new_path=`cmd //c echo $new_path`
39471
39472  input_path="$new_path"
39473  # Check if we need to convert this using DOS-style short mode. If the path
39474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39475  # take no chances and rewrite it.
39476  # Note: m4 eats our [], so we need to use [ and ] instead.
39477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39478  if test "x$has_forbidden_chars" != x; then
39479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39481  fi
39482
39483    # Output is in $new_path
39484
39485  windows_path="$new_path"
39486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39487    unix_path=`$CYGPATH -u "$windows_path"`
39488    new_path="$unix_path"
39489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39491    new_path="$unix_path"
39492  fi
39493
39494    # remove trailing .exe if any
39495    new_path="${new_path/%.exe/}"
39496
39497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39499  fi
39500
39501    else
39502      # We're on a unix platform. Hooray! :)
39503      # First separate the path from the arguments. This will split at the first
39504      # space.
39505      complete="$DUMPBIN"
39506      path="${complete%% *}"
39507      tmp="$complete EOL"
39508      arguments="${tmp#* }"
39509
39510      # Cannot rely on the command "which" here since it doesn't always work.
39511      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39512      if test -z "$is_absolute_path"; then
39513        # Path to executable is not absolute. Find it.
39514        IFS_save="$IFS"
39515        IFS=:
39516        for p in $PATH; do
39517          if test -f "$p/$path" && test -x "$p/$path"; then
39518            new_path="$p/$path"
39519            break
39520          fi
39521        done
39522        IFS="$IFS_save"
39523      else
39524        # This is an absolute path, we can use it without further modifications.
39525        new_path="$path"
39526      fi
39527
39528      if test "x$new_path" = x; then
39529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39530$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39531        has_space=`$ECHO "$complete" | $GREP " "`
39532        if test "x$has_space" != x; then
39533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39535        fi
39536        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39537      fi
39538    fi
39539
39540    # Now join together the path and the arguments once again
39541    if test "x$arguments" != xEOL; then
39542      new_complete="$new_path ${arguments% *}"
39543    else
39544      new_complete="$new_path"
39545    fi
39546
39547    if test "x$complete" != "x$new_complete"; then
39548      DUMPBIN="$new_complete"
39549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39550$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39551    fi
39552  fi
39553
39554    # We need to check for 'msbuild.exe' because at the place where we expect to
39555    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39556    # won't find the 'msbuild.exe' executable in that case (and the
39557    # 'ac_executable_extensions' is unusable due to performance reasons).
39558    # Notice that we intentionally don't fix up the path to MSBUILD because we
39559    # will call it in a DOS shell during freetype detection on Windows (see
39560    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39561    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39562set dummy msbuild.exe; ac_word=$2
39563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39564$as_echo_n "checking for $ac_word... " >&6; }
39565if ${ac_cv_prog_MSBUILD+:} false; then :
39566  $as_echo_n "(cached) " >&6
39567else
39568  if test -n "$MSBUILD"; then
39569  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39570else
39571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39572for as_dir in $PATH
39573do
39574  IFS=$as_save_IFS
39575  test -z "$as_dir" && as_dir=.
39576    for ac_exec_ext in '' $ac_executable_extensions; do
39577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39578    ac_cv_prog_MSBUILD="msbuild.exe"
39579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39580    break 2
39581  fi
39582done
39583  done
39584IFS=$as_save_IFS
39585
39586fi
39587fi
39588MSBUILD=$ac_cv_prog_MSBUILD
39589if test -n "$MSBUILD"; then
39590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39591$as_echo "$MSBUILD" >&6; }
39592else
39593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39594$as_echo "no" >&6; }
39595fi
39596
39597
39598  fi
39599
39600  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39601
39602
39603  # Publish this variable in the help.
39604
39605
39606  if [ -z "${STRIP+x}" ]; then
39607    # The variable is not set by user, try to locate tool using the code snippet
39608    for ac_prog in strip
39609do
39610  # Extract the first word of "$ac_prog", so it can be a program name with args.
39611set dummy $ac_prog; ac_word=$2
39612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39613$as_echo_n "checking for $ac_word... " >&6; }
39614if ${ac_cv_path_STRIP+:} false; then :
39615  $as_echo_n "(cached) " >&6
39616else
39617  case $STRIP in
39618  [\\/]* | ?:[\\/]*)
39619  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39620  ;;
39621  *)
39622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39623for as_dir in $PATH
39624do
39625  IFS=$as_save_IFS
39626  test -z "$as_dir" && as_dir=.
39627    for ac_exec_ext in '' $ac_executable_extensions; do
39628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39629    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39631    break 2
39632  fi
39633done
39634  done
39635IFS=$as_save_IFS
39636
39637  ;;
39638esac
39639fi
39640STRIP=$ac_cv_path_STRIP
39641if test -n "$STRIP"; then
39642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39643$as_echo "$STRIP" >&6; }
39644else
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39646$as_echo "no" >&6; }
39647fi
39648
39649
39650  test -n "$STRIP" && break
39651done
39652
39653  else
39654    # The variable is set, but is it from the command line or the environment?
39655
39656    # Try to remove the string !STRIP! from our list.
39657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39659      # If it failed, the variable was not from the command line. Ignore it,
39660      # but warn the user (except for BASH, which is always set by the calling BASH).
39661      if test "xSTRIP" != xBASH; then
39662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39663$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39664      fi
39665      # Try to locate tool using the code snippet
39666      for ac_prog in strip
39667do
39668  # Extract the first word of "$ac_prog", so it can be a program name with args.
39669set dummy $ac_prog; ac_word=$2
39670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39671$as_echo_n "checking for $ac_word... " >&6; }
39672if ${ac_cv_path_STRIP+:} false; then :
39673  $as_echo_n "(cached) " >&6
39674else
39675  case $STRIP in
39676  [\\/]* | ?:[\\/]*)
39677  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39678  ;;
39679  *)
39680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39681for as_dir in $PATH
39682do
39683  IFS=$as_save_IFS
39684  test -z "$as_dir" && as_dir=.
39685    for ac_exec_ext in '' $ac_executable_extensions; do
39686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39687    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39689    break 2
39690  fi
39691done
39692  done
39693IFS=$as_save_IFS
39694
39695  ;;
39696esac
39697fi
39698STRIP=$ac_cv_path_STRIP
39699if test -n "$STRIP"; then
39700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39701$as_echo "$STRIP" >&6; }
39702else
39703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39704$as_echo "no" >&6; }
39705fi
39706
39707
39708  test -n "$STRIP" && break
39709done
39710
39711    else
39712      # If it succeeded, then it was overridden by the user. We will use it
39713      # for the tool.
39714
39715      # First remove it from the list of overridden variables, so we can test
39716      # for unknown variables in the end.
39717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39718
39719      # Check if we try to supply an empty value
39720      if test "x$STRIP" = x; then
39721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39722$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39724$as_echo_n "checking for STRIP... " >&6; }
39725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39726$as_echo "disabled" >&6; }
39727      else
39728        # Check if the provided tool contains a complete path.
39729        tool_specified="$STRIP"
39730        tool_basename="${tool_specified##*/}"
39731        if test "x$tool_basename" = "x$tool_specified"; then
39732          # A command without a complete path is provided, search $PATH.
39733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39734$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39735          # Extract the first word of "$tool_basename", so it can be a program name with args.
39736set dummy $tool_basename; ac_word=$2
39737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39738$as_echo_n "checking for $ac_word... " >&6; }
39739if ${ac_cv_path_STRIP+:} false; then :
39740  $as_echo_n "(cached) " >&6
39741else
39742  case $STRIP in
39743  [\\/]* | ?:[\\/]*)
39744  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39745  ;;
39746  *)
39747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39748for as_dir in $PATH
39749do
39750  IFS=$as_save_IFS
39751  test -z "$as_dir" && as_dir=.
39752    for ac_exec_ext in '' $ac_executable_extensions; do
39753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39754    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39756    break 2
39757  fi
39758done
39759  done
39760IFS=$as_save_IFS
39761
39762  ;;
39763esac
39764fi
39765STRIP=$ac_cv_path_STRIP
39766if test -n "$STRIP"; then
39767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39768$as_echo "$STRIP" >&6; }
39769else
39770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39771$as_echo "no" >&6; }
39772fi
39773
39774
39775          if test "x$STRIP" = x; then
39776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39777          fi
39778        else
39779          # Otherwise we believe it is a complete path. Use it as it is.
39780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39781$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39783$as_echo_n "checking for STRIP... " >&6; }
39784          if test ! -x "$tool_specified"; then
39785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39786$as_echo "not found" >&6; }
39787            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39788          fi
39789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39790$as_echo "$tool_specified" >&6; }
39791        fi
39792      fi
39793    fi
39794
39795  fi
39796
39797
39798
39799  # Only process if variable expands to non-empty
39800
39801  if test "x$STRIP" != x; then
39802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39803
39804  # First separate the path from the arguments. This will split at the first
39805  # space.
39806  complete="$STRIP"
39807  path="${complete%% *}"
39808  tmp="$complete EOL"
39809  arguments="${tmp#* }"
39810
39811  # Input might be given as Windows format, start by converting to
39812  # unix format.
39813  new_path=`$CYGPATH -u "$path"`
39814
39815  # Now try to locate executable using which
39816  new_path=`$WHICH "$new_path" 2> /dev/null`
39817  # bat and cmd files are not always considered executable in cygwin causing which
39818  # to not find them
39819  if test "x$new_path" = x \
39820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39822    new_path=`$CYGPATH -u "$path"`
39823  fi
39824  if test "x$new_path" = x; then
39825    # Oops. Which didn't find the executable.
39826    # The splitting of arguments from the executable at a space might have been incorrect,
39827    # since paths with space are more likely in Windows. Give it another try with the whole
39828    # argument.
39829    path="$complete"
39830    arguments="EOL"
39831    new_path=`$CYGPATH -u "$path"`
39832    new_path=`$WHICH "$new_path" 2> /dev/null`
39833    # bat and cmd files are not always considered executable in cygwin causing which
39834    # to not find them
39835    if test "x$new_path" = x \
39836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39838      new_path=`$CYGPATH -u "$path"`
39839    fi
39840    if test "x$new_path" = x; then
39841      # It's still not found. Now this is an unrecoverable error.
39842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39843$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39844      has_space=`$ECHO "$complete" | $GREP " "`
39845      if test "x$has_space" != x; then
39846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39848      fi
39849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39850    fi
39851  fi
39852
39853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39856  # "foo.exe" is OK but "foo" is an error.
39857  #
39858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39859  # It is also a way to make sure we got the proper file name for the real test later on.
39860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39861  if test "x$test_shortpath" = x; then
39862    # Short path failed, file does not exist as specified.
39863    # Try adding .exe or .cmd
39864    if test -f "${new_path}.exe"; then
39865      input_to_shortpath="${new_path}.exe"
39866    elif test -f "${new_path}.cmd"; then
39867      input_to_shortpath="${new_path}.cmd"
39868    else
39869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39870$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39873      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39874    fi
39875  else
39876    input_to_shortpath="$new_path"
39877  fi
39878
39879  # Call helper function which possibly converts this using DOS-style short mode.
39880  # If so, the updated path is stored in $new_path.
39881  new_path="$input_to_shortpath"
39882
39883  input_path="$input_to_shortpath"
39884  # Check if we need to convert this using DOS-style short mode. If the path
39885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39886  # take no chances and rewrite it.
39887  # Note: m4 eats our [], so we need to use [ and ] instead.
39888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39889  if test "x$has_forbidden_chars" != x; then
39890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39894      # Going to short mode and back again did indeed matter. Since short mode is
39895      # case insensitive, let's make it lowercase to improve readability.
39896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39897      # Now convert it back to Unix-style (cygpath)
39898      input_path=`$CYGPATH -u "$shortmode_path"`
39899      new_path="$input_path"
39900    fi
39901  fi
39902
39903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39904  if test "x$test_cygdrive_prefix" = x; then
39905    # As a simple fix, exclude /usr/bin since it's not a real path.
39906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39908      # a path prefixed by /cygdrive for fixpath to work.
39909      new_path="$CYGWIN_ROOT_PATH$input_path"
39910    fi
39911  fi
39912
39913  # remove trailing .exe if any
39914  new_path="${new_path/%.exe/}"
39915
39916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39917
39918  # First separate the path from the arguments. This will split at the first
39919  # space.
39920  complete="$STRIP"
39921  path="${complete%% *}"
39922  tmp="$complete EOL"
39923  arguments="${tmp#* }"
39924
39925  # Input might be given as Windows format, start by converting to
39926  # unix format.
39927  new_path="$path"
39928
39929  windows_path="$new_path"
39930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39931    unix_path=`$CYGPATH -u "$windows_path"`
39932    new_path="$unix_path"
39933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39935    new_path="$unix_path"
39936  fi
39937
39938
39939  # Now try to locate executable using which
39940  new_path=`$WHICH "$new_path" 2> /dev/null`
39941
39942  if test "x$new_path" = x; then
39943    # Oops. Which didn't find the executable.
39944    # The splitting of arguments from the executable at a space might have been incorrect,
39945    # since paths with space are more likely in Windows. Give it another try with the whole
39946    # argument.
39947    path="$complete"
39948    arguments="EOL"
39949    new_path="$path"
39950
39951  windows_path="$new_path"
39952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39953    unix_path=`$CYGPATH -u "$windows_path"`
39954    new_path="$unix_path"
39955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39957    new_path="$unix_path"
39958  fi
39959
39960
39961    new_path=`$WHICH "$new_path" 2> /dev/null`
39962    # bat and cmd files are not always considered executable in MSYS causing which
39963    # to not find them
39964    if test "x$new_path" = x \
39965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39967      new_path="$path"
39968
39969  windows_path="$new_path"
39970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39971    unix_path=`$CYGPATH -u "$windows_path"`
39972    new_path="$unix_path"
39973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39975    new_path="$unix_path"
39976  fi
39977
39978    fi
39979
39980    if test "x$new_path" = x; then
39981      # It's still not found. Now this is an unrecoverable error.
39982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39983$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39984      has_space=`$ECHO "$complete" | $GREP " "`
39985      if test "x$has_space" != x; then
39986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39988      fi
39989      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39990    fi
39991  fi
39992
39993  # Now new_path has a complete unix path to the binary
39994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39995    # Keep paths in /bin as-is, but remove trailing .exe if any
39996    new_path="${new_path/%.exe/}"
39997    # Do not save /bin paths to all_fixpath_prefixes!
39998  else
39999    # Not in mixed or Windows style, start by that.
40000    new_path=`cmd //c echo $new_path`
40001
40002  input_path="$new_path"
40003  # Check if we need to convert this using DOS-style short mode. If the path
40004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40005  # take no chances and rewrite it.
40006  # Note: m4 eats our [], so we need to use [ and ] instead.
40007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40008  if test "x$has_forbidden_chars" != x; then
40009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40011  fi
40012
40013    # Output is in $new_path
40014
40015  windows_path="$new_path"
40016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40017    unix_path=`$CYGPATH -u "$windows_path"`
40018    new_path="$unix_path"
40019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40021    new_path="$unix_path"
40022  fi
40023
40024    # remove trailing .exe if any
40025    new_path="${new_path/%.exe/}"
40026
40027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40029  fi
40030
40031    else
40032      # We're on a unix platform. Hooray! :)
40033      # First separate the path from the arguments. This will split at the first
40034      # space.
40035      complete="$STRIP"
40036      path="${complete%% *}"
40037      tmp="$complete EOL"
40038      arguments="${tmp#* }"
40039
40040      # Cannot rely on the command "which" here since it doesn't always work.
40041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40042      if test -z "$is_absolute_path"; then
40043        # Path to executable is not absolute. Find it.
40044        IFS_save="$IFS"
40045        IFS=:
40046        for p in $PATH; do
40047          if test -f "$p/$path" && test -x "$p/$path"; then
40048            new_path="$p/$path"
40049            break
40050          fi
40051        done
40052        IFS="$IFS_save"
40053      else
40054        # This is an absolute path, we can use it without further modifications.
40055        new_path="$path"
40056      fi
40057
40058      if test "x$new_path" = x; then
40059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40060$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40061        has_space=`$ECHO "$complete" | $GREP " "`
40062        if test "x$has_space" != x; then
40063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40065        fi
40066        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40067      fi
40068    fi
40069
40070    # Now join together the path and the arguments once again
40071    if test "x$arguments" != xEOL; then
40072      new_complete="$new_path ${arguments% *}"
40073    else
40074      new_complete="$new_path"
40075    fi
40076
40077    if test "x$complete" != "x$new_complete"; then
40078      STRIP="$new_complete"
40079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40080$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40081    fi
40082  fi
40083
40084
40085
40086  # Publish this variable in the help.
40087
40088
40089  if [ -z "${NM+x}" ]; then
40090    # The variable is not set by user, try to locate tool using the code snippet
40091    for ac_prog in nm
40092do
40093  # Extract the first word of "$ac_prog", so it can be a program name with args.
40094set dummy $ac_prog; ac_word=$2
40095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40096$as_echo_n "checking for $ac_word... " >&6; }
40097if ${ac_cv_path_NM+:} false; then :
40098  $as_echo_n "(cached) " >&6
40099else
40100  case $NM in
40101  [\\/]* | ?:[\\/]*)
40102  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40103  ;;
40104  *)
40105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40106for as_dir in $PATH
40107do
40108  IFS=$as_save_IFS
40109  test -z "$as_dir" && as_dir=.
40110    for ac_exec_ext in '' $ac_executable_extensions; do
40111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40112    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40114    break 2
40115  fi
40116done
40117  done
40118IFS=$as_save_IFS
40119
40120  ;;
40121esac
40122fi
40123NM=$ac_cv_path_NM
40124if test -n "$NM"; then
40125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40126$as_echo "$NM" >&6; }
40127else
40128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40129$as_echo "no" >&6; }
40130fi
40131
40132
40133  test -n "$NM" && break
40134done
40135
40136  else
40137    # The variable is set, but is it from the command line or the environment?
40138
40139    # Try to remove the string !NM! from our list.
40140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40142      # If it failed, the variable was not from the command line. Ignore it,
40143      # but warn the user (except for BASH, which is always set by the calling BASH).
40144      if test "xNM" != xBASH; then
40145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40146$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40147      fi
40148      # Try to locate tool using the code snippet
40149      for ac_prog in nm
40150do
40151  # Extract the first word of "$ac_prog", so it can be a program name with args.
40152set dummy $ac_prog; ac_word=$2
40153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40154$as_echo_n "checking for $ac_word... " >&6; }
40155if ${ac_cv_path_NM+:} false; then :
40156  $as_echo_n "(cached) " >&6
40157else
40158  case $NM in
40159  [\\/]* | ?:[\\/]*)
40160  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40161  ;;
40162  *)
40163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40164for as_dir in $PATH
40165do
40166  IFS=$as_save_IFS
40167  test -z "$as_dir" && as_dir=.
40168    for ac_exec_ext in '' $ac_executable_extensions; do
40169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40170    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40172    break 2
40173  fi
40174done
40175  done
40176IFS=$as_save_IFS
40177
40178  ;;
40179esac
40180fi
40181NM=$ac_cv_path_NM
40182if test -n "$NM"; then
40183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40184$as_echo "$NM" >&6; }
40185else
40186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40187$as_echo "no" >&6; }
40188fi
40189
40190
40191  test -n "$NM" && break
40192done
40193
40194    else
40195      # If it succeeded, then it was overridden by the user. We will use it
40196      # for the tool.
40197
40198      # First remove it from the list of overridden variables, so we can test
40199      # for unknown variables in the end.
40200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40201
40202      # Check if we try to supply an empty value
40203      if test "x$NM" = x; then
40204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40205$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40207$as_echo_n "checking for NM... " >&6; }
40208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40209$as_echo "disabled" >&6; }
40210      else
40211        # Check if the provided tool contains a complete path.
40212        tool_specified="$NM"
40213        tool_basename="${tool_specified##*/}"
40214        if test "x$tool_basename" = "x$tool_specified"; then
40215          # A command without a complete path is provided, search $PATH.
40216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40217$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40218          # Extract the first word of "$tool_basename", so it can be a program name with args.
40219set dummy $tool_basename; ac_word=$2
40220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40221$as_echo_n "checking for $ac_word... " >&6; }
40222if ${ac_cv_path_NM+:} false; then :
40223  $as_echo_n "(cached) " >&6
40224else
40225  case $NM in
40226  [\\/]* | ?:[\\/]*)
40227  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40228  ;;
40229  *)
40230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40231for as_dir in $PATH
40232do
40233  IFS=$as_save_IFS
40234  test -z "$as_dir" && as_dir=.
40235    for ac_exec_ext in '' $ac_executable_extensions; do
40236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40237    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40239    break 2
40240  fi
40241done
40242  done
40243IFS=$as_save_IFS
40244
40245  ;;
40246esac
40247fi
40248NM=$ac_cv_path_NM
40249if test -n "$NM"; then
40250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40251$as_echo "$NM" >&6; }
40252else
40253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40254$as_echo "no" >&6; }
40255fi
40256
40257
40258          if test "x$NM" = x; then
40259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40260          fi
40261        else
40262          # Otherwise we believe it is a complete path. Use it as it is.
40263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40264$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40266$as_echo_n "checking for NM... " >&6; }
40267          if test ! -x "$tool_specified"; then
40268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40269$as_echo "not found" >&6; }
40270            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40271          fi
40272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40273$as_echo "$tool_specified" >&6; }
40274        fi
40275      fi
40276    fi
40277
40278  fi
40279
40280
40281
40282  # Only process if variable expands to non-empty
40283
40284  if test "x$NM" != x; then
40285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40286
40287  # First separate the path from the arguments. This will split at the first
40288  # space.
40289  complete="$NM"
40290  path="${complete%% *}"
40291  tmp="$complete EOL"
40292  arguments="${tmp#* }"
40293
40294  # Input might be given as Windows format, start by converting to
40295  # unix format.
40296  new_path=`$CYGPATH -u "$path"`
40297
40298  # Now try to locate executable using which
40299  new_path=`$WHICH "$new_path" 2> /dev/null`
40300  # bat and cmd files are not always considered executable in cygwin causing which
40301  # to not find them
40302  if test "x$new_path" = x \
40303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40305    new_path=`$CYGPATH -u "$path"`
40306  fi
40307  if test "x$new_path" = x; then
40308    # Oops. Which didn't find the executable.
40309    # The splitting of arguments from the executable at a space might have been incorrect,
40310    # since paths with space are more likely in Windows. Give it another try with the whole
40311    # argument.
40312    path="$complete"
40313    arguments="EOL"
40314    new_path=`$CYGPATH -u "$path"`
40315    new_path=`$WHICH "$new_path" 2> /dev/null`
40316    # bat and cmd files are not always considered executable in cygwin causing which
40317    # to not find them
40318    if test "x$new_path" = x \
40319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40321      new_path=`$CYGPATH -u "$path"`
40322    fi
40323    if test "x$new_path" = x; then
40324      # It's still not found. Now this is an unrecoverable error.
40325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40326$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40327      has_space=`$ECHO "$complete" | $GREP " "`
40328      if test "x$has_space" != x; then
40329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40331      fi
40332      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40333    fi
40334  fi
40335
40336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40339  # "foo.exe" is OK but "foo" is an error.
40340  #
40341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40342  # It is also a way to make sure we got the proper file name for the real test later on.
40343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40344  if test "x$test_shortpath" = x; then
40345    # Short path failed, file does not exist as specified.
40346    # Try adding .exe or .cmd
40347    if test -f "${new_path}.exe"; then
40348      input_to_shortpath="${new_path}.exe"
40349    elif test -f "${new_path}.cmd"; then
40350      input_to_shortpath="${new_path}.cmd"
40351    else
40352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40353$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40356      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40357    fi
40358  else
40359    input_to_shortpath="$new_path"
40360  fi
40361
40362  # Call helper function which possibly converts this using DOS-style short mode.
40363  # If so, the updated path is stored in $new_path.
40364  new_path="$input_to_shortpath"
40365
40366  input_path="$input_to_shortpath"
40367  # Check if we need to convert this using DOS-style short mode. If the path
40368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40369  # take no chances and rewrite it.
40370  # Note: m4 eats our [], so we need to use [ and ] instead.
40371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40372  if test "x$has_forbidden_chars" != x; then
40373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40377      # Going to short mode and back again did indeed matter. Since short mode is
40378      # case insensitive, let's make it lowercase to improve readability.
40379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40380      # Now convert it back to Unix-style (cygpath)
40381      input_path=`$CYGPATH -u "$shortmode_path"`
40382      new_path="$input_path"
40383    fi
40384  fi
40385
40386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40387  if test "x$test_cygdrive_prefix" = x; then
40388    # As a simple fix, exclude /usr/bin since it's not a real path.
40389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40391      # a path prefixed by /cygdrive for fixpath to work.
40392      new_path="$CYGWIN_ROOT_PATH$input_path"
40393    fi
40394  fi
40395
40396  # remove trailing .exe if any
40397  new_path="${new_path/%.exe/}"
40398
40399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40400
40401  # First separate the path from the arguments. This will split at the first
40402  # space.
40403  complete="$NM"
40404  path="${complete%% *}"
40405  tmp="$complete EOL"
40406  arguments="${tmp#* }"
40407
40408  # Input might be given as Windows format, start by converting to
40409  # unix format.
40410  new_path="$path"
40411
40412  windows_path="$new_path"
40413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40414    unix_path=`$CYGPATH -u "$windows_path"`
40415    new_path="$unix_path"
40416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40418    new_path="$unix_path"
40419  fi
40420
40421
40422  # Now try to locate executable using which
40423  new_path=`$WHICH "$new_path" 2> /dev/null`
40424
40425  if test "x$new_path" = x; then
40426    # Oops. Which didn't find the executable.
40427    # The splitting of arguments from the executable at a space might have been incorrect,
40428    # since paths with space are more likely in Windows. Give it another try with the whole
40429    # argument.
40430    path="$complete"
40431    arguments="EOL"
40432    new_path="$path"
40433
40434  windows_path="$new_path"
40435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40436    unix_path=`$CYGPATH -u "$windows_path"`
40437    new_path="$unix_path"
40438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40440    new_path="$unix_path"
40441  fi
40442
40443
40444    new_path=`$WHICH "$new_path" 2> /dev/null`
40445    # bat and cmd files are not always considered executable in MSYS causing which
40446    # to not find them
40447    if test "x$new_path" = x \
40448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40450      new_path="$path"
40451
40452  windows_path="$new_path"
40453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40454    unix_path=`$CYGPATH -u "$windows_path"`
40455    new_path="$unix_path"
40456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40458    new_path="$unix_path"
40459  fi
40460
40461    fi
40462
40463    if test "x$new_path" = x; then
40464      # It's still not found. Now this is an unrecoverable error.
40465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40466$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40467      has_space=`$ECHO "$complete" | $GREP " "`
40468      if test "x$has_space" != x; then
40469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40471      fi
40472      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40473    fi
40474  fi
40475
40476  # Now new_path has a complete unix path to the binary
40477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40478    # Keep paths in /bin as-is, but remove trailing .exe if any
40479    new_path="${new_path/%.exe/}"
40480    # Do not save /bin paths to all_fixpath_prefixes!
40481  else
40482    # Not in mixed or Windows style, start by that.
40483    new_path=`cmd //c echo $new_path`
40484
40485  input_path="$new_path"
40486  # Check if we need to convert this using DOS-style short mode. If the path
40487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40488  # take no chances and rewrite it.
40489  # Note: m4 eats our [], so we need to use [ and ] instead.
40490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40491  if test "x$has_forbidden_chars" != x; then
40492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40494  fi
40495
40496    # Output is in $new_path
40497
40498  windows_path="$new_path"
40499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40500    unix_path=`$CYGPATH -u "$windows_path"`
40501    new_path="$unix_path"
40502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40504    new_path="$unix_path"
40505  fi
40506
40507    # remove trailing .exe if any
40508    new_path="${new_path/%.exe/}"
40509
40510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40512  fi
40513
40514    else
40515      # We're on a unix platform. Hooray! :)
40516      # First separate the path from the arguments. This will split at the first
40517      # space.
40518      complete="$NM"
40519      path="${complete%% *}"
40520      tmp="$complete EOL"
40521      arguments="${tmp#* }"
40522
40523      # Cannot rely on the command "which" here since it doesn't always work.
40524      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40525      if test -z "$is_absolute_path"; then
40526        # Path to executable is not absolute. Find it.
40527        IFS_save="$IFS"
40528        IFS=:
40529        for p in $PATH; do
40530          if test -f "$p/$path" && test -x "$p/$path"; then
40531            new_path="$p/$path"
40532            break
40533          fi
40534        done
40535        IFS="$IFS_save"
40536      else
40537        # This is an absolute path, we can use it without further modifications.
40538        new_path="$path"
40539      fi
40540
40541      if test "x$new_path" = x; then
40542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40543$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40544        has_space=`$ECHO "$complete" | $GREP " "`
40545        if test "x$has_space" != x; then
40546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40548        fi
40549        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40550      fi
40551    fi
40552
40553    # Now join together the path and the arguments once again
40554    if test "x$arguments" != xEOL; then
40555      new_complete="$new_path ${arguments% *}"
40556    else
40557      new_complete="$new_path"
40558    fi
40559
40560    if test "x$complete" != "x$new_complete"; then
40561      NM="$new_complete"
40562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40563$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40564    fi
40565  fi
40566
40567
40568
40569  # Publish this variable in the help.
40570
40571
40572  if [ -z "${GNM+x}" ]; then
40573    # The variable is not set by user, try to locate tool using the code snippet
40574    for ac_prog in gnm
40575do
40576  # Extract the first word of "$ac_prog", so it can be a program name with args.
40577set dummy $ac_prog; ac_word=$2
40578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40579$as_echo_n "checking for $ac_word... " >&6; }
40580if ${ac_cv_path_GNM+:} false; then :
40581  $as_echo_n "(cached) " >&6
40582else
40583  case $GNM in
40584  [\\/]* | ?:[\\/]*)
40585  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40586  ;;
40587  *)
40588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40589for as_dir in $PATH
40590do
40591  IFS=$as_save_IFS
40592  test -z "$as_dir" && as_dir=.
40593    for ac_exec_ext in '' $ac_executable_extensions; do
40594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40595    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40597    break 2
40598  fi
40599done
40600  done
40601IFS=$as_save_IFS
40602
40603  ;;
40604esac
40605fi
40606GNM=$ac_cv_path_GNM
40607if test -n "$GNM"; then
40608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40609$as_echo "$GNM" >&6; }
40610else
40611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40612$as_echo "no" >&6; }
40613fi
40614
40615
40616  test -n "$GNM" && break
40617done
40618
40619  else
40620    # The variable is set, but is it from the command line or the environment?
40621
40622    # Try to remove the string !GNM! from our list.
40623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40625      # If it failed, the variable was not from the command line. Ignore it,
40626      # but warn the user (except for BASH, which is always set by the calling BASH).
40627      if test "xGNM" != xBASH; then
40628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40629$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40630      fi
40631      # Try to locate tool using the code snippet
40632      for ac_prog in gnm
40633do
40634  # Extract the first word of "$ac_prog", so it can be a program name with args.
40635set dummy $ac_prog; ac_word=$2
40636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40637$as_echo_n "checking for $ac_word... " >&6; }
40638if ${ac_cv_path_GNM+:} false; then :
40639  $as_echo_n "(cached) " >&6
40640else
40641  case $GNM in
40642  [\\/]* | ?:[\\/]*)
40643  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40644  ;;
40645  *)
40646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40647for as_dir in $PATH
40648do
40649  IFS=$as_save_IFS
40650  test -z "$as_dir" && as_dir=.
40651    for ac_exec_ext in '' $ac_executable_extensions; do
40652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40653    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40655    break 2
40656  fi
40657done
40658  done
40659IFS=$as_save_IFS
40660
40661  ;;
40662esac
40663fi
40664GNM=$ac_cv_path_GNM
40665if test -n "$GNM"; then
40666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40667$as_echo "$GNM" >&6; }
40668else
40669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40670$as_echo "no" >&6; }
40671fi
40672
40673
40674  test -n "$GNM" && break
40675done
40676
40677    else
40678      # If it succeeded, then it was overridden by the user. We will use it
40679      # for the tool.
40680
40681      # First remove it from the list of overridden variables, so we can test
40682      # for unknown variables in the end.
40683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40684
40685      # Check if we try to supply an empty value
40686      if test "x$GNM" = x; then
40687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40688$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40690$as_echo_n "checking for GNM... " >&6; }
40691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40692$as_echo "disabled" >&6; }
40693      else
40694        # Check if the provided tool contains a complete path.
40695        tool_specified="$GNM"
40696        tool_basename="${tool_specified##*/}"
40697        if test "x$tool_basename" = "x$tool_specified"; then
40698          # A command without a complete path is provided, search $PATH.
40699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40700$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40701          # Extract the first word of "$tool_basename", so it can be a program name with args.
40702set dummy $tool_basename; ac_word=$2
40703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40704$as_echo_n "checking for $ac_word... " >&6; }
40705if ${ac_cv_path_GNM+:} false; then :
40706  $as_echo_n "(cached) " >&6
40707else
40708  case $GNM in
40709  [\\/]* | ?:[\\/]*)
40710  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40711  ;;
40712  *)
40713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40714for as_dir in $PATH
40715do
40716  IFS=$as_save_IFS
40717  test -z "$as_dir" && as_dir=.
40718    for ac_exec_ext in '' $ac_executable_extensions; do
40719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40720    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40722    break 2
40723  fi
40724done
40725  done
40726IFS=$as_save_IFS
40727
40728  ;;
40729esac
40730fi
40731GNM=$ac_cv_path_GNM
40732if test -n "$GNM"; then
40733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40734$as_echo "$GNM" >&6; }
40735else
40736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40737$as_echo "no" >&6; }
40738fi
40739
40740
40741          if test "x$GNM" = x; then
40742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40743          fi
40744        else
40745          # Otherwise we believe it is a complete path. Use it as it is.
40746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40747$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40749$as_echo_n "checking for GNM... " >&6; }
40750          if test ! -x "$tool_specified"; then
40751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40752$as_echo "not found" >&6; }
40753            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40754          fi
40755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40756$as_echo "$tool_specified" >&6; }
40757        fi
40758      fi
40759    fi
40760
40761  fi
40762
40763
40764
40765  # Only process if variable expands to non-empty
40766
40767  if test "x$GNM" != x; then
40768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40769
40770  # First separate the path from the arguments. This will split at the first
40771  # space.
40772  complete="$GNM"
40773  path="${complete%% *}"
40774  tmp="$complete EOL"
40775  arguments="${tmp#* }"
40776
40777  # Input might be given as Windows format, start by converting to
40778  # unix format.
40779  new_path=`$CYGPATH -u "$path"`
40780
40781  # Now try to locate executable using which
40782  new_path=`$WHICH "$new_path" 2> /dev/null`
40783  # bat and cmd files are not always considered executable in cygwin causing which
40784  # to not find them
40785  if test "x$new_path" = x \
40786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40788    new_path=`$CYGPATH -u "$path"`
40789  fi
40790  if test "x$new_path" = x; then
40791    # Oops. Which didn't find the executable.
40792    # The splitting of arguments from the executable at a space might have been incorrect,
40793    # since paths with space are more likely in Windows. Give it another try with the whole
40794    # argument.
40795    path="$complete"
40796    arguments="EOL"
40797    new_path=`$CYGPATH -u "$path"`
40798    new_path=`$WHICH "$new_path" 2> /dev/null`
40799    # bat and cmd files are not always considered executable in cygwin causing which
40800    # to not find them
40801    if test "x$new_path" = x \
40802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40804      new_path=`$CYGPATH -u "$path"`
40805    fi
40806    if test "x$new_path" = x; then
40807      # It's still not found. Now this is an unrecoverable error.
40808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40809$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40810      has_space=`$ECHO "$complete" | $GREP " "`
40811      if test "x$has_space" != x; then
40812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40814      fi
40815      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40816    fi
40817  fi
40818
40819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40822  # "foo.exe" is OK but "foo" is an error.
40823  #
40824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40825  # It is also a way to make sure we got the proper file name for the real test later on.
40826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40827  if test "x$test_shortpath" = x; then
40828    # Short path failed, file does not exist as specified.
40829    # Try adding .exe or .cmd
40830    if test -f "${new_path}.exe"; then
40831      input_to_shortpath="${new_path}.exe"
40832    elif test -f "${new_path}.cmd"; then
40833      input_to_shortpath="${new_path}.cmd"
40834    else
40835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40836$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40839      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40840    fi
40841  else
40842    input_to_shortpath="$new_path"
40843  fi
40844
40845  # Call helper function which possibly converts this using DOS-style short mode.
40846  # If so, the updated path is stored in $new_path.
40847  new_path="$input_to_shortpath"
40848
40849  input_path="$input_to_shortpath"
40850  # Check if we need to convert this using DOS-style short mode. If the path
40851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40852  # take no chances and rewrite it.
40853  # Note: m4 eats our [], so we need to use [ and ] instead.
40854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40855  if test "x$has_forbidden_chars" != x; then
40856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40860      # Going to short mode and back again did indeed matter. Since short mode is
40861      # case insensitive, let's make it lowercase to improve readability.
40862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40863      # Now convert it back to Unix-style (cygpath)
40864      input_path=`$CYGPATH -u "$shortmode_path"`
40865      new_path="$input_path"
40866    fi
40867  fi
40868
40869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40870  if test "x$test_cygdrive_prefix" = x; then
40871    # As a simple fix, exclude /usr/bin since it's not a real path.
40872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40874      # a path prefixed by /cygdrive for fixpath to work.
40875      new_path="$CYGWIN_ROOT_PATH$input_path"
40876    fi
40877  fi
40878
40879  # remove trailing .exe if any
40880  new_path="${new_path/%.exe/}"
40881
40882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40883
40884  # First separate the path from the arguments. This will split at the first
40885  # space.
40886  complete="$GNM"
40887  path="${complete%% *}"
40888  tmp="$complete EOL"
40889  arguments="${tmp#* }"
40890
40891  # Input might be given as Windows format, start by converting to
40892  # unix format.
40893  new_path="$path"
40894
40895  windows_path="$new_path"
40896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40897    unix_path=`$CYGPATH -u "$windows_path"`
40898    new_path="$unix_path"
40899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40901    new_path="$unix_path"
40902  fi
40903
40904
40905  # Now try to locate executable using which
40906  new_path=`$WHICH "$new_path" 2> /dev/null`
40907
40908  if test "x$new_path" = x; then
40909    # Oops. Which didn't find the executable.
40910    # The splitting of arguments from the executable at a space might have been incorrect,
40911    # since paths with space are more likely in Windows. Give it another try with the whole
40912    # argument.
40913    path="$complete"
40914    arguments="EOL"
40915    new_path="$path"
40916
40917  windows_path="$new_path"
40918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40919    unix_path=`$CYGPATH -u "$windows_path"`
40920    new_path="$unix_path"
40921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40923    new_path="$unix_path"
40924  fi
40925
40926
40927    new_path=`$WHICH "$new_path" 2> /dev/null`
40928    # bat and cmd files are not always considered executable in MSYS causing which
40929    # to not find them
40930    if test "x$new_path" = x \
40931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40933      new_path="$path"
40934
40935  windows_path="$new_path"
40936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40937    unix_path=`$CYGPATH -u "$windows_path"`
40938    new_path="$unix_path"
40939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40941    new_path="$unix_path"
40942  fi
40943
40944    fi
40945
40946    if test "x$new_path" = x; then
40947      # It's still not found. Now this is an unrecoverable error.
40948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40949$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40950      has_space=`$ECHO "$complete" | $GREP " "`
40951      if test "x$has_space" != x; then
40952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40954      fi
40955      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40956    fi
40957  fi
40958
40959  # Now new_path has a complete unix path to the binary
40960  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40961    # Keep paths in /bin as-is, but remove trailing .exe if any
40962    new_path="${new_path/%.exe/}"
40963    # Do not save /bin paths to all_fixpath_prefixes!
40964  else
40965    # Not in mixed or Windows style, start by that.
40966    new_path=`cmd //c echo $new_path`
40967
40968  input_path="$new_path"
40969  # Check if we need to convert this using DOS-style short mode. If the path
40970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40971  # take no chances and rewrite it.
40972  # Note: m4 eats our [], so we need to use [ and ] instead.
40973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40974  if test "x$has_forbidden_chars" != x; then
40975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40977  fi
40978
40979    # Output is in $new_path
40980
40981  windows_path="$new_path"
40982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40983    unix_path=`$CYGPATH -u "$windows_path"`
40984    new_path="$unix_path"
40985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40987    new_path="$unix_path"
40988  fi
40989
40990    # remove trailing .exe if any
40991    new_path="${new_path/%.exe/}"
40992
40993    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40994    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40995  fi
40996
40997    else
40998      # We're on a unix platform. Hooray! :)
40999      # First separate the path from the arguments. This will split at the first
41000      # space.
41001      complete="$GNM"
41002      path="${complete%% *}"
41003      tmp="$complete EOL"
41004      arguments="${tmp#* }"
41005
41006      # Cannot rely on the command "which" here since it doesn't always work.
41007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41008      if test -z "$is_absolute_path"; then
41009        # Path to executable is not absolute. Find it.
41010        IFS_save="$IFS"
41011        IFS=:
41012        for p in $PATH; do
41013          if test -f "$p/$path" && test -x "$p/$path"; then
41014            new_path="$p/$path"
41015            break
41016          fi
41017        done
41018        IFS="$IFS_save"
41019      else
41020        # This is an absolute path, we can use it without further modifications.
41021        new_path="$path"
41022      fi
41023
41024      if test "x$new_path" = x; then
41025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41026$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41027        has_space=`$ECHO "$complete" | $GREP " "`
41028        if test "x$has_space" != x; then
41029          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41031        fi
41032        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41033      fi
41034    fi
41035
41036    # Now join together the path and the arguments once again
41037    if test "x$arguments" != xEOL; then
41038      new_complete="$new_path ${arguments% *}"
41039    else
41040      new_complete="$new_path"
41041    fi
41042
41043    if test "x$complete" != "x$new_complete"; then
41044      GNM="$new_complete"
41045      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41046$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41047    fi
41048  fi
41049
41050  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41051    # FIXME: we should unify this with the solaris case above.
41052
41053
41054  # Publish this variable in the help.
41055
41056
41057  if [ -z "${STRIP+x}" ]; then
41058    # The variable is not set by user, try to locate tool using the code snippet
41059    if test -n "$ac_tool_prefix"; then
41060  for ac_prog in strip
41061  do
41062    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41063set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41065$as_echo_n "checking for $ac_word... " >&6; }
41066if ${ac_cv_prog_STRIP+:} false; then :
41067  $as_echo_n "(cached) " >&6
41068else
41069  if test -n "$STRIP"; then
41070  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41071else
41072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41073for as_dir in $PATH
41074do
41075  IFS=$as_save_IFS
41076  test -z "$as_dir" && as_dir=.
41077    for ac_exec_ext in '' $ac_executable_extensions; do
41078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41079    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41081    break 2
41082  fi
41083done
41084  done
41085IFS=$as_save_IFS
41086
41087fi
41088fi
41089STRIP=$ac_cv_prog_STRIP
41090if test -n "$STRIP"; then
41091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41092$as_echo "$STRIP" >&6; }
41093else
41094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41095$as_echo "no" >&6; }
41096fi
41097
41098
41099    test -n "$STRIP" && break
41100  done
41101fi
41102if test -z "$STRIP"; then
41103  ac_ct_STRIP=$STRIP
41104  for ac_prog in strip
41105do
41106  # Extract the first word of "$ac_prog", so it can be a program name with args.
41107set dummy $ac_prog; ac_word=$2
41108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41109$as_echo_n "checking for $ac_word... " >&6; }
41110if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41111  $as_echo_n "(cached) " >&6
41112else
41113  if test -n "$ac_ct_STRIP"; then
41114  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41115else
41116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41117for as_dir in $PATH
41118do
41119  IFS=$as_save_IFS
41120  test -z "$as_dir" && as_dir=.
41121    for ac_exec_ext in '' $ac_executable_extensions; do
41122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41123    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41125    break 2
41126  fi
41127done
41128  done
41129IFS=$as_save_IFS
41130
41131fi
41132fi
41133ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41134if test -n "$ac_ct_STRIP"; then
41135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41136$as_echo "$ac_ct_STRIP" >&6; }
41137else
41138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41139$as_echo "no" >&6; }
41140fi
41141
41142
41143  test -n "$ac_ct_STRIP" && break
41144done
41145
41146  if test "x$ac_ct_STRIP" = x; then
41147    STRIP=""
41148  else
41149    case $cross_compiling:$ac_tool_warned in
41150yes:)
41151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41153ac_tool_warned=yes ;;
41154esac
41155    STRIP=$ac_ct_STRIP
41156  fi
41157fi
41158
41159  else
41160    # The variable is set, but is it from the command line or the environment?
41161
41162    # Try to remove the string !STRIP! from our list.
41163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41165      # If it failed, the variable was not from the command line. Ignore it,
41166      # but warn the user (except for BASH, which is always set by the calling BASH).
41167      if test "xSTRIP" != xBASH; then
41168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41169$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41170      fi
41171      # Try to locate tool using the code snippet
41172      if test -n "$ac_tool_prefix"; then
41173  for ac_prog in strip
41174  do
41175    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41176set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41178$as_echo_n "checking for $ac_word... " >&6; }
41179if ${ac_cv_prog_STRIP+:} false; then :
41180  $as_echo_n "(cached) " >&6
41181else
41182  if test -n "$STRIP"; then
41183  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41184else
41185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41186for as_dir in $PATH
41187do
41188  IFS=$as_save_IFS
41189  test -z "$as_dir" && as_dir=.
41190    for ac_exec_ext in '' $ac_executable_extensions; do
41191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41192    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41194    break 2
41195  fi
41196done
41197  done
41198IFS=$as_save_IFS
41199
41200fi
41201fi
41202STRIP=$ac_cv_prog_STRIP
41203if test -n "$STRIP"; then
41204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41205$as_echo "$STRIP" >&6; }
41206else
41207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41208$as_echo "no" >&6; }
41209fi
41210
41211
41212    test -n "$STRIP" && break
41213  done
41214fi
41215if test -z "$STRIP"; then
41216  ac_ct_STRIP=$STRIP
41217  for ac_prog in strip
41218do
41219  # Extract the first word of "$ac_prog", so it can be a program name with args.
41220set dummy $ac_prog; ac_word=$2
41221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41222$as_echo_n "checking for $ac_word... " >&6; }
41223if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41224  $as_echo_n "(cached) " >&6
41225else
41226  if test -n "$ac_ct_STRIP"; then
41227  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41228else
41229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41230for as_dir in $PATH
41231do
41232  IFS=$as_save_IFS
41233  test -z "$as_dir" && as_dir=.
41234    for ac_exec_ext in '' $ac_executable_extensions; do
41235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41236    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41238    break 2
41239  fi
41240done
41241  done
41242IFS=$as_save_IFS
41243
41244fi
41245fi
41246ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41247if test -n "$ac_ct_STRIP"; then
41248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41249$as_echo "$ac_ct_STRIP" >&6; }
41250else
41251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41252$as_echo "no" >&6; }
41253fi
41254
41255
41256  test -n "$ac_ct_STRIP" && break
41257done
41258
41259  if test "x$ac_ct_STRIP" = x; then
41260    STRIP=""
41261  else
41262    case $cross_compiling:$ac_tool_warned in
41263yes:)
41264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41266ac_tool_warned=yes ;;
41267esac
41268    STRIP=$ac_ct_STRIP
41269  fi
41270fi
41271
41272    else
41273      # If it succeeded, then it was overridden by the user. We will use it
41274      # for the tool.
41275
41276      # First remove it from the list of overridden variables, so we can test
41277      # for unknown variables in the end.
41278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41279
41280      # Check if we try to supply an empty value
41281      if test "x$STRIP" = x; then
41282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41283$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41285$as_echo_n "checking for STRIP... " >&6; }
41286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41287$as_echo "disabled" >&6; }
41288      else
41289        # Check if the provided tool contains a complete path.
41290        tool_specified="$STRIP"
41291        tool_basename="${tool_specified##*/}"
41292        if test "x$tool_basename" = "x$tool_specified"; then
41293          # A command without a complete path is provided, search $PATH.
41294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41295$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41296          # Extract the first word of "$tool_basename", so it can be a program name with args.
41297set dummy $tool_basename; ac_word=$2
41298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41299$as_echo_n "checking for $ac_word... " >&6; }
41300if ${ac_cv_path_STRIP+:} false; then :
41301  $as_echo_n "(cached) " >&6
41302else
41303  case $STRIP in
41304  [\\/]* | ?:[\\/]*)
41305  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41306  ;;
41307  *)
41308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41309for as_dir in $PATH
41310do
41311  IFS=$as_save_IFS
41312  test -z "$as_dir" && as_dir=.
41313    for ac_exec_ext in '' $ac_executable_extensions; do
41314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41315    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41317    break 2
41318  fi
41319done
41320  done
41321IFS=$as_save_IFS
41322
41323  ;;
41324esac
41325fi
41326STRIP=$ac_cv_path_STRIP
41327if test -n "$STRIP"; then
41328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41329$as_echo "$STRIP" >&6; }
41330else
41331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41332$as_echo "no" >&6; }
41333fi
41334
41335
41336          if test "x$STRIP" = x; then
41337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41338          fi
41339        else
41340          # Otherwise we believe it is a complete path. Use it as it is.
41341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41342$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41344$as_echo_n "checking for STRIP... " >&6; }
41345          if test ! -x "$tool_specified"; then
41346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41347$as_echo "not found" >&6; }
41348            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41349          fi
41350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41351$as_echo "$tool_specified" >&6; }
41352        fi
41353      fi
41354    fi
41355
41356  fi
41357
41358
41359
41360  # Only process if variable expands to non-empty
41361
41362  if test "x$STRIP" != x; then
41363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41364
41365  # First separate the path from the arguments. This will split at the first
41366  # space.
41367  complete="$STRIP"
41368  path="${complete%% *}"
41369  tmp="$complete EOL"
41370  arguments="${tmp#* }"
41371
41372  # Input might be given as Windows format, start by converting to
41373  # unix format.
41374  new_path=`$CYGPATH -u "$path"`
41375
41376  # Now try to locate executable using which
41377  new_path=`$WHICH "$new_path" 2> /dev/null`
41378  # bat and cmd files are not always considered executable in cygwin causing which
41379  # to not find them
41380  if test "x$new_path" = x \
41381      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41382      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41383    new_path=`$CYGPATH -u "$path"`
41384  fi
41385  if test "x$new_path" = x; then
41386    # Oops. Which didn't find the executable.
41387    # The splitting of arguments from the executable at a space might have been incorrect,
41388    # since paths with space are more likely in Windows. Give it another try with the whole
41389    # argument.
41390    path="$complete"
41391    arguments="EOL"
41392    new_path=`$CYGPATH -u "$path"`
41393    new_path=`$WHICH "$new_path" 2> /dev/null`
41394    # bat and cmd files are not always considered executable in cygwin causing which
41395    # to not find them
41396    if test "x$new_path" = x \
41397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41399      new_path=`$CYGPATH -u "$path"`
41400    fi
41401    if test "x$new_path" = x; then
41402      # It's still not found. Now this is an unrecoverable error.
41403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41404$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41405      has_space=`$ECHO "$complete" | $GREP " "`
41406      if test "x$has_space" != x; then
41407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41409      fi
41410      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41411    fi
41412  fi
41413
41414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41417  # "foo.exe" is OK but "foo" is an error.
41418  #
41419  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41420  # It is also a way to make sure we got the proper file name for the real test later on.
41421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41422  if test "x$test_shortpath" = x; then
41423    # Short path failed, file does not exist as specified.
41424    # Try adding .exe or .cmd
41425    if test -f "${new_path}.exe"; then
41426      input_to_shortpath="${new_path}.exe"
41427    elif test -f "${new_path}.cmd"; then
41428      input_to_shortpath="${new_path}.cmd"
41429    else
41430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41431$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41434      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41435    fi
41436  else
41437    input_to_shortpath="$new_path"
41438  fi
41439
41440  # Call helper function which possibly converts this using DOS-style short mode.
41441  # If so, the updated path is stored in $new_path.
41442  new_path="$input_to_shortpath"
41443
41444  input_path="$input_to_shortpath"
41445  # Check if we need to convert this using DOS-style short mode. If the path
41446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41447  # take no chances and rewrite it.
41448  # Note: m4 eats our [], so we need to use [ and ] instead.
41449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41450  if test "x$has_forbidden_chars" != x; then
41451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41455      # Going to short mode and back again did indeed matter. Since short mode is
41456      # case insensitive, let's make it lowercase to improve readability.
41457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41458      # Now convert it back to Unix-style (cygpath)
41459      input_path=`$CYGPATH -u "$shortmode_path"`
41460      new_path="$input_path"
41461    fi
41462  fi
41463
41464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41465  if test "x$test_cygdrive_prefix" = x; then
41466    # As a simple fix, exclude /usr/bin since it's not a real path.
41467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41469      # a path prefixed by /cygdrive for fixpath to work.
41470      new_path="$CYGWIN_ROOT_PATH$input_path"
41471    fi
41472  fi
41473
41474  # remove trailing .exe if any
41475  new_path="${new_path/%.exe/}"
41476
41477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41478
41479  # First separate the path from the arguments. This will split at the first
41480  # space.
41481  complete="$STRIP"
41482  path="${complete%% *}"
41483  tmp="$complete EOL"
41484  arguments="${tmp#* }"
41485
41486  # Input might be given as Windows format, start by converting to
41487  # unix format.
41488  new_path="$path"
41489
41490  windows_path="$new_path"
41491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41492    unix_path=`$CYGPATH -u "$windows_path"`
41493    new_path="$unix_path"
41494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41496    new_path="$unix_path"
41497  fi
41498
41499
41500  # Now try to locate executable using which
41501  new_path=`$WHICH "$new_path" 2> /dev/null`
41502
41503  if test "x$new_path" = x; then
41504    # Oops. Which didn't find the executable.
41505    # The splitting of arguments from the executable at a space might have been incorrect,
41506    # since paths with space are more likely in Windows. Give it another try with the whole
41507    # argument.
41508    path="$complete"
41509    arguments="EOL"
41510    new_path="$path"
41511
41512  windows_path="$new_path"
41513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41514    unix_path=`$CYGPATH -u "$windows_path"`
41515    new_path="$unix_path"
41516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41518    new_path="$unix_path"
41519  fi
41520
41521
41522    new_path=`$WHICH "$new_path" 2> /dev/null`
41523    # bat and cmd files are not always considered executable in MSYS causing which
41524    # to not find them
41525    if test "x$new_path" = x \
41526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41528      new_path="$path"
41529
41530  windows_path="$new_path"
41531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41532    unix_path=`$CYGPATH -u "$windows_path"`
41533    new_path="$unix_path"
41534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41536    new_path="$unix_path"
41537  fi
41538
41539    fi
41540
41541    if test "x$new_path" = x; then
41542      # It's still not found. Now this is an unrecoverable error.
41543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41544$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41545      has_space=`$ECHO "$complete" | $GREP " "`
41546      if test "x$has_space" != x; then
41547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41549      fi
41550      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41551    fi
41552  fi
41553
41554  # Now new_path has a complete unix path to the binary
41555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41556    # Keep paths in /bin as-is, but remove trailing .exe if any
41557    new_path="${new_path/%.exe/}"
41558    # Do not save /bin paths to all_fixpath_prefixes!
41559  else
41560    # Not in mixed or Windows style, start by that.
41561    new_path=`cmd //c echo $new_path`
41562
41563  input_path="$new_path"
41564  # Check if we need to convert this using DOS-style short mode. If the path
41565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41566  # take no chances and rewrite it.
41567  # Note: m4 eats our [], so we need to use [ and ] instead.
41568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41569  if test "x$has_forbidden_chars" != x; then
41570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41572  fi
41573
41574    # Output is in $new_path
41575
41576  windows_path="$new_path"
41577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41578    unix_path=`$CYGPATH -u "$windows_path"`
41579    new_path="$unix_path"
41580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41582    new_path="$unix_path"
41583  fi
41584
41585    # remove trailing .exe if any
41586    new_path="${new_path/%.exe/}"
41587
41588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41590  fi
41591
41592    else
41593      # We're on a unix platform. Hooray! :)
41594      # First separate the path from the arguments. This will split at the first
41595      # space.
41596      complete="$STRIP"
41597      path="${complete%% *}"
41598      tmp="$complete EOL"
41599      arguments="${tmp#* }"
41600
41601      # Cannot rely on the command "which" here since it doesn't always work.
41602      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41603      if test -z "$is_absolute_path"; then
41604        # Path to executable is not absolute. Find it.
41605        IFS_save="$IFS"
41606        IFS=:
41607        for p in $PATH; do
41608          if test -f "$p/$path" && test -x "$p/$path"; then
41609            new_path="$p/$path"
41610            break
41611          fi
41612        done
41613        IFS="$IFS_save"
41614      else
41615        # This is an absolute path, we can use it without further modifications.
41616        new_path="$path"
41617      fi
41618
41619      if test "x$new_path" = x; then
41620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41621$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41622        has_space=`$ECHO "$complete" | $GREP " "`
41623        if test "x$has_space" != x; then
41624          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41626        fi
41627        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41628      fi
41629    fi
41630
41631    # Now join together the path and the arguments once again
41632    if test "x$arguments" != xEOL; then
41633      new_complete="$new_path ${arguments% *}"
41634    else
41635      new_complete="$new_path"
41636    fi
41637
41638    if test "x$complete" != "x$new_complete"; then
41639      STRIP="$new_complete"
41640      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41641$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41642    fi
41643  fi
41644
41645    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41646
41647
41648  # Publish this variable in the help.
41649
41650
41651  if [ -z "${NM+x}" ]; then
41652    # The variable is not set by user, try to locate tool using the code snippet
41653    if test -n "$ac_tool_prefix"; then
41654  for ac_prog in nm gcc-nm
41655  do
41656    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41657set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41659$as_echo_n "checking for $ac_word... " >&6; }
41660if ${ac_cv_prog_NM+:} false; then :
41661  $as_echo_n "(cached) " >&6
41662else
41663  if test -n "$NM"; then
41664  ac_cv_prog_NM="$NM" # Let the user override the test.
41665else
41666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41667for as_dir in $PATH
41668do
41669  IFS=$as_save_IFS
41670  test -z "$as_dir" && as_dir=.
41671    for ac_exec_ext in '' $ac_executable_extensions; do
41672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41673    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41675    break 2
41676  fi
41677done
41678  done
41679IFS=$as_save_IFS
41680
41681fi
41682fi
41683NM=$ac_cv_prog_NM
41684if test -n "$NM"; then
41685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41686$as_echo "$NM" >&6; }
41687else
41688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41689$as_echo "no" >&6; }
41690fi
41691
41692
41693    test -n "$NM" && break
41694  done
41695fi
41696if test -z "$NM"; then
41697  ac_ct_NM=$NM
41698  for ac_prog in nm gcc-nm
41699do
41700  # Extract the first word of "$ac_prog", so it can be a program name with args.
41701set dummy $ac_prog; ac_word=$2
41702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41703$as_echo_n "checking for $ac_word... " >&6; }
41704if ${ac_cv_prog_ac_ct_NM+:} false; then :
41705  $as_echo_n "(cached) " >&6
41706else
41707  if test -n "$ac_ct_NM"; then
41708  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41709else
41710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41711for as_dir in $PATH
41712do
41713  IFS=$as_save_IFS
41714  test -z "$as_dir" && as_dir=.
41715    for ac_exec_ext in '' $ac_executable_extensions; do
41716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41717    ac_cv_prog_ac_ct_NM="$ac_prog"
41718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41719    break 2
41720  fi
41721done
41722  done
41723IFS=$as_save_IFS
41724
41725fi
41726fi
41727ac_ct_NM=$ac_cv_prog_ac_ct_NM
41728if test -n "$ac_ct_NM"; then
41729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41730$as_echo "$ac_ct_NM" >&6; }
41731else
41732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41733$as_echo "no" >&6; }
41734fi
41735
41736
41737  test -n "$ac_ct_NM" && break
41738done
41739
41740  if test "x$ac_ct_NM" = x; then
41741    NM=""
41742  else
41743    case $cross_compiling:$ac_tool_warned in
41744yes:)
41745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41747ac_tool_warned=yes ;;
41748esac
41749    NM=$ac_ct_NM
41750  fi
41751fi
41752
41753  else
41754    # The variable is set, but is it from the command line or the environment?
41755
41756    # Try to remove the string !NM! from our list.
41757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41759      # If it failed, the variable was not from the command line. Ignore it,
41760      # but warn the user (except for BASH, which is always set by the calling BASH).
41761      if test "xNM" != xBASH; then
41762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41763$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41764      fi
41765      # Try to locate tool using the code snippet
41766      if test -n "$ac_tool_prefix"; then
41767  for ac_prog in nm gcc-nm
41768  do
41769    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41772$as_echo_n "checking for $ac_word... " >&6; }
41773if ${ac_cv_prog_NM+:} false; then :
41774  $as_echo_n "(cached) " >&6
41775else
41776  if test -n "$NM"; then
41777  ac_cv_prog_NM="$NM" # Let the user override the test.
41778else
41779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41780for as_dir in $PATH
41781do
41782  IFS=$as_save_IFS
41783  test -z "$as_dir" && as_dir=.
41784    for ac_exec_ext in '' $ac_executable_extensions; do
41785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41786    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41788    break 2
41789  fi
41790done
41791  done
41792IFS=$as_save_IFS
41793
41794fi
41795fi
41796NM=$ac_cv_prog_NM
41797if test -n "$NM"; then
41798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41799$as_echo "$NM" >&6; }
41800else
41801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41802$as_echo "no" >&6; }
41803fi
41804
41805
41806    test -n "$NM" && break
41807  done
41808fi
41809if test -z "$NM"; then
41810  ac_ct_NM=$NM
41811  for ac_prog in nm gcc-nm
41812do
41813  # Extract the first word of "$ac_prog", so it can be a program name with args.
41814set dummy $ac_prog; ac_word=$2
41815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41816$as_echo_n "checking for $ac_word... " >&6; }
41817if ${ac_cv_prog_ac_ct_NM+:} false; then :
41818  $as_echo_n "(cached) " >&6
41819else
41820  if test -n "$ac_ct_NM"; then
41821  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41822else
41823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41824for as_dir in $PATH
41825do
41826  IFS=$as_save_IFS
41827  test -z "$as_dir" && as_dir=.
41828    for ac_exec_ext in '' $ac_executable_extensions; do
41829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41830    ac_cv_prog_ac_ct_NM="$ac_prog"
41831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41832    break 2
41833  fi
41834done
41835  done
41836IFS=$as_save_IFS
41837
41838fi
41839fi
41840ac_ct_NM=$ac_cv_prog_ac_ct_NM
41841if test -n "$ac_ct_NM"; then
41842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41843$as_echo "$ac_ct_NM" >&6; }
41844else
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41846$as_echo "no" >&6; }
41847fi
41848
41849
41850  test -n "$ac_ct_NM" && break
41851done
41852
41853  if test "x$ac_ct_NM" = x; then
41854    NM=""
41855  else
41856    case $cross_compiling:$ac_tool_warned in
41857yes:)
41858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41860ac_tool_warned=yes ;;
41861esac
41862    NM=$ac_ct_NM
41863  fi
41864fi
41865
41866    else
41867      # If it succeeded, then it was overridden by the user. We will use it
41868      # for the tool.
41869
41870      # First remove it from the list of overridden variables, so we can test
41871      # for unknown variables in the end.
41872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41873
41874      # Check if we try to supply an empty value
41875      if test "x$NM" = x; then
41876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41877$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41879$as_echo_n "checking for NM... " >&6; }
41880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41881$as_echo "disabled" >&6; }
41882      else
41883        # Check if the provided tool contains a complete path.
41884        tool_specified="$NM"
41885        tool_basename="${tool_specified##*/}"
41886        if test "x$tool_basename" = "x$tool_specified"; then
41887          # A command without a complete path is provided, search $PATH.
41888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41889$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41890          # Extract the first word of "$tool_basename", so it can be a program name with args.
41891set dummy $tool_basename; ac_word=$2
41892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41893$as_echo_n "checking for $ac_word... " >&6; }
41894if ${ac_cv_path_NM+:} false; then :
41895  $as_echo_n "(cached) " >&6
41896else
41897  case $NM in
41898  [\\/]* | ?:[\\/]*)
41899  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41900  ;;
41901  *)
41902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41903for as_dir in $PATH
41904do
41905  IFS=$as_save_IFS
41906  test -z "$as_dir" && as_dir=.
41907    for ac_exec_ext in '' $ac_executable_extensions; do
41908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41909    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41911    break 2
41912  fi
41913done
41914  done
41915IFS=$as_save_IFS
41916
41917  ;;
41918esac
41919fi
41920NM=$ac_cv_path_NM
41921if test -n "$NM"; then
41922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41923$as_echo "$NM" >&6; }
41924else
41925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41926$as_echo "no" >&6; }
41927fi
41928
41929
41930          if test "x$NM" = x; then
41931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41932          fi
41933        else
41934          # Otherwise we believe it is a complete path. Use it as it is.
41935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41936$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41938$as_echo_n "checking for NM... " >&6; }
41939          if test ! -x "$tool_specified"; then
41940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41941$as_echo "not found" >&6; }
41942            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41943          fi
41944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41945$as_echo "$tool_specified" >&6; }
41946        fi
41947      fi
41948    fi
41949
41950  fi
41951
41952
41953    else
41954
41955
41956  # Publish this variable in the help.
41957
41958
41959  if [ -z "${NM+x}" ]; then
41960    # The variable is not set by user, try to locate tool using the code snippet
41961    if test -n "$ac_tool_prefix"; then
41962  for ac_prog in nm
41963  do
41964    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41967$as_echo_n "checking for $ac_word... " >&6; }
41968if ${ac_cv_prog_NM+:} false; then :
41969  $as_echo_n "(cached) " >&6
41970else
41971  if test -n "$NM"; then
41972  ac_cv_prog_NM="$NM" # Let the user override the test.
41973else
41974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41975for as_dir in $PATH
41976do
41977  IFS=$as_save_IFS
41978  test -z "$as_dir" && as_dir=.
41979    for ac_exec_ext in '' $ac_executable_extensions; do
41980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41981    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41983    break 2
41984  fi
41985done
41986  done
41987IFS=$as_save_IFS
41988
41989fi
41990fi
41991NM=$ac_cv_prog_NM
41992if test -n "$NM"; then
41993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41994$as_echo "$NM" >&6; }
41995else
41996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41997$as_echo "no" >&6; }
41998fi
41999
42000
42001    test -n "$NM" && break
42002  done
42003fi
42004if test -z "$NM"; then
42005  ac_ct_NM=$NM
42006  for ac_prog in nm
42007do
42008  # Extract the first word of "$ac_prog", so it can be a program name with args.
42009set dummy $ac_prog; ac_word=$2
42010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42011$as_echo_n "checking for $ac_word... " >&6; }
42012if ${ac_cv_prog_ac_ct_NM+:} false; then :
42013  $as_echo_n "(cached) " >&6
42014else
42015  if test -n "$ac_ct_NM"; then
42016  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42017else
42018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42019for as_dir in $PATH
42020do
42021  IFS=$as_save_IFS
42022  test -z "$as_dir" && as_dir=.
42023    for ac_exec_ext in '' $ac_executable_extensions; do
42024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42025    ac_cv_prog_ac_ct_NM="$ac_prog"
42026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42027    break 2
42028  fi
42029done
42030  done
42031IFS=$as_save_IFS
42032
42033fi
42034fi
42035ac_ct_NM=$ac_cv_prog_ac_ct_NM
42036if test -n "$ac_ct_NM"; then
42037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42038$as_echo "$ac_ct_NM" >&6; }
42039else
42040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42041$as_echo "no" >&6; }
42042fi
42043
42044
42045  test -n "$ac_ct_NM" && break
42046done
42047
42048  if test "x$ac_ct_NM" = x; then
42049    NM=""
42050  else
42051    case $cross_compiling:$ac_tool_warned in
42052yes:)
42053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42055ac_tool_warned=yes ;;
42056esac
42057    NM=$ac_ct_NM
42058  fi
42059fi
42060
42061  else
42062    # The variable is set, but is it from the command line or the environment?
42063
42064    # Try to remove the string !NM! from our list.
42065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42067      # If it failed, the variable was not from the command line. Ignore it,
42068      # but warn the user (except for BASH, which is always set by the calling BASH).
42069      if test "xNM" != xBASH; then
42070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42071$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42072      fi
42073      # Try to locate tool using the code snippet
42074      if test -n "$ac_tool_prefix"; then
42075  for ac_prog in nm
42076  do
42077    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42078set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42080$as_echo_n "checking for $ac_word... " >&6; }
42081if ${ac_cv_prog_NM+:} false; then :
42082  $as_echo_n "(cached) " >&6
42083else
42084  if test -n "$NM"; then
42085  ac_cv_prog_NM="$NM" # Let the user override the test.
42086else
42087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42088for as_dir in $PATH
42089do
42090  IFS=$as_save_IFS
42091  test -z "$as_dir" && as_dir=.
42092    for ac_exec_ext in '' $ac_executable_extensions; do
42093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42094    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42096    break 2
42097  fi
42098done
42099  done
42100IFS=$as_save_IFS
42101
42102fi
42103fi
42104NM=$ac_cv_prog_NM
42105if test -n "$NM"; then
42106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42107$as_echo "$NM" >&6; }
42108else
42109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42110$as_echo "no" >&6; }
42111fi
42112
42113
42114    test -n "$NM" && break
42115  done
42116fi
42117if test -z "$NM"; then
42118  ac_ct_NM=$NM
42119  for ac_prog in nm
42120do
42121  # Extract the first word of "$ac_prog", so it can be a program name with args.
42122set dummy $ac_prog; ac_word=$2
42123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42124$as_echo_n "checking for $ac_word... " >&6; }
42125if ${ac_cv_prog_ac_ct_NM+:} false; then :
42126  $as_echo_n "(cached) " >&6
42127else
42128  if test -n "$ac_ct_NM"; then
42129  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42130else
42131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42132for as_dir in $PATH
42133do
42134  IFS=$as_save_IFS
42135  test -z "$as_dir" && as_dir=.
42136    for ac_exec_ext in '' $ac_executable_extensions; do
42137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42138    ac_cv_prog_ac_ct_NM="$ac_prog"
42139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42140    break 2
42141  fi
42142done
42143  done
42144IFS=$as_save_IFS
42145
42146fi
42147fi
42148ac_ct_NM=$ac_cv_prog_ac_ct_NM
42149if test -n "$ac_ct_NM"; then
42150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42151$as_echo "$ac_ct_NM" >&6; }
42152else
42153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42154$as_echo "no" >&6; }
42155fi
42156
42157
42158  test -n "$ac_ct_NM" && break
42159done
42160
42161  if test "x$ac_ct_NM" = x; then
42162    NM=""
42163  else
42164    case $cross_compiling:$ac_tool_warned in
42165yes:)
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42168ac_tool_warned=yes ;;
42169esac
42170    NM=$ac_ct_NM
42171  fi
42172fi
42173
42174    else
42175      # If it succeeded, then it was overridden by the user. We will use it
42176      # for the tool.
42177
42178      # First remove it from the list of overridden variables, so we can test
42179      # for unknown variables in the end.
42180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42181
42182      # Check if we try to supply an empty value
42183      if test "x$NM" = x; then
42184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42185$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42187$as_echo_n "checking for NM... " >&6; }
42188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42189$as_echo "disabled" >&6; }
42190      else
42191        # Check if the provided tool contains a complete path.
42192        tool_specified="$NM"
42193        tool_basename="${tool_specified##*/}"
42194        if test "x$tool_basename" = "x$tool_specified"; then
42195          # A command without a complete path is provided, search $PATH.
42196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42197$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42198          # Extract the first word of "$tool_basename", so it can be a program name with args.
42199set dummy $tool_basename; ac_word=$2
42200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42201$as_echo_n "checking for $ac_word... " >&6; }
42202if ${ac_cv_path_NM+:} false; then :
42203  $as_echo_n "(cached) " >&6
42204else
42205  case $NM in
42206  [\\/]* | ?:[\\/]*)
42207  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42208  ;;
42209  *)
42210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42211for as_dir in $PATH
42212do
42213  IFS=$as_save_IFS
42214  test -z "$as_dir" && as_dir=.
42215    for ac_exec_ext in '' $ac_executable_extensions; do
42216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42217    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42219    break 2
42220  fi
42221done
42222  done
42223IFS=$as_save_IFS
42224
42225  ;;
42226esac
42227fi
42228NM=$ac_cv_path_NM
42229if test -n "$NM"; then
42230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42231$as_echo "$NM" >&6; }
42232else
42233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42234$as_echo "no" >&6; }
42235fi
42236
42237
42238          if test "x$NM" = x; then
42239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42240          fi
42241        else
42242          # Otherwise we believe it is a complete path. Use it as it is.
42243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42244$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42246$as_echo_n "checking for NM... " >&6; }
42247          if test ! -x "$tool_specified"; then
42248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42249$as_echo "not found" >&6; }
42250            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42251          fi
42252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42253$as_echo "$tool_specified" >&6; }
42254        fi
42255      fi
42256    fi
42257
42258  fi
42259
42260
42261    fi
42262
42263  # Only process if variable expands to non-empty
42264
42265  if test "x$NM" != x; then
42266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42267
42268  # First separate the path from the arguments. This will split at the first
42269  # space.
42270  complete="$NM"
42271  path="${complete%% *}"
42272  tmp="$complete EOL"
42273  arguments="${tmp#* }"
42274
42275  # Input might be given as Windows format, start by converting to
42276  # unix format.
42277  new_path=`$CYGPATH -u "$path"`
42278
42279  # Now try to locate executable using which
42280  new_path=`$WHICH "$new_path" 2> /dev/null`
42281  # bat and cmd files are not always considered executable in cygwin causing which
42282  # to not find them
42283  if test "x$new_path" = x \
42284      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42285      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42286    new_path=`$CYGPATH -u "$path"`
42287  fi
42288  if test "x$new_path" = x; then
42289    # Oops. Which didn't find the executable.
42290    # The splitting of arguments from the executable at a space might have been incorrect,
42291    # since paths with space are more likely in Windows. Give it another try with the whole
42292    # argument.
42293    path="$complete"
42294    arguments="EOL"
42295    new_path=`$CYGPATH -u "$path"`
42296    new_path=`$WHICH "$new_path" 2> /dev/null`
42297    # bat and cmd files are not always considered executable in cygwin causing which
42298    # to not find them
42299    if test "x$new_path" = x \
42300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42302      new_path=`$CYGPATH -u "$path"`
42303    fi
42304    if test "x$new_path" = x; then
42305      # It's still not found. Now this is an unrecoverable error.
42306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42307$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42308      has_space=`$ECHO "$complete" | $GREP " "`
42309      if test "x$has_space" != x; then
42310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42312      fi
42313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42314    fi
42315  fi
42316
42317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42320  # "foo.exe" is OK but "foo" is an error.
42321  #
42322  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42323  # It is also a way to make sure we got the proper file name for the real test later on.
42324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42325  if test "x$test_shortpath" = x; then
42326    # Short path failed, file does not exist as specified.
42327    # Try adding .exe or .cmd
42328    if test -f "${new_path}.exe"; then
42329      input_to_shortpath="${new_path}.exe"
42330    elif test -f "${new_path}.cmd"; then
42331      input_to_shortpath="${new_path}.cmd"
42332    else
42333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42334$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42337      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42338    fi
42339  else
42340    input_to_shortpath="$new_path"
42341  fi
42342
42343  # Call helper function which possibly converts this using DOS-style short mode.
42344  # If so, the updated path is stored in $new_path.
42345  new_path="$input_to_shortpath"
42346
42347  input_path="$input_to_shortpath"
42348  # Check if we need to convert this using DOS-style short mode. If the path
42349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42350  # take no chances and rewrite it.
42351  # Note: m4 eats our [], so we need to use [ and ] instead.
42352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42353  if test "x$has_forbidden_chars" != x; then
42354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42358      # Going to short mode and back again did indeed matter. Since short mode is
42359      # case insensitive, let's make it lowercase to improve readability.
42360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42361      # Now convert it back to Unix-style (cygpath)
42362      input_path=`$CYGPATH -u "$shortmode_path"`
42363      new_path="$input_path"
42364    fi
42365  fi
42366
42367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42368  if test "x$test_cygdrive_prefix" = x; then
42369    # As a simple fix, exclude /usr/bin since it's not a real path.
42370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42372      # a path prefixed by /cygdrive for fixpath to work.
42373      new_path="$CYGWIN_ROOT_PATH$input_path"
42374    fi
42375  fi
42376
42377  # remove trailing .exe if any
42378  new_path="${new_path/%.exe/}"
42379
42380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42381
42382  # First separate the path from the arguments. This will split at the first
42383  # space.
42384  complete="$NM"
42385  path="${complete%% *}"
42386  tmp="$complete EOL"
42387  arguments="${tmp#* }"
42388
42389  # Input might be given as Windows format, start by converting to
42390  # unix format.
42391  new_path="$path"
42392
42393  windows_path="$new_path"
42394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42395    unix_path=`$CYGPATH -u "$windows_path"`
42396    new_path="$unix_path"
42397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42399    new_path="$unix_path"
42400  fi
42401
42402
42403  # Now try to locate executable using which
42404  new_path=`$WHICH "$new_path" 2> /dev/null`
42405
42406  if test "x$new_path" = x; then
42407    # Oops. Which didn't find the executable.
42408    # The splitting of arguments from the executable at a space might have been incorrect,
42409    # since paths with space are more likely in Windows. Give it another try with the whole
42410    # argument.
42411    path="$complete"
42412    arguments="EOL"
42413    new_path="$path"
42414
42415  windows_path="$new_path"
42416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42417    unix_path=`$CYGPATH -u "$windows_path"`
42418    new_path="$unix_path"
42419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42421    new_path="$unix_path"
42422  fi
42423
42424
42425    new_path=`$WHICH "$new_path" 2> /dev/null`
42426    # bat and cmd files are not always considered executable in MSYS causing which
42427    # to not find them
42428    if test "x$new_path" = x \
42429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42431      new_path="$path"
42432
42433  windows_path="$new_path"
42434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42435    unix_path=`$CYGPATH -u "$windows_path"`
42436    new_path="$unix_path"
42437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42439    new_path="$unix_path"
42440  fi
42441
42442    fi
42443
42444    if test "x$new_path" = x; then
42445      # It's still not found. Now this is an unrecoverable error.
42446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42447$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42448      has_space=`$ECHO "$complete" | $GREP " "`
42449      if test "x$has_space" != x; then
42450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42452      fi
42453      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42454    fi
42455  fi
42456
42457  # Now new_path has a complete unix path to the binary
42458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42459    # Keep paths in /bin as-is, but remove trailing .exe if any
42460    new_path="${new_path/%.exe/}"
42461    # Do not save /bin paths to all_fixpath_prefixes!
42462  else
42463    # Not in mixed or Windows style, start by that.
42464    new_path=`cmd //c echo $new_path`
42465
42466  input_path="$new_path"
42467  # Check if we need to convert this using DOS-style short mode. If the path
42468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42469  # take no chances and rewrite it.
42470  # Note: m4 eats our [], so we need to use [ and ] instead.
42471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42472  if test "x$has_forbidden_chars" != x; then
42473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42475  fi
42476
42477    # Output is in $new_path
42478
42479  windows_path="$new_path"
42480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42481    unix_path=`$CYGPATH -u "$windows_path"`
42482    new_path="$unix_path"
42483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42485    new_path="$unix_path"
42486  fi
42487
42488    # remove trailing .exe if any
42489    new_path="${new_path/%.exe/}"
42490
42491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42493  fi
42494
42495    else
42496      # We're on a unix platform. Hooray! :)
42497      # First separate the path from the arguments. This will split at the first
42498      # space.
42499      complete="$NM"
42500      path="${complete%% *}"
42501      tmp="$complete EOL"
42502      arguments="${tmp#* }"
42503
42504      # Cannot rely on the command "which" here since it doesn't always work.
42505      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42506      if test -z "$is_absolute_path"; then
42507        # Path to executable is not absolute. Find it.
42508        IFS_save="$IFS"
42509        IFS=:
42510        for p in $PATH; do
42511          if test -f "$p/$path" && test -x "$p/$path"; then
42512            new_path="$p/$path"
42513            break
42514          fi
42515        done
42516        IFS="$IFS_save"
42517      else
42518        # This is an absolute path, we can use it without further modifications.
42519        new_path="$path"
42520      fi
42521
42522      if test "x$new_path" = x; then
42523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42524$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42525        has_space=`$ECHO "$complete" | $GREP " "`
42526        if test "x$has_space" != x; then
42527          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42528$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42529        fi
42530        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42531      fi
42532    fi
42533
42534    # Now join together the path and the arguments once again
42535    if test "x$arguments" != xEOL; then
42536      new_complete="$new_path ${arguments% *}"
42537    else
42538      new_complete="$new_path"
42539    fi
42540
42541    if test "x$complete" != "x$new_complete"; then
42542      NM="$new_complete"
42543      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42544$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42545    fi
42546  fi
42547
42548    GNM="$NM"
42549
42550  fi
42551
42552  # objcopy is used for moving debug symbols to separate files when
42553  # full debug symbols are enabled.
42554  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42555
42556
42557  # Publish this variable in the help.
42558
42559
42560  if [ -z "${OBJCOPY+x}" ]; then
42561    # The variable is not set by user, try to locate tool using the code snippet
42562    if test -n "$ac_tool_prefix"; then
42563  for ac_prog in gobjcopy objcopy
42564  do
42565    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42566set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42568$as_echo_n "checking for $ac_word... " >&6; }
42569if ${ac_cv_prog_OBJCOPY+:} false; then :
42570  $as_echo_n "(cached) " >&6
42571else
42572  if test -n "$OBJCOPY"; then
42573  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42574else
42575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42576for as_dir in $PATH
42577do
42578  IFS=$as_save_IFS
42579  test -z "$as_dir" && as_dir=.
42580    for ac_exec_ext in '' $ac_executable_extensions; do
42581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42582    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42584    break 2
42585  fi
42586done
42587  done
42588IFS=$as_save_IFS
42589
42590fi
42591fi
42592OBJCOPY=$ac_cv_prog_OBJCOPY
42593if test -n "$OBJCOPY"; then
42594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42595$as_echo "$OBJCOPY" >&6; }
42596else
42597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42598$as_echo "no" >&6; }
42599fi
42600
42601
42602    test -n "$OBJCOPY" && break
42603  done
42604fi
42605if test -z "$OBJCOPY"; then
42606  ac_ct_OBJCOPY=$OBJCOPY
42607  for ac_prog in gobjcopy objcopy
42608do
42609  # Extract the first word of "$ac_prog", so it can be a program name with args.
42610set dummy $ac_prog; ac_word=$2
42611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42612$as_echo_n "checking for $ac_word... " >&6; }
42613if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42614  $as_echo_n "(cached) " >&6
42615else
42616  if test -n "$ac_ct_OBJCOPY"; then
42617  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42618else
42619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42620for as_dir in $PATH
42621do
42622  IFS=$as_save_IFS
42623  test -z "$as_dir" && as_dir=.
42624    for ac_exec_ext in '' $ac_executable_extensions; do
42625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42626    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42628    break 2
42629  fi
42630done
42631  done
42632IFS=$as_save_IFS
42633
42634fi
42635fi
42636ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42637if test -n "$ac_ct_OBJCOPY"; then
42638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42639$as_echo "$ac_ct_OBJCOPY" >&6; }
42640else
42641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42642$as_echo "no" >&6; }
42643fi
42644
42645
42646  test -n "$ac_ct_OBJCOPY" && break
42647done
42648
42649  if test "x$ac_ct_OBJCOPY" = x; then
42650    OBJCOPY=""
42651  else
42652    case $cross_compiling:$ac_tool_warned in
42653yes:)
42654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42656ac_tool_warned=yes ;;
42657esac
42658    OBJCOPY=$ac_ct_OBJCOPY
42659  fi
42660fi
42661
42662  else
42663    # The variable is set, but is it from the command line or the environment?
42664
42665    # Try to remove the string !OBJCOPY! from our list.
42666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42668      # If it failed, the variable was not from the command line. Ignore it,
42669      # but warn the user (except for BASH, which is always set by the calling BASH).
42670      if test "xOBJCOPY" != xBASH; then
42671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42672$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42673      fi
42674      # Try to locate tool using the code snippet
42675      if test -n "$ac_tool_prefix"; then
42676  for ac_prog in gobjcopy objcopy
42677  do
42678    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42679set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42681$as_echo_n "checking for $ac_word... " >&6; }
42682if ${ac_cv_prog_OBJCOPY+:} false; then :
42683  $as_echo_n "(cached) " >&6
42684else
42685  if test -n "$OBJCOPY"; then
42686  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42687else
42688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42689for as_dir in $PATH
42690do
42691  IFS=$as_save_IFS
42692  test -z "$as_dir" && as_dir=.
42693    for ac_exec_ext in '' $ac_executable_extensions; do
42694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42695    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42697    break 2
42698  fi
42699done
42700  done
42701IFS=$as_save_IFS
42702
42703fi
42704fi
42705OBJCOPY=$ac_cv_prog_OBJCOPY
42706if test -n "$OBJCOPY"; then
42707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42708$as_echo "$OBJCOPY" >&6; }
42709else
42710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42711$as_echo "no" >&6; }
42712fi
42713
42714
42715    test -n "$OBJCOPY" && break
42716  done
42717fi
42718if test -z "$OBJCOPY"; then
42719  ac_ct_OBJCOPY=$OBJCOPY
42720  for ac_prog in gobjcopy objcopy
42721do
42722  # Extract the first word of "$ac_prog", so it can be a program name with args.
42723set dummy $ac_prog; ac_word=$2
42724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42725$as_echo_n "checking for $ac_word... " >&6; }
42726if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42727  $as_echo_n "(cached) " >&6
42728else
42729  if test -n "$ac_ct_OBJCOPY"; then
42730  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42731else
42732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42733for as_dir in $PATH
42734do
42735  IFS=$as_save_IFS
42736  test -z "$as_dir" && as_dir=.
42737    for ac_exec_ext in '' $ac_executable_extensions; do
42738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42739    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42741    break 2
42742  fi
42743done
42744  done
42745IFS=$as_save_IFS
42746
42747fi
42748fi
42749ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42750if test -n "$ac_ct_OBJCOPY"; then
42751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42752$as_echo "$ac_ct_OBJCOPY" >&6; }
42753else
42754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42755$as_echo "no" >&6; }
42756fi
42757
42758
42759  test -n "$ac_ct_OBJCOPY" && break
42760done
42761
42762  if test "x$ac_ct_OBJCOPY" = x; then
42763    OBJCOPY=""
42764  else
42765    case $cross_compiling:$ac_tool_warned in
42766yes:)
42767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42769ac_tool_warned=yes ;;
42770esac
42771    OBJCOPY=$ac_ct_OBJCOPY
42772  fi
42773fi
42774
42775    else
42776      # If it succeeded, then it was overridden by the user. We will use it
42777      # for the tool.
42778
42779      # First remove it from the list of overridden variables, so we can test
42780      # for unknown variables in the end.
42781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42782
42783      # Check if we try to supply an empty value
42784      if test "x$OBJCOPY" = x; then
42785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42786$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42788$as_echo_n "checking for OBJCOPY... " >&6; }
42789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42790$as_echo "disabled" >&6; }
42791      else
42792        # Check if the provided tool contains a complete path.
42793        tool_specified="$OBJCOPY"
42794        tool_basename="${tool_specified##*/}"
42795        if test "x$tool_basename" = "x$tool_specified"; then
42796          # A command without a complete path is provided, search $PATH.
42797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42798$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42799          # Extract the first word of "$tool_basename", so it can be a program name with args.
42800set dummy $tool_basename; ac_word=$2
42801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42802$as_echo_n "checking for $ac_word... " >&6; }
42803if ${ac_cv_path_OBJCOPY+:} false; then :
42804  $as_echo_n "(cached) " >&6
42805else
42806  case $OBJCOPY in
42807  [\\/]* | ?:[\\/]*)
42808  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42809  ;;
42810  *)
42811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42812for as_dir in $PATH
42813do
42814  IFS=$as_save_IFS
42815  test -z "$as_dir" && as_dir=.
42816    for ac_exec_ext in '' $ac_executable_extensions; do
42817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42818    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42820    break 2
42821  fi
42822done
42823  done
42824IFS=$as_save_IFS
42825
42826  ;;
42827esac
42828fi
42829OBJCOPY=$ac_cv_path_OBJCOPY
42830if test -n "$OBJCOPY"; then
42831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42832$as_echo "$OBJCOPY" >&6; }
42833else
42834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42835$as_echo "no" >&6; }
42836fi
42837
42838
42839          if test "x$OBJCOPY" = x; then
42840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42841          fi
42842        else
42843          # Otherwise we believe it is a complete path. Use it as it is.
42844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42845$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42847$as_echo_n "checking for OBJCOPY... " >&6; }
42848          if test ! -x "$tool_specified"; then
42849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42850$as_echo "not found" >&6; }
42851            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42852          fi
42853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42854$as_echo "$tool_specified" >&6; }
42855        fi
42856      fi
42857    fi
42858
42859  fi
42860
42861
42862    # Only call fixup if objcopy was found.
42863    if test -n "$OBJCOPY"; then
42864
42865  # Only process if variable expands to non-empty
42866
42867  if test "x$OBJCOPY" != x; then
42868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42869
42870  # First separate the path from the arguments. This will split at the first
42871  # space.
42872  complete="$OBJCOPY"
42873  path="${complete%% *}"
42874  tmp="$complete EOL"
42875  arguments="${tmp#* }"
42876
42877  # Input might be given as Windows format, start by converting to
42878  # unix format.
42879  new_path=`$CYGPATH -u "$path"`
42880
42881  # Now try to locate executable using which
42882  new_path=`$WHICH "$new_path" 2> /dev/null`
42883  # bat and cmd files are not always considered executable in cygwin causing which
42884  # to not find them
42885  if test "x$new_path" = x \
42886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42888    new_path=`$CYGPATH -u "$path"`
42889  fi
42890  if test "x$new_path" = x; then
42891    # Oops. Which didn't find the executable.
42892    # The splitting of arguments from the executable at a space might have been incorrect,
42893    # since paths with space are more likely in Windows. Give it another try with the whole
42894    # argument.
42895    path="$complete"
42896    arguments="EOL"
42897    new_path=`$CYGPATH -u "$path"`
42898    new_path=`$WHICH "$new_path" 2> /dev/null`
42899    # bat and cmd files are not always considered executable in cygwin causing which
42900    # to not find them
42901    if test "x$new_path" = x \
42902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42904      new_path=`$CYGPATH -u "$path"`
42905    fi
42906    if test "x$new_path" = x; then
42907      # It's still not found. Now this is an unrecoverable error.
42908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42909$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42910      has_space=`$ECHO "$complete" | $GREP " "`
42911      if test "x$has_space" != x; then
42912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42914      fi
42915      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42916    fi
42917  fi
42918
42919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42922  # "foo.exe" is OK but "foo" is an error.
42923  #
42924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42925  # It is also a way to make sure we got the proper file name for the real test later on.
42926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42927  if test "x$test_shortpath" = x; then
42928    # Short path failed, file does not exist as specified.
42929    # Try adding .exe or .cmd
42930    if test -f "${new_path}.exe"; then
42931      input_to_shortpath="${new_path}.exe"
42932    elif test -f "${new_path}.cmd"; then
42933      input_to_shortpath="${new_path}.cmd"
42934    else
42935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42936$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42939      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42940    fi
42941  else
42942    input_to_shortpath="$new_path"
42943  fi
42944
42945  # Call helper function which possibly converts this using DOS-style short mode.
42946  # If so, the updated path is stored in $new_path.
42947  new_path="$input_to_shortpath"
42948
42949  input_path="$input_to_shortpath"
42950  # Check if we need to convert this using DOS-style short mode. If the path
42951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42952  # take no chances and rewrite it.
42953  # Note: m4 eats our [], so we need to use [ and ] instead.
42954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42955  if test "x$has_forbidden_chars" != x; then
42956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42960      # Going to short mode and back again did indeed matter. Since short mode is
42961      # case insensitive, let's make it lowercase to improve readability.
42962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42963      # Now convert it back to Unix-style (cygpath)
42964      input_path=`$CYGPATH -u "$shortmode_path"`
42965      new_path="$input_path"
42966    fi
42967  fi
42968
42969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42970  if test "x$test_cygdrive_prefix" = x; then
42971    # As a simple fix, exclude /usr/bin since it's not a real path.
42972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42974      # a path prefixed by /cygdrive for fixpath to work.
42975      new_path="$CYGWIN_ROOT_PATH$input_path"
42976    fi
42977  fi
42978
42979  # remove trailing .exe if any
42980  new_path="${new_path/%.exe/}"
42981
42982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42983
42984  # First separate the path from the arguments. This will split at the first
42985  # space.
42986  complete="$OBJCOPY"
42987  path="${complete%% *}"
42988  tmp="$complete EOL"
42989  arguments="${tmp#* }"
42990
42991  # Input might be given as Windows format, start by converting to
42992  # unix format.
42993  new_path="$path"
42994
42995  windows_path="$new_path"
42996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42997    unix_path=`$CYGPATH -u "$windows_path"`
42998    new_path="$unix_path"
42999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43001    new_path="$unix_path"
43002  fi
43003
43004
43005  # Now try to locate executable using which
43006  new_path=`$WHICH "$new_path" 2> /dev/null`
43007
43008  if test "x$new_path" = x; then
43009    # Oops. Which didn't find the executable.
43010    # The splitting of arguments from the executable at a space might have been incorrect,
43011    # since paths with space are more likely in Windows. Give it another try with the whole
43012    # argument.
43013    path="$complete"
43014    arguments="EOL"
43015    new_path="$path"
43016
43017  windows_path="$new_path"
43018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43019    unix_path=`$CYGPATH -u "$windows_path"`
43020    new_path="$unix_path"
43021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43023    new_path="$unix_path"
43024  fi
43025
43026
43027    new_path=`$WHICH "$new_path" 2> /dev/null`
43028    # bat and cmd files are not always considered executable in MSYS causing which
43029    # to not find them
43030    if test "x$new_path" = x \
43031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43033      new_path="$path"
43034
43035  windows_path="$new_path"
43036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43037    unix_path=`$CYGPATH -u "$windows_path"`
43038    new_path="$unix_path"
43039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43041    new_path="$unix_path"
43042  fi
43043
43044    fi
43045
43046    if test "x$new_path" = x; then
43047      # It's still not found. Now this is an unrecoverable error.
43048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43049$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43050      has_space=`$ECHO "$complete" | $GREP " "`
43051      if test "x$has_space" != x; then
43052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43054      fi
43055      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43056    fi
43057  fi
43058
43059  # Now new_path has a complete unix path to the binary
43060  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43061    # Keep paths in /bin as-is, but remove trailing .exe if any
43062    new_path="${new_path/%.exe/}"
43063    # Do not save /bin paths to all_fixpath_prefixes!
43064  else
43065    # Not in mixed or Windows style, start by that.
43066    new_path=`cmd //c echo $new_path`
43067
43068  input_path="$new_path"
43069  # Check if we need to convert this using DOS-style short mode. If the path
43070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43071  # take no chances and rewrite it.
43072  # Note: m4 eats our [], so we need to use [ and ] instead.
43073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43074  if test "x$has_forbidden_chars" != x; then
43075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43077  fi
43078
43079    # Output is in $new_path
43080
43081  windows_path="$new_path"
43082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43083    unix_path=`$CYGPATH -u "$windows_path"`
43084    new_path="$unix_path"
43085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43087    new_path="$unix_path"
43088  fi
43089
43090    # remove trailing .exe if any
43091    new_path="${new_path/%.exe/}"
43092
43093    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43094    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43095  fi
43096
43097    else
43098      # We're on a unix platform. Hooray! :)
43099      # First separate the path from the arguments. This will split at the first
43100      # space.
43101      complete="$OBJCOPY"
43102      path="${complete%% *}"
43103      tmp="$complete EOL"
43104      arguments="${tmp#* }"
43105
43106      # Cannot rely on the command "which" here since it doesn't always work.
43107      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43108      if test -z "$is_absolute_path"; then
43109        # Path to executable is not absolute. Find it.
43110        IFS_save="$IFS"
43111        IFS=:
43112        for p in $PATH; do
43113          if test -f "$p/$path" && test -x "$p/$path"; then
43114            new_path="$p/$path"
43115            break
43116          fi
43117        done
43118        IFS="$IFS_save"
43119      else
43120        # This is an absolute path, we can use it without further modifications.
43121        new_path="$path"
43122      fi
43123
43124      if test "x$new_path" = x; then
43125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43126$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43127        has_space=`$ECHO "$complete" | $GREP " "`
43128        if test "x$has_space" != x; then
43129          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43130$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43131        fi
43132        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43133      fi
43134    fi
43135
43136    # Now join together the path and the arguments once again
43137    if test "x$arguments" != xEOL; then
43138      new_complete="$new_path ${arguments% *}"
43139    else
43140      new_complete="$new_path"
43141    fi
43142
43143    if test "x$complete" != "x$new_complete"; then
43144      OBJCOPY="$new_complete"
43145      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43146$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43147    fi
43148  fi
43149
43150      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43151        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43152        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43153        # - version number is last blank separate word on first line
43154        # - version number formats that have been seen:
43155        #   - <major>.<minor>
43156        #   - <major>.<minor>.<micro>
43157        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43158        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43159         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43160              -e 's/.* //' \
43161              -e '/^[01]\./b bad' \
43162              -e '/^2\./{' \
43163              -e '  s/^2\.//' \
43164              -e '  /^[0-9]$/b bad' \
43165              -e '  /^[0-9]\./b bad' \
43166              -e '  /^1[0-9]$/b bad' \
43167              -e '  /^1[0-9]\./b bad' \
43168              -e '  /^20\./b bad' \
43169              -e '  /^21\.0$/b bad' \
43170              -e '  /^21\.0\./b bad' \
43171              -e '}' \
43172              -e ':good' \
43173              -e 's/.*/VALID_VERSION/p' \
43174              -e 'q' \
43175              -e ':bad' \
43176              -e 's/.*/BAD_VERSION/p' \
43177              -e 'q'`
43178        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43179          OBJCOPY=
43180          { $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
43181$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43182          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43183$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43184          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43185$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43186          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43187$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43188          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43189$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43190        fi
43191      fi
43192    fi
43193  fi
43194
43195
43196
43197  # Publish this variable in the help.
43198
43199
43200  if [ -z "${OBJDUMP+x}" ]; then
43201    # The variable is not set by user, try to locate tool using the code snippet
43202    if test -n "$ac_tool_prefix"; then
43203  for ac_prog in gobjdump objdump
43204  do
43205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43208$as_echo_n "checking for $ac_word... " >&6; }
43209if ${ac_cv_prog_OBJDUMP+:} false; then :
43210  $as_echo_n "(cached) " >&6
43211else
43212  if test -n "$OBJDUMP"; then
43213  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43214else
43215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43216for as_dir in $PATH
43217do
43218  IFS=$as_save_IFS
43219  test -z "$as_dir" && as_dir=.
43220    for ac_exec_ext in '' $ac_executable_extensions; do
43221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43222    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43224    break 2
43225  fi
43226done
43227  done
43228IFS=$as_save_IFS
43229
43230fi
43231fi
43232OBJDUMP=$ac_cv_prog_OBJDUMP
43233if test -n "$OBJDUMP"; then
43234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43235$as_echo "$OBJDUMP" >&6; }
43236else
43237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43238$as_echo "no" >&6; }
43239fi
43240
43241
43242    test -n "$OBJDUMP" && break
43243  done
43244fi
43245if test -z "$OBJDUMP"; then
43246  ac_ct_OBJDUMP=$OBJDUMP
43247  for ac_prog in gobjdump objdump
43248do
43249  # Extract the first word of "$ac_prog", so it can be a program name with args.
43250set dummy $ac_prog; ac_word=$2
43251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43252$as_echo_n "checking for $ac_word... " >&6; }
43253if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43254  $as_echo_n "(cached) " >&6
43255else
43256  if test -n "$ac_ct_OBJDUMP"; then
43257  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43258else
43259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43260for as_dir in $PATH
43261do
43262  IFS=$as_save_IFS
43263  test -z "$as_dir" && as_dir=.
43264    for ac_exec_ext in '' $ac_executable_extensions; do
43265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43266    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43268    break 2
43269  fi
43270done
43271  done
43272IFS=$as_save_IFS
43273
43274fi
43275fi
43276ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43277if test -n "$ac_ct_OBJDUMP"; then
43278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43279$as_echo "$ac_ct_OBJDUMP" >&6; }
43280else
43281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43282$as_echo "no" >&6; }
43283fi
43284
43285
43286  test -n "$ac_ct_OBJDUMP" && break
43287done
43288
43289  if test "x$ac_ct_OBJDUMP" = x; then
43290    OBJDUMP=""
43291  else
43292    case $cross_compiling:$ac_tool_warned in
43293yes:)
43294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43296ac_tool_warned=yes ;;
43297esac
43298    OBJDUMP=$ac_ct_OBJDUMP
43299  fi
43300fi
43301
43302  else
43303    # The variable is set, but is it from the command line or the environment?
43304
43305    # Try to remove the string !OBJDUMP! from our list.
43306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43308      # If it failed, the variable was not from the command line. Ignore it,
43309      # but warn the user (except for BASH, which is always set by the calling BASH).
43310      if test "xOBJDUMP" != xBASH; then
43311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43312$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43313      fi
43314      # Try to locate tool using the code snippet
43315      if test -n "$ac_tool_prefix"; then
43316  for ac_prog in gobjdump objdump
43317  do
43318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43321$as_echo_n "checking for $ac_word... " >&6; }
43322if ${ac_cv_prog_OBJDUMP+:} false; then :
43323  $as_echo_n "(cached) " >&6
43324else
43325  if test -n "$OBJDUMP"; then
43326  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43327else
43328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43329for as_dir in $PATH
43330do
43331  IFS=$as_save_IFS
43332  test -z "$as_dir" && as_dir=.
43333    for ac_exec_ext in '' $ac_executable_extensions; do
43334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43335    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43337    break 2
43338  fi
43339done
43340  done
43341IFS=$as_save_IFS
43342
43343fi
43344fi
43345OBJDUMP=$ac_cv_prog_OBJDUMP
43346if test -n "$OBJDUMP"; then
43347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43348$as_echo "$OBJDUMP" >&6; }
43349else
43350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43351$as_echo "no" >&6; }
43352fi
43353
43354
43355    test -n "$OBJDUMP" && break
43356  done
43357fi
43358if test -z "$OBJDUMP"; then
43359  ac_ct_OBJDUMP=$OBJDUMP
43360  for ac_prog in gobjdump objdump
43361do
43362  # Extract the first word of "$ac_prog", so it can be a program name with args.
43363set dummy $ac_prog; ac_word=$2
43364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43365$as_echo_n "checking for $ac_word... " >&6; }
43366if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43367  $as_echo_n "(cached) " >&6
43368else
43369  if test -n "$ac_ct_OBJDUMP"; then
43370  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43371else
43372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43373for as_dir in $PATH
43374do
43375  IFS=$as_save_IFS
43376  test -z "$as_dir" && as_dir=.
43377    for ac_exec_ext in '' $ac_executable_extensions; do
43378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43379    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43381    break 2
43382  fi
43383done
43384  done
43385IFS=$as_save_IFS
43386
43387fi
43388fi
43389ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43390if test -n "$ac_ct_OBJDUMP"; then
43391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43392$as_echo "$ac_ct_OBJDUMP" >&6; }
43393else
43394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43395$as_echo "no" >&6; }
43396fi
43397
43398
43399  test -n "$ac_ct_OBJDUMP" && break
43400done
43401
43402  if test "x$ac_ct_OBJDUMP" = x; then
43403    OBJDUMP=""
43404  else
43405    case $cross_compiling:$ac_tool_warned in
43406yes:)
43407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43409ac_tool_warned=yes ;;
43410esac
43411    OBJDUMP=$ac_ct_OBJDUMP
43412  fi
43413fi
43414
43415    else
43416      # If it succeeded, then it was overridden by the user. We will use it
43417      # for the tool.
43418
43419      # First remove it from the list of overridden variables, so we can test
43420      # for unknown variables in the end.
43421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43422
43423      # Check if we try to supply an empty value
43424      if test "x$OBJDUMP" = x; then
43425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43426$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43428$as_echo_n "checking for OBJDUMP... " >&6; }
43429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43430$as_echo "disabled" >&6; }
43431      else
43432        # Check if the provided tool contains a complete path.
43433        tool_specified="$OBJDUMP"
43434        tool_basename="${tool_specified##*/}"
43435        if test "x$tool_basename" = "x$tool_specified"; then
43436          # A command without a complete path is provided, search $PATH.
43437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43438$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43439          # Extract the first word of "$tool_basename", so it can be a program name with args.
43440set dummy $tool_basename; ac_word=$2
43441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43442$as_echo_n "checking for $ac_word... " >&6; }
43443if ${ac_cv_path_OBJDUMP+:} false; then :
43444  $as_echo_n "(cached) " >&6
43445else
43446  case $OBJDUMP in
43447  [\\/]* | ?:[\\/]*)
43448  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43449  ;;
43450  *)
43451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43452for as_dir in $PATH
43453do
43454  IFS=$as_save_IFS
43455  test -z "$as_dir" && as_dir=.
43456    for ac_exec_ext in '' $ac_executable_extensions; do
43457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43458    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43460    break 2
43461  fi
43462done
43463  done
43464IFS=$as_save_IFS
43465
43466  ;;
43467esac
43468fi
43469OBJDUMP=$ac_cv_path_OBJDUMP
43470if test -n "$OBJDUMP"; then
43471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43472$as_echo "$OBJDUMP" >&6; }
43473else
43474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43475$as_echo "no" >&6; }
43476fi
43477
43478
43479          if test "x$OBJDUMP" = x; then
43480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43481          fi
43482        else
43483          # Otherwise we believe it is a complete path. Use it as it is.
43484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43485$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43487$as_echo_n "checking for OBJDUMP... " >&6; }
43488          if test ! -x "$tool_specified"; then
43489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43490$as_echo "not found" >&6; }
43491            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43492          fi
43493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43494$as_echo "$tool_specified" >&6; }
43495        fi
43496      fi
43497    fi
43498
43499  fi
43500
43501
43502  if test "x$OBJDUMP" != x; then
43503    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43504    # bails if argument is missing.
43505
43506  # Only process if variable expands to non-empty
43507
43508  if test "x$OBJDUMP" != x; then
43509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43510
43511  # First separate the path from the arguments. This will split at the first
43512  # space.
43513  complete="$OBJDUMP"
43514  path="${complete%% *}"
43515  tmp="$complete EOL"
43516  arguments="${tmp#* }"
43517
43518  # Input might be given as Windows format, start by converting to
43519  # unix format.
43520  new_path=`$CYGPATH -u "$path"`
43521
43522  # Now try to locate executable using which
43523  new_path=`$WHICH "$new_path" 2> /dev/null`
43524  # bat and cmd files are not always considered executable in cygwin causing which
43525  # to not find them
43526  if test "x$new_path" = x \
43527      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43528      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43529    new_path=`$CYGPATH -u "$path"`
43530  fi
43531  if test "x$new_path" = x; then
43532    # Oops. Which didn't find the executable.
43533    # The splitting of arguments from the executable at a space might have been incorrect,
43534    # since paths with space are more likely in Windows. Give it another try with the whole
43535    # argument.
43536    path="$complete"
43537    arguments="EOL"
43538    new_path=`$CYGPATH -u "$path"`
43539    new_path=`$WHICH "$new_path" 2> /dev/null`
43540    # bat and cmd files are not always considered executable in cygwin causing which
43541    # to not find them
43542    if test "x$new_path" = x \
43543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43545      new_path=`$CYGPATH -u "$path"`
43546    fi
43547    if test "x$new_path" = x; then
43548      # It's still not found. Now this is an unrecoverable error.
43549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43550$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43551      has_space=`$ECHO "$complete" | $GREP " "`
43552      if test "x$has_space" != x; then
43553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43555      fi
43556      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43557    fi
43558  fi
43559
43560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43563  # "foo.exe" is OK but "foo" is an error.
43564  #
43565  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43566  # It is also a way to make sure we got the proper file name for the real test later on.
43567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43568  if test "x$test_shortpath" = x; then
43569    # Short path failed, file does not exist as specified.
43570    # Try adding .exe or .cmd
43571    if test -f "${new_path}.exe"; then
43572      input_to_shortpath="${new_path}.exe"
43573    elif test -f "${new_path}.cmd"; then
43574      input_to_shortpath="${new_path}.cmd"
43575    else
43576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43577$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43580      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43581    fi
43582  else
43583    input_to_shortpath="$new_path"
43584  fi
43585
43586  # Call helper function which possibly converts this using DOS-style short mode.
43587  # If so, the updated path is stored in $new_path.
43588  new_path="$input_to_shortpath"
43589
43590  input_path="$input_to_shortpath"
43591  # Check if we need to convert this using DOS-style short mode. If the path
43592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43593  # take no chances and rewrite it.
43594  # Note: m4 eats our [], so we need to use [ and ] instead.
43595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43596  if test "x$has_forbidden_chars" != x; then
43597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43601      # Going to short mode and back again did indeed matter. Since short mode is
43602      # case insensitive, let's make it lowercase to improve readability.
43603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43604      # Now convert it back to Unix-style (cygpath)
43605      input_path=`$CYGPATH -u "$shortmode_path"`
43606      new_path="$input_path"
43607    fi
43608  fi
43609
43610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43611  if test "x$test_cygdrive_prefix" = x; then
43612    # As a simple fix, exclude /usr/bin since it's not a real path.
43613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43615      # a path prefixed by /cygdrive for fixpath to work.
43616      new_path="$CYGWIN_ROOT_PATH$input_path"
43617    fi
43618  fi
43619
43620  # remove trailing .exe if any
43621  new_path="${new_path/%.exe/}"
43622
43623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43624
43625  # First separate the path from the arguments. This will split at the first
43626  # space.
43627  complete="$OBJDUMP"
43628  path="${complete%% *}"
43629  tmp="$complete EOL"
43630  arguments="${tmp#* }"
43631
43632  # Input might be given as Windows format, start by converting to
43633  # unix format.
43634  new_path="$path"
43635
43636  windows_path="$new_path"
43637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43638    unix_path=`$CYGPATH -u "$windows_path"`
43639    new_path="$unix_path"
43640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43642    new_path="$unix_path"
43643  fi
43644
43645
43646  # Now try to locate executable using which
43647  new_path=`$WHICH "$new_path" 2> /dev/null`
43648
43649  if test "x$new_path" = x; then
43650    # Oops. Which didn't find the executable.
43651    # The splitting of arguments from the executable at a space might have been incorrect,
43652    # since paths with space are more likely in Windows. Give it another try with the whole
43653    # argument.
43654    path="$complete"
43655    arguments="EOL"
43656    new_path="$path"
43657
43658  windows_path="$new_path"
43659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43660    unix_path=`$CYGPATH -u "$windows_path"`
43661    new_path="$unix_path"
43662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43664    new_path="$unix_path"
43665  fi
43666
43667
43668    new_path=`$WHICH "$new_path" 2> /dev/null`
43669    # bat and cmd files are not always considered executable in MSYS causing which
43670    # to not find them
43671    if test "x$new_path" = x \
43672        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43673        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43674      new_path="$path"
43675
43676  windows_path="$new_path"
43677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43678    unix_path=`$CYGPATH -u "$windows_path"`
43679    new_path="$unix_path"
43680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43682    new_path="$unix_path"
43683  fi
43684
43685    fi
43686
43687    if test "x$new_path" = x; then
43688      # It's still not found. Now this is an unrecoverable error.
43689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43690$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43691      has_space=`$ECHO "$complete" | $GREP " "`
43692      if test "x$has_space" != x; then
43693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43695      fi
43696      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43697    fi
43698  fi
43699
43700  # Now new_path has a complete unix path to the binary
43701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43702    # Keep paths in /bin as-is, but remove trailing .exe if any
43703    new_path="${new_path/%.exe/}"
43704    # Do not save /bin paths to all_fixpath_prefixes!
43705  else
43706    # Not in mixed or Windows style, start by that.
43707    new_path=`cmd //c echo $new_path`
43708
43709  input_path="$new_path"
43710  # Check if we need to convert this using DOS-style short mode. If the path
43711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43712  # take no chances and rewrite it.
43713  # Note: m4 eats our [], so we need to use [ and ] instead.
43714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43715  if test "x$has_forbidden_chars" != x; then
43716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43718  fi
43719
43720    # Output is in $new_path
43721
43722  windows_path="$new_path"
43723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43724    unix_path=`$CYGPATH -u "$windows_path"`
43725    new_path="$unix_path"
43726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43728    new_path="$unix_path"
43729  fi
43730
43731    # remove trailing .exe if any
43732    new_path="${new_path/%.exe/}"
43733
43734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43736  fi
43737
43738    else
43739      # We're on a unix platform. Hooray! :)
43740      # First separate the path from the arguments. This will split at the first
43741      # space.
43742      complete="$OBJDUMP"
43743      path="${complete%% *}"
43744      tmp="$complete EOL"
43745      arguments="${tmp#* }"
43746
43747      # Cannot rely on the command "which" here since it doesn't always work.
43748      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43749      if test -z "$is_absolute_path"; then
43750        # Path to executable is not absolute. Find it.
43751        IFS_save="$IFS"
43752        IFS=:
43753        for p in $PATH; do
43754          if test -f "$p/$path" && test -x "$p/$path"; then
43755            new_path="$p/$path"
43756            break
43757          fi
43758        done
43759        IFS="$IFS_save"
43760      else
43761        # This is an absolute path, we can use it without further modifications.
43762        new_path="$path"
43763      fi
43764
43765      if test "x$new_path" = x; then
43766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43767$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43768        has_space=`$ECHO "$complete" | $GREP " "`
43769        if test "x$has_space" != x; then
43770          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43772        fi
43773        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43774      fi
43775    fi
43776
43777    # Now join together the path and the arguments once again
43778    if test "x$arguments" != xEOL; then
43779      new_complete="$new_path ${arguments% *}"
43780    else
43781      new_complete="$new_path"
43782    fi
43783
43784    if test "x$complete" != "x$new_complete"; then
43785      OBJDUMP="$new_complete"
43786      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43787$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43788    fi
43789  fi
43790
43791  fi
43792
43793
43794  # Restore old path.
43795  PATH="$OLD_PATH"
43796
43797  # Restore the flags to the user specified values.
43798  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43799  CFLAGS="$ORG_CFLAGS"
43800  CXXFLAGS="$ORG_CXXFLAGS"
43801
43802
43803# Finally do some processing after the detection phase
43804
43805  if test "x$COMPILE_TYPE" = "xcross"; then
43806    # Now we need to find a C/C++ compiler that can build executables for the
43807    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43808    # used once. Also, we need to do this without adding a tools dir to the
43809    # path, otherwise we might pick up cross-compilers which don't use standard
43810    # naming.
43811
43812    OLDPATH="$PATH"
43813
43814
43815# Check whether --with-build-devkit was given.
43816if test "${with_build_devkit+set}" = set; then :
43817  withval=$with_build_devkit;
43818fi
43819
43820    if test "x$with_build_devkit" = "xyes"; then
43821      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43822    elif test -n "$with_build_devkit"; then
43823      if test ! -d "$with_build_devkit"; then
43824        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43825      else
43826
43827  # Only process if variable expands to non-empty
43828
43829  if test "x$with_build_devkit" != x; then
43830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43831
43832  # Input might be given as Windows format, start by converting to
43833  # unix format.
43834  path="$with_build_devkit"
43835  new_path=`$CYGPATH -u "$path"`
43836
43837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43840  # "foo.exe" is OK but "foo" is an error.
43841  #
43842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43843  # It is also a way to make sure we got the proper file name for the real test later on.
43844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43845  if test "x$test_shortpath" = x; then
43846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43847$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43848    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43849  fi
43850
43851  # Call helper function which possibly converts this using DOS-style short mode.
43852  # If so, the updated path is stored in $new_path.
43853
43854  input_path="$new_path"
43855  # Check if we need to convert this using DOS-style short mode. If the path
43856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43857  # take no chances and rewrite it.
43858  # Note: m4 eats our [], so we need to use [ and ] instead.
43859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43860  if test "x$has_forbidden_chars" != x; then
43861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43865      # Going to short mode and back again did indeed matter. Since short mode is
43866      # case insensitive, let's make it lowercase to improve readability.
43867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43868      # Now convert it back to Unix-style (cygpath)
43869      input_path=`$CYGPATH -u "$shortmode_path"`
43870      new_path="$input_path"
43871    fi
43872  fi
43873
43874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43875  if test "x$test_cygdrive_prefix" = x; then
43876    # As a simple fix, exclude /usr/bin since it's not a real path.
43877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43879      # a path prefixed by /cygdrive for fixpath to work.
43880      new_path="$CYGWIN_ROOT_PATH$input_path"
43881    fi
43882  fi
43883
43884
43885  if test "x$path" != "x$new_path"; then
43886    with_build_devkit="$new_path"
43887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43888$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43889  fi
43890
43891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892
43893  path="$with_build_devkit"
43894  has_colon=`$ECHO $path | $GREP ^.:`
43895  new_path="$path"
43896  if test "x$has_colon" = x; then
43897    # Not in mixed or Windows style, start by that.
43898    new_path=`cmd //c echo $path`
43899  fi
43900
43901
43902  input_path="$new_path"
43903  # Check if we need to convert this using DOS-style short mode. If the path
43904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43905  # take no chances and rewrite it.
43906  # Note: m4 eats our [], so we need to use [ and ] instead.
43907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43908  if test "x$has_forbidden_chars" != x; then
43909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43911  fi
43912
43913
43914  windows_path="$new_path"
43915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43916    unix_path=`$CYGPATH -u "$windows_path"`
43917    new_path="$unix_path"
43918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43920    new_path="$unix_path"
43921  fi
43922
43923  if test "x$path" != "x$new_path"; then
43924    with_build_devkit="$new_path"
43925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43926$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43927  fi
43928
43929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43931
43932    else
43933      # We're on a unix platform. Hooray! :)
43934      path="$with_build_devkit"
43935      has_space=`$ECHO "$path" | $GREP " "`
43936      if test "x$has_space" != x; then
43937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43938$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43940      fi
43941
43942      # Use eval to expand a potential ~
43943      eval path="$path"
43944      if test ! -f "$path" && test ! -d "$path"; then
43945        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43946      fi
43947
43948      if test -d "$path"; then
43949        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43950      else
43951        dir="`$DIRNAME "$path"`"
43952        base="`$BASENAME "$path"`"
43953        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43954      fi
43955    fi
43956  fi
43957
43958        BUILD_DEVKIT_ROOT="$with_build_devkit"
43959        # Check for a meta data info file in the root of the devkit
43960        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43961          # Process devkit.info so that existing devkit variables are not
43962          # modified by this
43963          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43964              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43965              -e "s/\$host/\$build/g" \
43966              $BUILD_DEVKIT_ROOT/devkit.info \
43967              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43968          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43969          # This potentially sets the following:
43970          # A descriptive name of the devkit
43971
43972  if test "x$BUILD_DEVKIT_NAME" = x; then
43973    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43974  fi
43975
43976          # Corresponds to --with-extra-path
43977
43978  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43979    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43980  fi
43981
43982          # Corresponds to --with-toolchain-path
43983
43984  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43985    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43986  fi
43987
43988          # Corresponds to --with-sysroot
43989
43990  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43991    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43992  fi
43993
43994          # Skip the Window specific parts
43995        fi
43996
43997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43998$as_echo_n "checking for build platform devkit... " >&6; }
43999        if test "x$BUILD_DEVKIT_NAME" != x; then
44000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44001$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44002        else
44003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44004$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44005        fi
44006
44007        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44008
44009  if test "x$BUILD_SYSROOT" != "x"; then
44010    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44011      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44012        # Solaris Studio does not have a concept of sysroot. Instead we must
44013        # make sure the default include and lib dirs are appended to each
44014        # compile and link command line. Must also add -I-xbuiltin to enable
44015        # inlining of system functions and intrinsics.
44016        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44017        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44018            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44019            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44020      fi
44021    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44022      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44023      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44024    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44025      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44026      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44027    fi
44028    # Propagate the sysroot args to hotspot
44029    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44030    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44031    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44032    # The global CFLAGS and LDFLAGS variables need these for configure to function
44033    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44034    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44035    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44036    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44037  fi
44038
44039  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44040    # We also need -iframework<path>/System/Library/Frameworks
44041    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44042    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44043    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44044    # set this here so it doesn't have to be peppered throughout the forest
44045    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44046    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44047  fi
44048
44049
44050
44051
44052
44053         # Fallback default of just /bin if DEVKIT_PATH is not defined
44054        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44055          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44056        fi
44057        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44058      fi
44059    fi
44060
44061    # FIXME: we should list the discovered compilers as an exclude pattern!
44062    # If we do that, we can do this detection before POST_DETECTION, and still
44063    # find the build compilers in the tools dir, if needed.
44064
44065
44066
44067  # Publish this variable in the help.
44068
44069
44070  if [ -z "${BUILD_CC+x}" ]; then
44071    # The variable is not set by user, try to locate tool using the code snippet
44072    for ac_prog in cl cc gcc
44073do
44074  # Extract the first word of "$ac_prog", so it can be a program name with args.
44075set dummy $ac_prog; ac_word=$2
44076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44077$as_echo_n "checking for $ac_word... " >&6; }
44078if ${ac_cv_path_BUILD_CC+:} false; then :
44079  $as_echo_n "(cached) " >&6
44080else
44081  case $BUILD_CC in
44082  [\\/]* | ?:[\\/]*)
44083  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44084  ;;
44085  *)
44086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44087for as_dir in $PATH
44088do
44089  IFS=$as_save_IFS
44090  test -z "$as_dir" && as_dir=.
44091    for ac_exec_ext in '' $ac_executable_extensions; do
44092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44093    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44095    break 2
44096  fi
44097done
44098  done
44099IFS=$as_save_IFS
44100
44101  ;;
44102esac
44103fi
44104BUILD_CC=$ac_cv_path_BUILD_CC
44105if test -n "$BUILD_CC"; then
44106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44107$as_echo "$BUILD_CC" >&6; }
44108else
44109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44110$as_echo "no" >&6; }
44111fi
44112
44113
44114  test -n "$BUILD_CC" && break
44115done
44116
44117  else
44118    # The variable is set, but is it from the command line or the environment?
44119
44120    # Try to remove the string !BUILD_CC! from our list.
44121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44123      # If it failed, the variable was not from the command line. Ignore it,
44124      # but warn the user (except for BASH, which is always set by the calling BASH).
44125      if test "xBUILD_CC" != xBASH; then
44126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44127$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44128      fi
44129      # Try to locate tool using the code snippet
44130      for ac_prog in cl cc gcc
44131do
44132  # Extract the first word of "$ac_prog", so it can be a program name with args.
44133set dummy $ac_prog; ac_word=$2
44134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44135$as_echo_n "checking for $ac_word... " >&6; }
44136if ${ac_cv_path_BUILD_CC+:} false; then :
44137  $as_echo_n "(cached) " >&6
44138else
44139  case $BUILD_CC in
44140  [\\/]* | ?:[\\/]*)
44141  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44142  ;;
44143  *)
44144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44145for as_dir in $PATH
44146do
44147  IFS=$as_save_IFS
44148  test -z "$as_dir" && as_dir=.
44149    for ac_exec_ext in '' $ac_executable_extensions; do
44150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44151    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44153    break 2
44154  fi
44155done
44156  done
44157IFS=$as_save_IFS
44158
44159  ;;
44160esac
44161fi
44162BUILD_CC=$ac_cv_path_BUILD_CC
44163if test -n "$BUILD_CC"; then
44164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44165$as_echo "$BUILD_CC" >&6; }
44166else
44167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44168$as_echo "no" >&6; }
44169fi
44170
44171
44172  test -n "$BUILD_CC" && break
44173done
44174
44175    else
44176      # If it succeeded, then it was overridden by the user. We will use it
44177      # for the tool.
44178
44179      # First remove it from the list of overridden variables, so we can test
44180      # for unknown variables in the end.
44181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44182
44183      # Check if we try to supply an empty value
44184      if test "x$BUILD_CC" = x; then
44185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44186$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44188$as_echo_n "checking for BUILD_CC... " >&6; }
44189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44190$as_echo "disabled" >&6; }
44191      else
44192        # Check if the provided tool contains a complete path.
44193        tool_specified="$BUILD_CC"
44194        tool_basename="${tool_specified##*/}"
44195        if test "x$tool_basename" = "x$tool_specified"; then
44196          # A command without a complete path is provided, search $PATH.
44197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44198$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44199          # Extract the first word of "$tool_basename", so it can be a program name with args.
44200set dummy $tool_basename; ac_word=$2
44201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44202$as_echo_n "checking for $ac_word... " >&6; }
44203if ${ac_cv_path_BUILD_CC+:} false; then :
44204  $as_echo_n "(cached) " >&6
44205else
44206  case $BUILD_CC in
44207  [\\/]* | ?:[\\/]*)
44208  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44209  ;;
44210  *)
44211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44212for as_dir in $PATH
44213do
44214  IFS=$as_save_IFS
44215  test -z "$as_dir" && as_dir=.
44216    for ac_exec_ext in '' $ac_executable_extensions; do
44217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44218    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44220    break 2
44221  fi
44222done
44223  done
44224IFS=$as_save_IFS
44225
44226  ;;
44227esac
44228fi
44229BUILD_CC=$ac_cv_path_BUILD_CC
44230if test -n "$BUILD_CC"; then
44231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44232$as_echo "$BUILD_CC" >&6; }
44233else
44234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44235$as_echo "no" >&6; }
44236fi
44237
44238
44239          if test "x$BUILD_CC" = x; then
44240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44241          fi
44242        else
44243          # Otherwise we believe it is a complete path. Use it as it is.
44244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44245$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44247$as_echo_n "checking for BUILD_CC... " >&6; }
44248          if test ! -x "$tool_specified"; then
44249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44250$as_echo "not found" >&6; }
44251            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44252          fi
44253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44254$as_echo "$tool_specified" >&6; }
44255        fi
44256      fi
44257    fi
44258
44259  fi
44260
44261
44262
44263  if test "x$BUILD_CC" = x; then
44264    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44265  fi
44266
44267
44268
44269  # Only process if variable expands to non-empty
44270
44271  if test "x$BUILD_CC" != x; then
44272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44273
44274  # First separate the path from the arguments. This will split at the first
44275  # space.
44276  complete="$BUILD_CC"
44277  path="${complete%% *}"
44278  tmp="$complete EOL"
44279  arguments="${tmp#* }"
44280
44281  # Input might be given as Windows format, start by converting to
44282  # unix format.
44283  new_path=`$CYGPATH -u "$path"`
44284
44285  # Now try to locate executable using which
44286  new_path=`$WHICH "$new_path" 2> /dev/null`
44287  # bat and cmd files are not always considered executable in cygwin causing which
44288  # to not find them
44289  if test "x$new_path" = x \
44290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44292    new_path=`$CYGPATH -u "$path"`
44293  fi
44294  if test "x$new_path" = x; then
44295    # Oops. Which didn't find the executable.
44296    # The splitting of arguments from the executable at a space might have been incorrect,
44297    # since paths with space are more likely in Windows. Give it another try with the whole
44298    # argument.
44299    path="$complete"
44300    arguments="EOL"
44301    new_path=`$CYGPATH -u "$path"`
44302    new_path=`$WHICH "$new_path" 2> /dev/null`
44303    # bat and cmd files are not always considered executable in cygwin causing which
44304    # to not find them
44305    if test "x$new_path" = x \
44306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44308      new_path=`$CYGPATH -u "$path"`
44309    fi
44310    if test "x$new_path" = x; then
44311      # It's still not found. Now this is an unrecoverable error.
44312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44313$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44314      has_space=`$ECHO "$complete" | $GREP " "`
44315      if test "x$has_space" != x; then
44316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44318      fi
44319      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44320    fi
44321  fi
44322
44323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44326  # "foo.exe" is OK but "foo" is an error.
44327  #
44328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44329  # It is also a way to make sure we got the proper file name for the real test later on.
44330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44331  if test "x$test_shortpath" = x; then
44332    # Short path failed, file does not exist as specified.
44333    # Try adding .exe or .cmd
44334    if test -f "${new_path}.exe"; then
44335      input_to_shortpath="${new_path}.exe"
44336    elif test -f "${new_path}.cmd"; then
44337      input_to_shortpath="${new_path}.cmd"
44338    else
44339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44340$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44343      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44344    fi
44345  else
44346    input_to_shortpath="$new_path"
44347  fi
44348
44349  # Call helper function which possibly converts this using DOS-style short mode.
44350  # If so, the updated path is stored in $new_path.
44351  new_path="$input_to_shortpath"
44352
44353  input_path="$input_to_shortpath"
44354  # Check if we need to convert this using DOS-style short mode. If the path
44355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44356  # take no chances and rewrite it.
44357  # Note: m4 eats our [], so we need to use [ and ] instead.
44358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44359  if test "x$has_forbidden_chars" != x; then
44360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44364      # Going to short mode and back again did indeed matter. Since short mode is
44365      # case insensitive, let's make it lowercase to improve readability.
44366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44367      # Now convert it back to Unix-style (cygpath)
44368      input_path=`$CYGPATH -u "$shortmode_path"`
44369      new_path="$input_path"
44370    fi
44371  fi
44372
44373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44374  if test "x$test_cygdrive_prefix" = x; then
44375    # As a simple fix, exclude /usr/bin since it's not a real path.
44376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44378      # a path prefixed by /cygdrive for fixpath to work.
44379      new_path="$CYGWIN_ROOT_PATH$input_path"
44380    fi
44381  fi
44382
44383  # remove trailing .exe if any
44384  new_path="${new_path/%.exe/}"
44385
44386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44387
44388  # First separate the path from the arguments. This will split at the first
44389  # space.
44390  complete="$BUILD_CC"
44391  path="${complete%% *}"
44392  tmp="$complete EOL"
44393  arguments="${tmp#* }"
44394
44395  # Input might be given as Windows format, start by converting to
44396  # unix format.
44397  new_path="$path"
44398
44399  windows_path="$new_path"
44400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44401    unix_path=`$CYGPATH -u "$windows_path"`
44402    new_path="$unix_path"
44403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44405    new_path="$unix_path"
44406  fi
44407
44408
44409  # Now try to locate executable using which
44410  new_path=`$WHICH "$new_path" 2> /dev/null`
44411
44412  if test "x$new_path" = x; then
44413    # Oops. Which didn't find the executable.
44414    # The splitting of arguments from the executable at a space might have been incorrect,
44415    # since paths with space are more likely in Windows. Give it another try with the whole
44416    # argument.
44417    path="$complete"
44418    arguments="EOL"
44419    new_path="$path"
44420
44421  windows_path="$new_path"
44422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44423    unix_path=`$CYGPATH -u "$windows_path"`
44424    new_path="$unix_path"
44425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44427    new_path="$unix_path"
44428  fi
44429
44430
44431    new_path=`$WHICH "$new_path" 2> /dev/null`
44432    # bat and cmd files are not always considered executable in MSYS causing which
44433    # to not find them
44434    if test "x$new_path" = x \
44435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44437      new_path="$path"
44438
44439  windows_path="$new_path"
44440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44441    unix_path=`$CYGPATH -u "$windows_path"`
44442    new_path="$unix_path"
44443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44445    new_path="$unix_path"
44446  fi
44447
44448    fi
44449
44450    if test "x$new_path" = x; then
44451      # It's still not found. Now this is an unrecoverable error.
44452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44453$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44454      has_space=`$ECHO "$complete" | $GREP " "`
44455      if test "x$has_space" != x; then
44456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44458      fi
44459      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44460    fi
44461  fi
44462
44463  # Now new_path has a complete unix path to the binary
44464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44465    # Keep paths in /bin as-is, but remove trailing .exe if any
44466    new_path="${new_path/%.exe/}"
44467    # Do not save /bin paths to all_fixpath_prefixes!
44468  else
44469    # Not in mixed or Windows style, start by that.
44470    new_path=`cmd //c echo $new_path`
44471
44472  input_path="$new_path"
44473  # Check if we need to convert this using DOS-style short mode. If the path
44474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44475  # take no chances and rewrite it.
44476  # Note: m4 eats our [], so we need to use [ and ] instead.
44477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44478  if test "x$has_forbidden_chars" != x; then
44479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44481  fi
44482
44483    # Output is in $new_path
44484
44485  windows_path="$new_path"
44486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44487    unix_path=`$CYGPATH -u "$windows_path"`
44488    new_path="$unix_path"
44489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44491    new_path="$unix_path"
44492  fi
44493
44494    # remove trailing .exe if any
44495    new_path="${new_path/%.exe/}"
44496
44497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44499  fi
44500
44501    else
44502      # We're on a unix platform. Hooray! :)
44503      # First separate the path from the arguments. This will split at the first
44504      # space.
44505      complete="$BUILD_CC"
44506      path="${complete%% *}"
44507      tmp="$complete EOL"
44508      arguments="${tmp#* }"
44509
44510      # Cannot rely on the command "which" here since it doesn't always work.
44511      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44512      if test -z "$is_absolute_path"; then
44513        # Path to executable is not absolute. Find it.
44514        IFS_save="$IFS"
44515        IFS=:
44516        for p in $PATH; do
44517          if test -f "$p/$path" && test -x "$p/$path"; then
44518            new_path="$p/$path"
44519            break
44520          fi
44521        done
44522        IFS="$IFS_save"
44523      else
44524        # This is an absolute path, we can use it without further modifications.
44525        new_path="$path"
44526      fi
44527
44528      if test "x$new_path" = x; then
44529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44530$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44531        has_space=`$ECHO "$complete" | $GREP " "`
44532        if test "x$has_space" != x; then
44533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44535        fi
44536        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44537      fi
44538    fi
44539
44540    # Now join together the path and the arguments once again
44541    if test "x$arguments" != xEOL; then
44542      new_complete="$new_path ${arguments% *}"
44543    else
44544      new_complete="$new_path"
44545    fi
44546
44547    if test "x$complete" != "x$new_complete"; then
44548      BUILD_CC="$new_complete"
44549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44550$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44551    fi
44552  fi
44553
44554
44555
44556
44557  # Publish this variable in the help.
44558
44559
44560  if [ -z "${BUILD_CXX+x}" ]; then
44561    # The variable is not set by user, try to locate tool using the code snippet
44562    for ac_prog in cl CC g++
44563do
44564  # Extract the first word of "$ac_prog", so it can be a program name with args.
44565set dummy $ac_prog; ac_word=$2
44566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44567$as_echo_n "checking for $ac_word... " >&6; }
44568if ${ac_cv_path_BUILD_CXX+:} false; then :
44569  $as_echo_n "(cached) " >&6
44570else
44571  case $BUILD_CXX in
44572  [\\/]* | ?:[\\/]*)
44573  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44574  ;;
44575  *)
44576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44577for as_dir in $PATH
44578do
44579  IFS=$as_save_IFS
44580  test -z "$as_dir" && as_dir=.
44581    for ac_exec_ext in '' $ac_executable_extensions; do
44582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44583    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44585    break 2
44586  fi
44587done
44588  done
44589IFS=$as_save_IFS
44590
44591  ;;
44592esac
44593fi
44594BUILD_CXX=$ac_cv_path_BUILD_CXX
44595if test -n "$BUILD_CXX"; then
44596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44597$as_echo "$BUILD_CXX" >&6; }
44598else
44599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44600$as_echo "no" >&6; }
44601fi
44602
44603
44604  test -n "$BUILD_CXX" && break
44605done
44606
44607  else
44608    # The variable is set, but is it from the command line or the environment?
44609
44610    # Try to remove the string !BUILD_CXX! from our list.
44611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44613      # If it failed, the variable was not from the command line. Ignore it,
44614      # but warn the user (except for BASH, which is always set by the calling BASH).
44615      if test "xBUILD_CXX" != xBASH; then
44616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44617$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44618      fi
44619      # Try to locate tool using the code snippet
44620      for ac_prog in cl CC g++
44621do
44622  # Extract the first word of "$ac_prog", so it can be a program name with args.
44623set dummy $ac_prog; ac_word=$2
44624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44625$as_echo_n "checking for $ac_word... " >&6; }
44626if ${ac_cv_path_BUILD_CXX+:} false; then :
44627  $as_echo_n "(cached) " >&6
44628else
44629  case $BUILD_CXX in
44630  [\\/]* | ?:[\\/]*)
44631  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44632  ;;
44633  *)
44634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44635for as_dir in $PATH
44636do
44637  IFS=$as_save_IFS
44638  test -z "$as_dir" && as_dir=.
44639    for ac_exec_ext in '' $ac_executable_extensions; do
44640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44641    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44643    break 2
44644  fi
44645done
44646  done
44647IFS=$as_save_IFS
44648
44649  ;;
44650esac
44651fi
44652BUILD_CXX=$ac_cv_path_BUILD_CXX
44653if test -n "$BUILD_CXX"; then
44654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44655$as_echo "$BUILD_CXX" >&6; }
44656else
44657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44658$as_echo "no" >&6; }
44659fi
44660
44661
44662  test -n "$BUILD_CXX" && break
44663done
44664
44665    else
44666      # If it succeeded, then it was overridden by the user. We will use it
44667      # for the tool.
44668
44669      # First remove it from the list of overridden variables, so we can test
44670      # for unknown variables in the end.
44671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44672
44673      # Check if we try to supply an empty value
44674      if test "x$BUILD_CXX" = x; then
44675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44676$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44678$as_echo_n "checking for BUILD_CXX... " >&6; }
44679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44680$as_echo "disabled" >&6; }
44681      else
44682        # Check if the provided tool contains a complete path.
44683        tool_specified="$BUILD_CXX"
44684        tool_basename="${tool_specified##*/}"
44685        if test "x$tool_basename" = "x$tool_specified"; then
44686          # A command without a complete path is provided, search $PATH.
44687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44688$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44689          # Extract the first word of "$tool_basename", so it can be a program name with args.
44690set dummy $tool_basename; ac_word=$2
44691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44692$as_echo_n "checking for $ac_word... " >&6; }
44693if ${ac_cv_path_BUILD_CXX+:} false; then :
44694  $as_echo_n "(cached) " >&6
44695else
44696  case $BUILD_CXX in
44697  [\\/]* | ?:[\\/]*)
44698  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44699  ;;
44700  *)
44701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44702for as_dir in $PATH
44703do
44704  IFS=$as_save_IFS
44705  test -z "$as_dir" && as_dir=.
44706    for ac_exec_ext in '' $ac_executable_extensions; do
44707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44708    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44710    break 2
44711  fi
44712done
44713  done
44714IFS=$as_save_IFS
44715
44716  ;;
44717esac
44718fi
44719BUILD_CXX=$ac_cv_path_BUILD_CXX
44720if test -n "$BUILD_CXX"; then
44721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44722$as_echo "$BUILD_CXX" >&6; }
44723else
44724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44725$as_echo "no" >&6; }
44726fi
44727
44728
44729          if test "x$BUILD_CXX" = x; then
44730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44731          fi
44732        else
44733          # Otherwise we believe it is a complete path. Use it as it is.
44734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44735$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44737$as_echo_n "checking for BUILD_CXX... " >&6; }
44738          if test ! -x "$tool_specified"; then
44739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44740$as_echo "not found" >&6; }
44741            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44742          fi
44743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44744$as_echo "$tool_specified" >&6; }
44745        fi
44746      fi
44747    fi
44748
44749  fi
44750
44751
44752
44753  if test "x$BUILD_CXX" = x; then
44754    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44755  fi
44756
44757
44758
44759  # Only process if variable expands to non-empty
44760
44761  if test "x$BUILD_CXX" != x; then
44762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44763
44764  # First separate the path from the arguments. This will split at the first
44765  # space.
44766  complete="$BUILD_CXX"
44767  path="${complete%% *}"
44768  tmp="$complete EOL"
44769  arguments="${tmp#* }"
44770
44771  # Input might be given as Windows format, start by converting to
44772  # unix format.
44773  new_path=`$CYGPATH -u "$path"`
44774
44775  # Now try to locate executable using which
44776  new_path=`$WHICH "$new_path" 2> /dev/null`
44777  # bat and cmd files are not always considered executable in cygwin causing which
44778  # to not find them
44779  if test "x$new_path" = x \
44780      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44781      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44782    new_path=`$CYGPATH -u "$path"`
44783  fi
44784  if test "x$new_path" = x; then
44785    # Oops. Which didn't find the executable.
44786    # The splitting of arguments from the executable at a space might have been incorrect,
44787    # since paths with space are more likely in Windows. Give it another try with the whole
44788    # argument.
44789    path="$complete"
44790    arguments="EOL"
44791    new_path=`$CYGPATH -u "$path"`
44792    new_path=`$WHICH "$new_path" 2> /dev/null`
44793    # bat and cmd files are not always considered executable in cygwin causing which
44794    # to not find them
44795    if test "x$new_path" = x \
44796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44798      new_path=`$CYGPATH -u "$path"`
44799    fi
44800    if test "x$new_path" = x; then
44801      # It's still not found. Now this is an unrecoverable error.
44802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44803$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44804      has_space=`$ECHO "$complete" | $GREP " "`
44805      if test "x$has_space" != x; then
44806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44808      fi
44809      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44810    fi
44811  fi
44812
44813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44816  # "foo.exe" is OK but "foo" is an error.
44817  #
44818  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44819  # It is also a way to make sure we got the proper file name for the real test later on.
44820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44821  if test "x$test_shortpath" = x; then
44822    # Short path failed, file does not exist as specified.
44823    # Try adding .exe or .cmd
44824    if test -f "${new_path}.exe"; then
44825      input_to_shortpath="${new_path}.exe"
44826    elif test -f "${new_path}.cmd"; then
44827      input_to_shortpath="${new_path}.cmd"
44828    else
44829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44830$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44831      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44832$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44833      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44834    fi
44835  else
44836    input_to_shortpath="$new_path"
44837  fi
44838
44839  # Call helper function which possibly converts this using DOS-style short mode.
44840  # If so, the updated path is stored in $new_path.
44841  new_path="$input_to_shortpath"
44842
44843  input_path="$input_to_shortpath"
44844  # Check if we need to convert this using DOS-style short mode. If the path
44845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44846  # take no chances and rewrite it.
44847  # Note: m4 eats our [], so we need to use [ and ] instead.
44848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44849  if test "x$has_forbidden_chars" != x; then
44850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44854      # Going to short mode and back again did indeed matter. Since short mode is
44855      # case insensitive, let's make it lowercase to improve readability.
44856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44857      # Now convert it back to Unix-style (cygpath)
44858      input_path=`$CYGPATH -u "$shortmode_path"`
44859      new_path="$input_path"
44860    fi
44861  fi
44862
44863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44864  if test "x$test_cygdrive_prefix" = x; then
44865    # As a simple fix, exclude /usr/bin since it's not a real path.
44866    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44868      # a path prefixed by /cygdrive for fixpath to work.
44869      new_path="$CYGWIN_ROOT_PATH$input_path"
44870    fi
44871  fi
44872
44873  # remove trailing .exe if any
44874  new_path="${new_path/%.exe/}"
44875
44876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44877
44878  # First separate the path from the arguments. This will split at the first
44879  # space.
44880  complete="$BUILD_CXX"
44881  path="${complete%% *}"
44882  tmp="$complete EOL"
44883  arguments="${tmp#* }"
44884
44885  # Input might be given as Windows format, start by converting to
44886  # unix format.
44887  new_path="$path"
44888
44889  windows_path="$new_path"
44890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44891    unix_path=`$CYGPATH -u "$windows_path"`
44892    new_path="$unix_path"
44893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44895    new_path="$unix_path"
44896  fi
44897
44898
44899  # Now try to locate executable using which
44900  new_path=`$WHICH "$new_path" 2> /dev/null`
44901
44902  if test "x$new_path" = x; then
44903    # Oops. Which didn't find the executable.
44904    # The splitting of arguments from the executable at a space might have been incorrect,
44905    # since paths with space are more likely in Windows. Give it another try with the whole
44906    # argument.
44907    path="$complete"
44908    arguments="EOL"
44909    new_path="$path"
44910
44911  windows_path="$new_path"
44912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44913    unix_path=`$CYGPATH -u "$windows_path"`
44914    new_path="$unix_path"
44915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44917    new_path="$unix_path"
44918  fi
44919
44920
44921    new_path=`$WHICH "$new_path" 2> /dev/null`
44922    # bat and cmd files are not always considered executable in MSYS causing which
44923    # to not find them
44924    if test "x$new_path" = x \
44925        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44926        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44927      new_path="$path"
44928
44929  windows_path="$new_path"
44930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44931    unix_path=`$CYGPATH -u "$windows_path"`
44932    new_path="$unix_path"
44933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44935    new_path="$unix_path"
44936  fi
44937
44938    fi
44939
44940    if test "x$new_path" = x; then
44941      # It's still not found. Now this is an unrecoverable error.
44942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44943$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44944      has_space=`$ECHO "$complete" | $GREP " "`
44945      if test "x$has_space" != x; then
44946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44948      fi
44949      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44950    fi
44951  fi
44952
44953  # Now new_path has a complete unix path to the binary
44954  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44955    # Keep paths in /bin as-is, but remove trailing .exe if any
44956    new_path="${new_path/%.exe/}"
44957    # Do not save /bin paths to all_fixpath_prefixes!
44958  else
44959    # Not in mixed or Windows style, start by that.
44960    new_path=`cmd //c echo $new_path`
44961
44962  input_path="$new_path"
44963  # Check if we need to convert this using DOS-style short mode. If the path
44964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44965  # take no chances and rewrite it.
44966  # Note: m4 eats our [], so we need to use [ and ] instead.
44967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44968  if test "x$has_forbidden_chars" != x; then
44969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44971  fi
44972
44973    # Output is in $new_path
44974
44975  windows_path="$new_path"
44976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44977    unix_path=`$CYGPATH -u "$windows_path"`
44978    new_path="$unix_path"
44979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44981    new_path="$unix_path"
44982  fi
44983
44984    # remove trailing .exe if any
44985    new_path="${new_path/%.exe/}"
44986
44987    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44988    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44989  fi
44990
44991    else
44992      # We're on a unix platform. Hooray! :)
44993      # First separate the path from the arguments. This will split at the first
44994      # space.
44995      complete="$BUILD_CXX"
44996      path="${complete%% *}"
44997      tmp="$complete EOL"
44998      arguments="${tmp#* }"
44999
45000      # Cannot rely on the command "which" here since it doesn't always work.
45001      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45002      if test -z "$is_absolute_path"; then
45003        # Path to executable is not absolute. Find it.
45004        IFS_save="$IFS"
45005        IFS=:
45006        for p in $PATH; do
45007          if test -f "$p/$path" && test -x "$p/$path"; then
45008            new_path="$p/$path"
45009            break
45010          fi
45011        done
45012        IFS="$IFS_save"
45013      else
45014        # This is an absolute path, we can use it without further modifications.
45015        new_path="$path"
45016      fi
45017
45018      if test "x$new_path" = x; then
45019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45020$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45021        has_space=`$ECHO "$complete" | $GREP " "`
45022        if test "x$has_space" != x; then
45023          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45024$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45025        fi
45026        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45027      fi
45028    fi
45029
45030    # Now join together the path and the arguments once again
45031    if test "x$arguments" != xEOL; then
45032      new_complete="$new_path ${arguments% *}"
45033    else
45034      new_complete="$new_path"
45035    fi
45036
45037    if test "x$complete" != "x$new_complete"; then
45038      BUILD_CXX="$new_complete"
45039      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45040$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45041    fi
45042  fi
45043
45044
45045
45046  # Publish this variable in the help.
45047
45048
45049  if [ -z "${BUILD_NM+x}" ]; then
45050    # The variable is not set by user, try to locate tool using the code snippet
45051    for ac_prog in nm gcc-nm
45052do
45053  # Extract the first word of "$ac_prog", so it can be a program name with args.
45054set dummy $ac_prog; ac_word=$2
45055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45056$as_echo_n "checking for $ac_word... " >&6; }
45057if ${ac_cv_path_BUILD_NM+:} false; then :
45058  $as_echo_n "(cached) " >&6
45059else
45060  case $BUILD_NM in
45061  [\\/]* | ?:[\\/]*)
45062  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45063  ;;
45064  *)
45065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45066for as_dir in $PATH
45067do
45068  IFS=$as_save_IFS
45069  test -z "$as_dir" && as_dir=.
45070    for ac_exec_ext in '' $ac_executable_extensions; do
45071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45072    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45074    break 2
45075  fi
45076done
45077  done
45078IFS=$as_save_IFS
45079
45080  ;;
45081esac
45082fi
45083BUILD_NM=$ac_cv_path_BUILD_NM
45084if test -n "$BUILD_NM"; then
45085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45086$as_echo "$BUILD_NM" >&6; }
45087else
45088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45089$as_echo "no" >&6; }
45090fi
45091
45092
45093  test -n "$BUILD_NM" && break
45094done
45095
45096  else
45097    # The variable is set, but is it from the command line or the environment?
45098
45099    # Try to remove the string !BUILD_NM! from our list.
45100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45102      # If it failed, the variable was not from the command line. Ignore it,
45103      # but warn the user (except for BASH, which is always set by the calling BASH).
45104      if test "xBUILD_NM" != xBASH; then
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45106$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45107      fi
45108      # Try to locate tool using the code snippet
45109      for ac_prog in nm gcc-nm
45110do
45111  # Extract the first word of "$ac_prog", so it can be a program name with args.
45112set dummy $ac_prog; ac_word=$2
45113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45114$as_echo_n "checking for $ac_word... " >&6; }
45115if ${ac_cv_path_BUILD_NM+:} false; then :
45116  $as_echo_n "(cached) " >&6
45117else
45118  case $BUILD_NM in
45119  [\\/]* | ?:[\\/]*)
45120  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45121  ;;
45122  *)
45123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45124for as_dir in $PATH
45125do
45126  IFS=$as_save_IFS
45127  test -z "$as_dir" && as_dir=.
45128    for ac_exec_ext in '' $ac_executable_extensions; do
45129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45130    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45132    break 2
45133  fi
45134done
45135  done
45136IFS=$as_save_IFS
45137
45138  ;;
45139esac
45140fi
45141BUILD_NM=$ac_cv_path_BUILD_NM
45142if test -n "$BUILD_NM"; then
45143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45144$as_echo "$BUILD_NM" >&6; }
45145else
45146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45147$as_echo "no" >&6; }
45148fi
45149
45150
45151  test -n "$BUILD_NM" && break
45152done
45153
45154    else
45155      # If it succeeded, then it was overridden by the user. We will use it
45156      # for the tool.
45157
45158      # First remove it from the list of overridden variables, so we can test
45159      # for unknown variables in the end.
45160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45161
45162      # Check if we try to supply an empty value
45163      if test "x$BUILD_NM" = x; then
45164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45165$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45167$as_echo_n "checking for BUILD_NM... " >&6; }
45168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45169$as_echo "disabled" >&6; }
45170      else
45171        # Check if the provided tool contains a complete path.
45172        tool_specified="$BUILD_NM"
45173        tool_basename="${tool_specified##*/}"
45174        if test "x$tool_basename" = "x$tool_specified"; then
45175          # A command without a complete path is provided, search $PATH.
45176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45177$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45178          # Extract the first word of "$tool_basename", so it can be a program name with args.
45179set dummy $tool_basename; ac_word=$2
45180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45181$as_echo_n "checking for $ac_word... " >&6; }
45182if ${ac_cv_path_BUILD_NM+:} false; then :
45183  $as_echo_n "(cached) " >&6
45184else
45185  case $BUILD_NM in
45186  [\\/]* | ?:[\\/]*)
45187  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45188  ;;
45189  *)
45190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45191for as_dir in $PATH
45192do
45193  IFS=$as_save_IFS
45194  test -z "$as_dir" && as_dir=.
45195    for ac_exec_ext in '' $ac_executable_extensions; do
45196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45197    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45199    break 2
45200  fi
45201done
45202  done
45203IFS=$as_save_IFS
45204
45205  ;;
45206esac
45207fi
45208BUILD_NM=$ac_cv_path_BUILD_NM
45209if test -n "$BUILD_NM"; then
45210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45211$as_echo "$BUILD_NM" >&6; }
45212else
45213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45214$as_echo "no" >&6; }
45215fi
45216
45217
45218          if test "x$BUILD_NM" = x; then
45219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45220          fi
45221        else
45222          # Otherwise we believe it is a complete path. Use it as it is.
45223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45224$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45226$as_echo_n "checking for BUILD_NM... " >&6; }
45227          if test ! -x "$tool_specified"; then
45228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45229$as_echo "not found" >&6; }
45230            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45231          fi
45232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45233$as_echo "$tool_specified" >&6; }
45234        fi
45235      fi
45236    fi
45237
45238  fi
45239
45240
45241
45242  # Only process if variable expands to non-empty
45243
45244  if test "x$BUILD_NM" != x; then
45245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45246
45247  # First separate the path from the arguments. This will split at the first
45248  # space.
45249  complete="$BUILD_NM"
45250  path="${complete%% *}"
45251  tmp="$complete EOL"
45252  arguments="${tmp#* }"
45253
45254  # Input might be given as Windows format, start by converting to
45255  # unix format.
45256  new_path=`$CYGPATH -u "$path"`
45257
45258  # Now try to locate executable using which
45259  new_path=`$WHICH "$new_path" 2> /dev/null`
45260  # bat and cmd files are not always considered executable in cygwin causing which
45261  # to not find them
45262  if test "x$new_path" = x \
45263      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45264      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45265    new_path=`$CYGPATH -u "$path"`
45266  fi
45267  if test "x$new_path" = x; then
45268    # Oops. Which didn't find the executable.
45269    # The splitting of arguments from the executable at a space might have been incorrect,
45270    # since paths with space are more likely in Windows. Give it another try with the whole
45271    # argument.
45272    path="$complete"
45273    arguments="EOL"
45274    new_path=`$CYGPATH -u "$path"`
45275    new_path=`$WHICH "$new_path" 2> /dev/null`
45276    # bat and cmd files are not always considered executable in cygwin causing which
45277    # to not find them
45278    if test "x$new_path" = x \
45279        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45280        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45281      new_path=`$CYGPATH -u "$path"`
45282    fi
45283    if test "x$new_path" = x; then
45284      # It's still not found. Now this is an unrecoverable error.
45285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45286$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45287      has_space=`$ECHO "$complete" | $GREP " "`
45288      if test "x$has_space" != x; then
45289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45291      fi
45292      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45293    fi
45294  fi
45295
45296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45299  # "foo.exe" is OK but "foo" is an error.
45300  #
45301  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45302  # It is also a way to make sure we got the proper file name for the real test later on.
45303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45304  if test "x$test_shortpath" = x; then
45305    # Short path failed, file does not exist as specified.
45306    # Try adding .exe or .cmd
45307    if test -f "${new_path}.exe"; then
45308      input_to_shortpath="${new_path}.exe"
45309    elif test -f "${new_path}.cmd"; then
45310      input_to_shortpath="${new_path}.cmd"
45311    else
45312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45313$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45316      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45317    fi
45318  else
45319    input_to_shortpath="$new_path"
45320  fi
45321
45322  # Call helper function which possibly converts this using DOS-style short mode.
45323  # If so, the updated path is stored in $new_path.
45324  new_path="$input_to_shortpath"
45325
45326  input_path="$input_to_shortpath"
45327  # Check if we need to convert this using DOS-style short mode. If the path
45328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45329  # take no chances and rewrite it.
45330  # Note: m4 eats our [], so we need to use [ and ] instead.
45331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45332  if test "x$has_forbidden_chars" != x; then
45333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45337      # Going to short mode and back again did indeed matter. Since short mode is
45338      # case insensitive, let's make it lowercase to improve readability.
45339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45340      # Now convert it back to Unix-style (cygpath)
45341      input_path=`$CYGPATH -u "$shortmode_path"`
45342      new_path="$input_path"
45343    fi
45344  fi
45345
45346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45347  if test "x$test_cygdrive_prefix" = x; then
45348    # As a simple fix, exclude /usr/bin since it's not a real path.
45349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45351      # a path prefixed by /cygdrive for fixpath to work.
45352      new_path="$CYGWIN_ROOT_PATH$input_path"
45353    fi
45354  fi
45355
45356  # remove trailing .exe if any
45357  new_path="${new_path/%.exe/}"
45358
45359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45360
45361  # First separate the path from the arguments. This will split at the first
45362  # space.
45363  complete="$BUILD_NM"
45364  path="${complete%% *}"
45365  tmp="$complete EOL"
45366  arguments="${tmp#* }"
45367
45368  # Input might be given as Windows format, start by converting to
45369  # unix format.
45370  new_path="$path"
45371
45372  windows_path="$new_path"
45373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45374    unix_path=`$CYGPATH -u "$windows_path"`
45375    new_path="$unix_path"
45376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45378    new_path="$unix_path"
45379  fi
45380
45381
45382  # Now try to locate executable using which
45383  new_path=`$WHICH "$new_path" 2> /dev/null`
45384
45385  if test "x$new_path" = x; then
45386    # Oops. Which didn't find the executable.
45387    # The splitting of arguments from the executable at a space might have been incorrect,
45388    # since paths with space are more likely in Windows. Give it another try with the whole
45389    # argument.
45390    path="$complete"
45391    arguments="EOL"
45392    new_path="$path"
45393
45394  windows_path="$new_path"
45395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45396    unix_path=`$CYGPATH -u "$windows_path"`
45397    new_path="$unix_path"
45398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45400    new_path="$unix_path"
45401  fi
45402
45403
45404    new_path=`$WHICH "$new_path" 2> /dev/null`
45405    # bat and cmd files are not always considered executable in MSYS causing which
45406    # to not find them
45407    if test "x$new_path" = x \
45408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45410      new_path="$path"
45411
45412  windows_path="$new_path"
45413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45414    unix_path=`$CYGPATH -u "$windows_path"`
45415    new_path="$unix_path"
45416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45418    new_path="$unix_path"
45419  fi
45420
45421    fi
45422
45423    if test "x$new_path" = x; then
45424      # It's still not found. Now this is an unrecoverable error.
45425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45426$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45427      has_space=`$ECHO "$complete" | $GREP " "`
45428      if test "x$has_space" != x; then
45429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45431      fi
45432      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45433    fi
45434  fi
45435
45436  # Now new_path has a complete unix path to the binary
45437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45438    # Keep paths in /bin as-is, but remove trailing .exe if any
45439    new_path="${new_path/%.exe/}"
45440    # Do not save /bin paths to all_fixpath_prefixes!
45441  else
45442    # Not in mixed or Windows style, start by that.
45443    new_path=`cmd //c echo $new_path`
45444
45445  input_path="$new_path"
45446  # Check if we need to convert this using DOS-style short mode. If the path
45447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45448  # take no chances and rewrite it.
45449  # Note: m4 eats our [], so we need to use [ and ] instead.
45450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45451  if test "x$has_forbidden_chars" != x; then
45452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45454  fi
45455
45456    # Output is in $new_path
45457
45458  windows_path="$new_path"
45459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45460    unix_path=`$CYGPATH -u "$windows_path"`
45461    new_path="$unix_path"
45462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45464    new_path="$unix_path"
45465  fi
45466
45467    # remove trailing .exe if any
45468    new_path="${new_path/%.exe/}"
45469
45470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45472  fi
45473
45474    else
45475      # We're on a unix platform. Hooray! :)
45476      # First separate the path from the arguments. This will split at the first
45477      # space.
45478      complete="$BUILD_NM"
45479      path="${complete%% *}"
45480      tmp="$complete EOL"
45481      arguments="${tmp#* }"
45482
45483      # Cannot rely on the command "which" here since it doesn't always work.
45484      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45485      if test -z "$is_absolute_path"; then
45486        # Path to executable is not absolute. Find it.
45487        IFS_save="$IFS"
45488        IFS=:
45489        for p in $PATH; do
45490          if test -f "$p/$path" && test -x "$p/$path"; then
45491            new_path="$p/$path"
45492            break
45493          fi
45494        done
45495        IFS="$IFS_save"
45496      else
45497        # This is an absolute path, we can use it without further modifications.
45498        new_path="$path"
45499      fi
45500
45501      if test "x$new_path" = x; then
45502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45503$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45504        has_space=`$ECHO "$complete" | $GREP " "`
45505        if test "x$has_space" != x; then
45506          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45508        fi
45509        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45510      fi
45511    fi
45512
45513    # Now join together the path and the arguments once again
45514    if test "x$arguments" != xEOL; then
45515      new_complete="$new_path ${arguments% *}"
45516    else
45517      new_complete="$new_path"
45518    fi
45519
45520    if test "x$complete" != "x$new_complete"; then
45521      BUILD_NM="$new_complete"
45522      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45523$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45524    fi
45525  fi
45526
45527
45528
45529  # Publish this variable in the help.
45530
45531
45532  if [ -z "${BUILD_AR+x}" ]; then
45533    # The variable is not set by user, try to locate tool using the code snippet
45534    for ac_prog in ar gcc-ar
45535do
45536  # Extract the first word of "$ac_prog", so it can be a program name with args.
45537set dummy $ac_prog; ac_word=$2
45538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45539$as_echo_n "checking for $ac_word... " >&6; }
45540if ${ac_cv_path_BUILD_AR+:} false; then :
45541  $as_echo_n "(cached) " >&6
45542else
45543  case $BUILD_AR in
45544  [\\/]* | ?:[\\/]*)
45545  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45546  ;;
45547  *)
45548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45549for as_dir in $PATH
45550do
45551  IFS=$as_save_IFS
45552  test -z "$as_dir" && as_dir=.
45553    for ac_exec_ext in '' $ac_executable_extensions; do
45554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45555    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45557    break 2
45558  fi
45559done
45560  done
45561IFS=$as_save_IFS
45562
45563  ;;
45564esac
45565fi
45566BUILD_AR=$ac_cv_path_BUILD_AR
45567if test -n "$BUILD_AR"; then
45568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45569$as_echo "$BUILD_AR" >&6; }
45570else
45571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45572$as_echo "no" >&6; }
45573fi
45574
45575
45576  test -n "$BUILD_AR" && break
45577done
45578
45579  else
45580    # The variable is set, but is it from the command line or the environment?
45581
45582    # Try to remove the string !BUILD_AR! from our list.
45583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45585      # If it failed, the variable was not from the command line. Ignore it,
45586      # but warn the user (except for BASH, which is always set by the calling BASH).
45587      if test "xBUILD_AR" != xBASH; then
45588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45589$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45590      fi
45591      # Try to locate tool using the code snippet
45592      for ac_prog in ar gcc-ar
45593do
45594  # Extract the first word of "$ac_prog", so it can be a program name with args.
45595set dummy $ac_prog; ac_word=$2
45596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45597$as_echo_n "checking for $ac_word... " >&6; }
45598if ${ac_cv_path_BUILD_AR+:} false; then :
45599  $as_echo_n "(cached) " >&6
45600else
45601  case $BUILD_AR in
45602  [\\/]* | ?:[\\/]*)
45603  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45604  ;;
45605  *)
45606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45607for as_dir in $PATH
45608do
45609  IFS=$as_save_IFS
45610  test -z "$as_dir" && as_dir=.
45611    for ac_exec_ext in '' $ac_executable_extensions; do
45612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45613    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45615    break 2
45616  fi
45617done
45618  done
45619IFS=$as_save_IFS
45620
45621  ;;
45622esac
45623fi
45624BUILD_AR=$ac_cv_path_BUILD_AR
45625if test -n "$BUILD_AR"; then
45626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45627$as_echo "$BUILD_AR" >&6; }
45628else
45629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45630$as_echo "no" >&6; }
45631fi
45632
45633
45634  test -n "$BUILD_AR" && break
45635done
45636
45637    else
45638      # If it succeeded, then it was overridden by the user. We will use it
45639      # for the tool.
45640
45641      # First remove it from the list of overridden variables, so we can test
45642      # for unknown variables in the end.
45643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45644
45645      # Check if we try to supply an empty value
45646      if test "x$BUILD_AR" = x; then
45647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45648$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45650$as_echo_n "checking for BUILD_AR... " >&6; }
45651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45652$as_echo "disabled" >&6; }
45653      else
45654        # Check if the provided tool contains a complete path.
45655        tool_specified="$BUILD_AR"
45656        tool_basename="${tool_specified##*/}"
45657        if test "x$tool_basename" = "x$tool_specified"; then
45658          # A command without a complete path is provided, search $PATH.
45659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45660$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45661          # Extract the first word of "$tool_basename", so it can be a program name with args.
45662set dummy $tool_basename; ac_word=$2
45663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45664$as_echo_n "checking for $ac_word... " >&6; }
45665if ${ac_cv_path_BUILD_AR+:} false; then :
45666  $as_echo_n "(cached) " >&6
45667else
45668  case $BUILD_AR in
45669  [\\/]* | ?:[\\/]*)
45670  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45671  ;;
45672  *)
45673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45674for as_dir in $PATH
45675do
45676  IFS=$as_save_IFS
45677  test -z "$as_dir" && as_dir=.
45678    for ac_exec_ext in '' $ac_executable_extensions; do
45679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45680    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45682    break 2
45683  fi
45684done
45685  done
45686IFS=$as_save_IFS
45687
45688  ;;
45689esac
45690fi
45691BUILD_AR=$ac_cv_path_BUILD_AR
45692if test -n "$BUILD_AR"; then
45693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45694$as_echo "$BUILD_AR" >&6; }
45695else
45696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45697$as_echo "no" >&6; }
45698fi
45699
45700
45701          if test "x$BUILD_AR" = x; then
45702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45703          fi
45704        else
45705          # Otherwise we believe it is a complete path. Use it as it is.
45706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45707$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45709$as_echo_n "checking for BUILD_AR... " >&6; }
45710          if test ! -x "$tool_specified"; then
45711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45712$as_echo "not found" >&6; }
45713            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45714          fi
45715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45716$as_echo "$tool_specified" >&6; }
45717        fi
45718      fi
45719    fi
45720
45721  fi
45722
45723
45724
45725  # Only process if variable expands to non-empty
45726
45727  if test "x$BUILD_AR" != x; then
45728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45729
45730  # First separate the path from the arguments. This will split at the first
45731  # space.
45732  complete="$BUILD_AR"
45733  path="${complete%% *}"
45734  tmp="$complete EOL"
45735  arguments="${tmp#* }"
45736
45737  # Input might be given as Windows format, start by converting to
45738  # unix format.
45739  new_path=`$CYGPATH -u "$path"`
45740
45741  # Now try to locate executable using which
45742  new_path=`$WHICH "$new_path" 2> /dev/null`
45743  # bat and cmd files are not always considered executable in cygwin causing which
45744  # to not find them
45745  if test "x$new_path" = x \
45746      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45747      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45748    new_path=`$CYGPATH -u "$path"`
45749  fi
45750  if test "x$new_path" = x; then
45751    # Oops. Which didn't find the executable.
45752    # The splitting of arguments from the executable at a space might have been incorrect,
45753    # since paths with space are more likely in Windows. Give it another try with the whole
45754    # argument.
45755    path="$complete"
45756    arguments="EOL"
45757    new_path=`$CYGPATH -u "$path"`
45758    new_path=`$WHICH "$new_path" 2> /dev/null`
45759    # bat and cmd files are not always considered executable in cygwin causing which
45760    # to not find them
45761    if test "x$new_path" = x \
45762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45764      new_path=`$CYGPATH -u "$path"`
45765    fi
45766    if test "x$new_path" = x; then
45767      # It's still not found. Now this is an unrecoverable error.
45768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45769$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45770      has_space=`$ECHO "$complete" | $GREP " "`
45771      if test "x$has_space" != x; then
45772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45774      fi
45775      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45776    fi
45777  fi
45778
45779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45782  # "foo.exe" is OK but "foo" is an error.
45783  #
45784  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45785  # It is also a way to make sure we got the proper file name for the real test later on.
45786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45787  if test "x$test_shortpath" = x; then
45788    # Short path failed, file does not exist as specified.
45789    # Try adding .exe or .cmd
45790    if test -f "${new_path}.exe"; then
45791      input_to_shortpath="${new_path}.exe"
45792    elif test -f "${new_path}.cmd"; then
45793      input_to_shortpath="${new_path}.cmd"
45794    else
45795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45796$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45799      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45800    fi
45801  else
45802    input_to_shortpath="$new_path"
45803  fi
45804
45805  # Call helper function which possibly converts this using DOS-style short mode.
45806  # If so, the updated path is stored in $new_path.
45807  new_path="$input_to_shortpath"
45808
45809  input_path="$input_to_shortpath"
45810  # Check if we need to convert this using DOS-style short mode. If the path
45811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45812  # take no chances and rewrite it.
45813  # Note: m4 eats our [], so we need to use [ and ] instead.
45814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45815  if test "x$has_forbidden_chars" != x; then
45816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45820      # Going to short mode and back again did indeed matter. Since short mode is
45821      # case insensitive, let's make it lowercase to improve readability.
45822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45823      # Now convert it back to Unix-style (cygpath)
45824      input_path=`$CYGPATH -u "$shortmode_path"`
45825      new_path="$input_path"
45826    fi
45827  fi
45828
45829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45830  if test "x$test_cygdrive_prefix" = x; then
45831    # As a simple fix, exclude /usr/bin since it's not a real path.
45832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45834      # a path prefixed by /cygdrive for fixpath to work.
45835      new_path="$CYGWIN_ROOT_PATH$input_path"
45836    fi
45837  fi
45838
45839  # remove trailing .exe if any
45840  new_path="${new_path/%.exe/}"
45841
45842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45843
45844  # First separate the path from the arguments. This will split at the first
45845  # space.
45846  complete="$BUILD_AR"
45847  path="${complete%% *}"
45848  tmp="$complete EOL"
45849  arguments="${tmp#* }"
45850
45851  # Input might be given as Windows format, start by converting to
45852  # unix format.
45853  new_path="$path"
45854
45855  windows_path="$new_path"
45856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45857    unix_path=`$CYGPATH -u "$windows_path"`
45858    new_path="$unix_path"
45859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45861    new_path="$unix_path"
45862  fi
45863
45864
45865  # Now try to locate executable using which
45866  new_path=`$WHICH "$new_path" 2> /dev/null`
45867
45868  if test "x$new_path" = x; then
45869    # Oops. Which didn't find the executable.
45870    # The splitting of arguments from the executable at a space might have been incorrect,
45871    # since paths with space are more likely in Windows. Give it another try with the whole
45872    # argument.
45873    path="$complete"
45874    arguments="EOL"
45875    new_path="$path"
45876
45877  windows_path="$new_path"
45878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45879    unix_path=`$CYGPATH -u "$windows_path"`
45880    new_path="$unix_path"
45881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45883    new_path="$unix_path"
45884  fi
45885
45886
45887    new_path=`$WHICH "$new_path" 2> /dev/null`
45888    # bat and cmd files are not always considered executable in MSYS causing which
45889    # to not find them
45890    if test "x$new_path" = x \
45891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45893      new_path="$path"
45894
45895  windows_path="$new_path"
45896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45897    unix_path=`$CYGPATH -u "$windows_path"`
45898    new_path="$unix_path"
45899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45901    new_path="$unix_path"
45902  fi
45903
45904    fi
45905
45906    if test "x$new_path" = x; then
45907      # It's still not found. Now this is an unrecoverable error.
45908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45909$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45910      has_space=`$ECHO "$complete" | $GREP " "`
45911      if test "x$has_space" != x; then
45912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45914      fi
45915      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45916    fi
45917  fi
45918
45919  # Now new_path has a complete unix path to the binary
45920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45921    # Keep paths in /bin as-is, but remove trailing .exe if any
45922    new_path="${new_path/%.exe/}"
45923    # Do not save /bin paths to all_fixpath_prefixes!
45924  else
45925    # Not in mixed or Windows style, start by that.
45926    new_path=`cmd //c echo $new_path`
45927
45928  input_path="$new_path"
45929  # Check if we need to convert this using DOS-style short mode. If the path
45930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45931  # take no chances and rewrite it.
45932  # Note: m4 eats our [], so we need to use [ and ] instead.
45933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45934  if test "x$has_forbidden_chars" != x; then
45935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45937  fi
45938
45939    # Output is in $new_path
45940
45941  windows_path="$new_path"
45942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45943    unix_path=`$CYGPATH -u "$windows_path"`
45944    new_path="$unix_path"
45945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45947    new_path="$unix_path"
45948  fi
45949
45950    # remove trailing .exe if any
45951    new_path="${new_path/%.exe/}"
45952
45953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45955  fi
45956
45957    else
45958      # We're on a unix platform. Hooray! :)
45959      # First separate the path from the arguments. This will split at the first
45960      # space.
45961      complete="$BUILD_AR"
45962      path="${complete%% *}"
45963      tmp="$complete EOL"
45964      arguments="${tmp#* }"
45965
45966      # Cannot rely on the command "which" here since it doesn't always work.
45967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45968      if test -z "$is_absolute_path"; then
45969        # Path to executable is not absolute. Find it.
45970        IFS_save="$IFS"
45971        IFS=:
45972        for p in $PATH; do
45973          if test -f "$p/$path" && test -x "$p/$path"; then
45974            new_path="$p/$path"
45975            break
45976          fi
45977        done
45978        IFS="$IFS_save"
45979      else
45980        # This is an absolute path, we can use it without further modifications.
45981        new_path="$path"
45982      fi
45983
45984      if test "x$new_path" = x; then
45985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45986$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45987        has_space=`$ECHO "$complete" | $GREP " "`
45988        if test "x$has_space" != x; then
45989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45991        fi
45992        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45993      fi
45994    fi
45995
45996    # Now join together the path and the arguments once again
45997    if test "x$arguments" != xEOL; then
45998      new_complete="$new_path ${arguments% *}"
45999    else
46000      new_complete="$new_path"
46001    fi
46002
46003    if test "x$complete" != "x$new_complete"; then
46004      BUILD_AR="$new_complete"
46005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46006$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46007    fi
46008  fi
46009
46010
46011
46012  # Publish this variable in the help.
46013
46014
46015  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46016    # The variable is not set by user, try to locate tool using the code snippet
46017    for ac_prog in objcopy
46018do
46019  # Extract the first word of "$ac_prog", so it can be a program name with args.
46020set dummy $ac_prog; ac_word=$2
46021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46022$as_echo_n "checking for $ac_word... " >&6; }
46023if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46024  $as_echo_n "(cached) " >&6
46025else
46026  case $BUILD_OBJCOPY in
46027  [\\/]* | ?:[\\/]*)
46028  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46029  ;;
46030  *)
46031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46032for as_dir in $PATH
46033do
46034  IFS=$as_save_IFS
46035  test -z "$as_dir" && as_dir=.
46036    for ac_exec_ext in '' $ac_executable_extensions; do
46037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46038    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46040    break 2
46041  fi
46042done
46043  done
46044IFS=$as_save_IFS
46045
46046  ;;
46047esac
46048fi
46049BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46050if test -n "$BUILD_OBJCOPY"; then
46051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46052$as_echo "$BUILD_OBJCOPY" >&6; }
46053else
46054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46055$as_echo "no" >&6; }
46056fi
46057
46058
46059  test -n "$BUILD_OBJCOPY" && break
46060done
46061
46062  else
46063    # The variable is set, but is it from the command line or the environment?
46064
46065    # Try to remove the string !BUILD_OBJCOPY! from our list.
46066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46068      # If it failed, the variable was not from the command line. Ignore it,
46069      # but warn the user (except for BASH, which is always set by the calling BASH).
46070      if test "xBUILD_OBJCOPY" != xBASH; then
46071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46072$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46073      fi
46074      # Try to locate tool using the code snippet
46075      for ac_prog in objcopy
46076do
46077  # Extract the first word of "$ac_prog", so it can be a program name with args.
46078set dummy $ac_prog; ac_word=$2
46079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46080$as_echo_n "checking for $ac_word... " >&6; }
46081if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46082  $as_echo_n "(cached) " >&6
46083else
46084  case $BUILD_OBJCOPY in
46085  [\\/]* | ?:[\\/]*)
46086  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46087  ;;
46088  *)
46089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46090for as_dir in $PATH
46091do
46092  IFS=$as_save_IFS
46093  test -z "$as_dir" && as_dir=.
46094    for ac_exec_ext in '' $ac_executable_extensions; do
46095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46096    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46098    break 2
46099  fi
46100done
46101  done
46102IFS=$as_save_IFS
46103
46104  ;;
46105esac
46106fi
46107BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46108if test -n "$BUILD_OBJCOPY"; then
46109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46110$as_echo "$BUILD_OBJCOPY" >&6; }
46111else
46112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46113$as_echo "no" >&6; }
46114fi
46115
46116
46117  test -n "$BUILD_OBJCOPY" && break
46118done
46119
46120    else
46121      # If it succeeded, then it was overridden by the user. We will use it
46122      # for the tool.
46123
46124      # First remove it from the list of overridden variables, so we can test
46125      # for unknown variables in the end.
46126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46127
46128      # Check if we try to supply an empty value
46129      if test "x$BUILD_OBJCOPY" = x; then
46130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46131$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46133$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46135$as_echo "disabled" >&6; }
46136      else
46137        # Check if the provided tool contains a complete path.
46138        tool_specified="$BUILD_OBJCOPY"
46139        tool_basename="${tool_specified##*/}"
46140        if test "x$tool_basename" = "x$tool_specified"; then
46141          # A command without a complete path is provided, search $PATH.
46142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46143$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46144          # Extract the first word of "$tool_basename", so it can be a program name with args.
46145set dummy $tool_basename; ac_word=$2
46146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46147$as_echo_n "checking for $ac_word... " >&6; }
46148if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46149  $as_echo_n "(cached) " >&6
46150else
46151  case $BUILD_OBJCOPY in
46152  [\\/]* | ?:[\\/]*)
46153  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46154  ;;
46155  *)
46156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46157for as_dir in $PATH
46158do
46159  IFS=$as_save_IFS
46160  test -z "$as_dir" && as_dir=.
46161    for ac_exec_ext in '' $ac_executable_extensions; do
46162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46163    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46165    break 2
46166  fi
46167done
46168  done
46169IFS=$as_save_IFS
46170
46171  ;;
46172esac
46173fi
46174BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46175if test -n "$BUILD_OBJCOPY"; then
46176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46177$as_echo "$BUILD_OBJCOPY" >&6; }
46178else
46179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46180$as_echo "no" >&6; }
46181fi
46182
46183
46184          if test "x$BUILD_OBJCOPY" = x; then
46185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46186          fi
46187        else
46188          # Otherwise we believe it is a complete path. Use it as it is.
46189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46190$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46192$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46193          if test ! -x "$tool_specified"; then
46194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46195$as_echo "not found" >&6; }
46196            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46197          fi
46198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46199$as_echo "$tool_specified" >&6; }
46200        fi
46201      fi
46202    fi
46203
46204  fi
46205
46206
46207
46208  # Only process if variable expands to non-empty
46209
46210  if test "x$BUILD_OBJCOPY" != x; then
46211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46212
46213  # First separate the path from the arguments. This will split at the first
46214  # space.
46215  complete="$BUILD_OBJCOPY"
46216  path="${complete%% *}"
46217  tmp="$complete EOL"
46218  arguments="${tmp#* }"
46219
46220  # Input might be given as Windows format, start by converting to
46221  # unix format.
46222  new_path=`$CYGPATH -u "$path"`
46223
46224  # Now try to locate executable using which
46225  new_path=`$WHICH "$new_path" 2> /dev/null`
46226  # bat and cmd files are not always considered executable in cygwin causing which
46227  # to not find them
46228  if test "x$new_path" = x \
46229      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46230      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46231    new_path=`$CYGPATH -u "$path"`
46232  fi
46233  if test "x$new_path" = x; then
46234    # Oops. Which didn't find the executable.
46235    # The splitting of arguments from the executable at a space might have been incorrect,
46236    # since paths with space are more likely in Windows. Give it another try with the whole
46237    # argument.
46238    path="$complete"
46239    arguments="EOL"
46240    new_path=`$CYGPATH -u "$path"`
46241    new_path=`$WHICH "$new_path" 2> /dev/null`
46242    # bat and cmd files are not always considered executable in cygwin causing which
46243    # to not find them
46244    if test "x$new_path" = x \
46245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46247      new_path=`$CYGPATH -u "$path"`
46248    fi
46249    if test "x$new_path" = x; then
46250      # It's still not found. Now this is an unrecoverable error.
46251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46252$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46253      has_space=`$ECHO "$complete" | $GREP " "`
46254      if test "x$has_space" != x; then
46255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46257      fi
46258      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46259    fi
46260  fi
46261
46262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46265  # "foo.exe" is OK but "foo" is an error.
46266  #
46267  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46268  # It is also a way to make sure we got the proper file name for the real test later on.
46269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46270  if test "x$test_shortpath" = x; then
46271    # Short path failed, file does not exist as specified.
46272    # Try adding .exe or .cmd
46273    if test -f "${new_path}.exe"; then
46274      input_to_shortpath="${new_path}.exe"
46275    elif test -f "${new_path}.cmd"; then
46276      input_to_shortpath="${new_path}.cmd"
46277    else
46278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46279$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46282      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46283    fi
46284  else
46285    input_to_shortpath="$new_path"
46286  fi
46287
46288  # Call helper function which possibly converts this using DOS-style short mode.
46289  # If so, the updated path is stored in $new_path.
46290  new_path="$input_to_shortpath"
46291
46292  input_path="$input_to_shortpath"
46293  # Check if we need to convert this using DOS-style short mode. If the path
46294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46295  # take no chances and rewrite it.
46296  # Note: m4 eats our [], so we need to use [ and ] instead.
46297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46298  if test "x$has_forbidden_chars" != x; then
46299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46303      # Going to short mode and back again did indeed matter. Since short mode is
46304      # case insensitive, let's make it lowercase to improve readability.
46305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46306      # Now convert it back to Unix-style (cygpath)
46307      input_path=`$CYGPATH -u "$shortmode_path"`
46308      new_path="$input_path"
46309    fi
46310  fi
46311
46312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46313  if test "x$test_cygdrive_prefix" = x; then
46314    # As a simple fix, exclude /usr/bin since it's not a real path.
46315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46317      # a path prefixed by /cygdrive for fixpath to work.
46318      new_path="$CYGWIN_ROOT_PATH$input_path"
46319    fi
46320  fi
46321
46322  # remove trailing .exe if any
46323  new_path="${new_path/%.exe/}"
46324
46325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46326
46327  # First separate the path from the arguments. This will split at the first
46328  # space.
46329  complete="$BUILD_OBJCOPY"
46330  path="${complete%% *}"
46331  tmp="$complete EOL"
46332  arguments="${tmp#* }"
46333
46334  # Input might be given as Windows format, start by converting to
46335  # unix format.
46336  new_path="$path"
46337
46338  windows_path="$new_path"
46339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46340    unix_path=`$CYGPATH -u "$windows_path"`
46341    new_path="$unix_path"
46342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46344    new_path="$unix_path"
46345  fi
46346
46347
46348  # Now try to locate executable using which
46349  new_path=`$WHICH "$new_path" 2> /dev/null`
46350
46351  if test "x$new_path" = x; then
46352    # Oops. Which didn't find the executable.
46353    # The splitting of arguments from the executable at a space might have been incorrect,
46354    # since paths with space are more likely in Windows. Give it another try with the whole
46355    # argument.
46356    path="$complete"
46357    arguments="EOL"
46358    new_path="$path"
46359
46360  windows_path="$new_path"
46361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46362    unix_path=`$CYGPATH -u "$windows_path"`
46363    new_path="$unix_path"
46364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46366    new_path="$unix_path"
46367  fi
46368
46369
46370    new_path=`$WHICH "$new_path" 2> /dev/null`
46371    # bat and cmd files are not always considered executable in MSYS causing which
46372    # to not find them
46373    if test "x$new_path" = x \
46374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46376      new_path="$path"
46377
46378  windows_path="$new_path"
46379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46380    unix_path=`$CYGPATH -u "$windows_path"`
46381    new_path="$unix_path"
46382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46384    new_path="$unix_path"
46385  fi
46386
46387    fi
46388
46389    if test "x$new_path" = x; then
46390      # It's still not found. Now this is an unrecoverable error.
46391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46392$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46393      has_space=`$ECHO "$complete" | $GREP " "`
46394      if test "x$has_space" != x; then
46395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46397      fi
46398      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46399    fi
46400  fi
46401
46402  # Now new_path has a complete unix path to the binary
46403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46404    # Keep paths in /bin as-is, but remove trailing .exe if any
46405    new_path="${new_path/%.exe/}"
46406    # Do not save /bin paths to all_fixpath_prefixes!
46407  else
46408    # Not in mixed or Windows style, start by that.
46409    new_path=`cmd //c echo $new_path`
46410
46411  input_path="$new_path"
46412  # Check if we need to convert this using DOS-style short mode. If the path
46413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46414  # take no chances and rewrite it.
46415  # Note: m4 eats our [], so we need to use [ and ] instead.
46416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46417  if test "x$has_forbidden_chars" != x; then
46418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46420  fi
46421
46422    # Output is in $new_path
46423
46424  windows_path="$new_path"
46425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46426    unix_path=`$CYGPATH -u "$windows_path"`
46427    new_path="$unix_path"
46428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46430    new_path="$unix_path"
46431  fi
46432
46433    # remove trailing .exe if any
46434    new_path="${new_path/%.exe/}"
46435
46436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46438  fi
46439
46440    else
46441      # We're on a unix platform. Hooray! :)
46442      # First separate the path from the arguments. This will split at the first
46443      # space.
46444      complete="$BUILD_OBJCOPY"
46445      path="${complete%% *}"
46446      tmp="$complete EOL"
46447      arguments="${tmp#* }"
46448
46449      # Cannot rely on the command "which" here since it doesn't always work.
46450      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46451      if test -z "$is_absolute_path"; then
46452        # Path to executable is not absolute. Find it.
46453        IFS_save="$IFS"
46454        IFS=:
46455        for p in $PATH; do
46456          if test -f "$p/$path" && test -x "$p/$path"; then
46457            new_path="$p/$path"
46458            break
46459          fi
46460        done
46461        IFS="$IFS_save"
46462      else
46463        # This is an absolute path, we can use it without further modifications.
46464        new_path="$path"
46465      fi
46466
46467      if test "x$new_path" = x; then
46468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46469$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46470        has_space=`$ECHO "$complete" | $GREP " "`
46471        if test "x$has_space" != x; then
46472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46474        fi
46475        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46476      fi
46477    fi
46478
46479    # Now join together the path and the arguments once again
46480    if test "x$arguments" != xEOL; then
46481      new_complete="$new_path ${arguments% *}"
46482    else
46483      new_complete="$new_path"
46484    fi
46485
46486    if test "x$complete" != "x$new_complete"; then
46487      BUILD_OBJCOPY="$new_complete"
46488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46489$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46490    fi
46491  fi
46492
46493
46494
46495  # Publish this variable in the help.
46496
46497
46498  if [ -z "${BUILD_STRIP+x}" ]; then
46499    # The variable is not set by user, try to locate tool using the code snippet
46500    for ac_prog in strip
46501do
46502  # Extract the first word of "$ac_prog", so it can be a program name with args.
46503set dummy $ac_prog; ac_word=$2
46504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46505$as_echo_n "checking for $ac_word... " >&6; }
46506if ${ac_cv_path_BUILD_STRIP+:} false; then :
46507  $as_echo_n "(cached) " >&6
46508else
46509  case $BUILD_STRIP in
46510  [\\/]* | ?:[\\/]*)
46511  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46512  ;;
46513  *)
46514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46515for as_dir in $PATH
46516do
46517  IFS=$as_save_IFS
46518  test -z "$as_dir" && as_dir=.
46519    for ac_exec_ext in '' $ac_executable_extensions; do
46520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46521    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46523    break 2
46524  fi
46525done
46526  done
46527IFS=$as_save_IFS
46528
46529  ;;
46530esac
46531fi
46532BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46533if test -n "$BUILD_STRIP"; then
46534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46535$as_echo "$BUILD_STRIP" >&6; }
46536else
46537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46538$as_echo "no" >&6; }
46539fi
46540
46541
46542  test -n "$BUILD_STRIP" && break
46543done
46544
46545  else
46546    # The variable is set, but is it from the command line or the environment?
46547
46548    # Try to remove the string !BUILD_STRIP! from our list.
46549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46551      # If it failed, the variable was not from the command line. Ignore it,
46552      # but warn the user (except for BASH, which is always set by the calling BASH).
46553      if test "xBUILD_STRIP" != xBASH; then
46554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46555$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46556      fi
46557      # Try to locate tool using the code snippet
46558      for ac_prog in strip
46559do
46560  # Extract the first word of "$ac_prog", so it can be a program name with args.
46561set dummy $ac_prog; ac_word=$2
46562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46563$as_echo_n "checking for $ac_word... " >&6; }
46564if ${ac_cv_path_BUILD_STRIP+:} false; then :
46565  $as_echo_n "(cached) " >&6
46566else
46567  case $BUILD_STRIP in
46568  [\\/]* | ?:[\\/]*)
46569  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46570  ;;
46571  *)
46572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46573for as_dir in $PATH
46574do
46575  IFS=$as_save_IFS
46576  test -z "$as_dir" && as_dir=.
46577    for ac_exec_ext in '' $ac_executable_extensions; do
46578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46579    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46581    break 2
46582  fi
46583done
46584  done
46585IFS=$as_save_IFS
46586
46587  ;;
46588esac
46589fi
46590BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46591if test -n "$BUILD_STRIP"; then
46592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46593$as_echo "$BUILD_STRIP" >&6; }
46594else
46595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46596$as_echo "no" >&6; }
46597fi
46598
46599
46600  test -n "$BUILD_STRIP" && break
46601done
46602
46603    else
46604      # If it succeeded, then it was overridden by the user. We will use it
46605      # for the tool.
46606
46607      # First remove it from the list of overridden variables, so we can test
46608      # for unknown variables in the end.
46609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46610
46611      # Check if we try to supply an empty value
46612      if test "x$BUILD_STRIP" = x; then
46613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46614$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46616$as_echo_n "checking for BUILD_STRIP... " >&6; }
46617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46618$as_echo "disabled" >&6; }
46619      else
46620        # Check if the provided tool contains a complete path.
46621        tool_specified="$BUILD_STRIP"
46622        tool_basename="${tool_specified##*/}"
46623        if test "x$tool_basename" = "x$tool_specified"; then
46624          # A command without a complete path is provided, search $PATH.
46625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46626$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46627          # Extract the first word of "$tool_basename", so it can be a program name with args.
46628set dummy $tool_basename; ac_word=$2
46629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46630$as_echo_n "checking for $ac_word... " >&6; }
46631if ${ac_cv_path_BUILD_STRIP+:} false; then :
46632  $as_echo_n "(cached) " >&6
46633else
46634  case $BUILD_STRIP in
46635  [\\/]* | ?:[\\/]*)
46636  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46637  ;;
46638  *)
46639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46640for as_dir in $PATH
46641do
46642  IFS=$as_save_IFS
46643  test -z "$as_dir" && as_dir=.
46644    for ac_exec_ext in '' $ac_executable_extensions; do
46645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46646    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46648    break 2
46649  fi
46650done
46651  done
46652IFS=$as_save_IFS
46653
46654  ;;
46655esac
46656fi
46657BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46658if test -n "$BUILD_STRIP"; then
46659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46660$as_echo "$BUILD_STRIP" >&6; }
46661else
46662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46663$as_echo "no" >&6; }
46664fi
46665
46666
46667          if test "x$BUILD_STRIP" = x; then
46668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46669          fi
46670        else
46671          # Otherwise we believe it is a complete path. Use it as it is.
46672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46673$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46675$as_echo_n "checking for BUILD_STRIP... " >&6; }
46676          if test ! -x "$tool_specified"; then
46677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46678$as_echo "not found" >&6; }
46679            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46680          fi
46681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46682$as_echo "$tool_specified" >&6; }
46683        fi
46684      fi
46685    fi
46686
46687  fi
46688
46689
46690
46691  # Only process if variable expands to non-empty
46692
46693  if test "x$BUILD_STRIP" != x; then
46694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46695
46696  # First separate the path from the arguments. This will split at the first
46697  # space.
46698  complete="$BUILD_STRIP"
46699  path="${complete%% *}"
46700  tmp="$complete EOL"
46701  arguments="${tmp#* }"
46702
46703  # Input might be given as Windows format, start by converting to
46704  # unix format.
46705  new_path=`$CYGPATH -u "$path"`
46706
46707  # Now try to locate executable using which
46708  new_path=`$WHICH "$new_path" 2> /dev/null`
46709  # bat and cmd files are not always considered executable in cygwin causing which
46710  # to not find them
46711  if test "x$new_path" = x \
46712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46714    new_path=`$CYGPATH -u "$path"`
46715  fi
46716  if test "x$new_path" = x; then
46717    # Oops. Which didn't find the executable.
46718    # The splitting of arguments from the executable at a space might have been incorrect,
46719    # since paths with space are more likely in Windows. Give it another try with the whole
46720    # argument.
46721    path="$complete"
46722    arguments="EOL"
46723    new_path=`$CYGPATH -u "$path"`
46724    new_path=`$WHICH "$new_path" 2> /dev/null`
46725    # bat and cmd files are not always considered executable in cygwin causing which
46726    # to not find them
46727    if test "x$new_path" = x \
46728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46730      new_path=`$CYGPATH -u "$path"`
46731    fi
46732    if test "x$new_path" = x; then
46733      # It's still not found. Now this is an unrecoverable error.
46734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46735$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46736      has_space=`$ECHO "$complete" | $GREP " "`
46737      if test "x$has_space" != x; then
46738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46740      fi
46741      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46742    fi
46743  fi
46744
46745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46748  # "foo.exe" is OK but "foo" is an error.
46749  #
46750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46751  # It is also a way to make sure we got the proper file name for the real test later on.
46752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46753  if test "x$test_shortpath" = x; then
46754    # Short path failed, file does not exist as specified.
46755    # Try adding .exe or .cmd
46756    if test -f "${new_path}.exe"; then
46757      input_to_shortpath="${new_path}.exe"
46758    elif test -f "${new_path}.cmd"; then
46759      input_to_shortpath="${new_path}.cmd"
46760    else
46761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46762$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46765      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46766    fi
46767  else
46768    input_to_shortpath="$new_path"
46769  fi
46770
46771  # Call helper function which possibly converts this using DOS-style short mode.
46772  # If so, the updated path is stored in $new_path.
46773  new_path="$input_to_shortpath"
46774
46775  input_path="$input_to_shortpath"
46776  # Check if we need to convert this using DOS-style short mode. If the path
46777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46778  # take no chances and rewrite it.
46779  # Note: m4 eats our [], so we need to use [ and ] instead.
46780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46781  if test "x$has_forbidden_chars" != x; then
46782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46786      # Going to short mode and back again did indeed matter. Since short mode is
46787      # case insensitive, let's make it lowercase to improve readability.
46788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46789      # Now convert it back to Unix-style (cygpath)
46790      input_path=`$CYGPATH -u "$shortmode_path"`
46791      new_path="$input_path"
46792    fi
46793  fi
46794
46795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46796  if test "x$test_cygdrive_prefix" = x; then
46797    # As a simple fix, exclude /usr/bin since it's not a real path.
46798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46800      # a path prefixed by /cygdrive for fixpath to work.
46801      new_path="$CYGWIN_ROOT_PATH$input_path"
46802    fi
46803  fi
46804
46805  # remove trailing .exe if any
46806  new_path="${new_path/%.exe/}"
46807
46808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46809
46810  # First separate the path from the arguments. This will split at the first
46811  # space.
46812  complete="$BUILD_STRIP"
46813  path="${complete%% *}"
46814  tmp="$complete EOL"
46815  arguments="${tmp#* }"
46816
46817  # Input might be given as Windows format, start by converting to
46818  # unix format.
46819  new_path="$path"
46820
46821  windows_path="$new_path"
46822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46823    unix_path=`$CYGPATH -u "$windows_path"`
46824    new_path="$unix_path"
46825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46827    new_path="$unix_path"
46828  fi
46829
46830
46831  # Now try to locate executable using which
46832  new_path=`$WHICH "$new_path" 2> /dev/null`
46833
46834  if test "x$new_path" = x; then
46835    # Oops. Which didn't find the executable.
46836    # The splitting of arguments from the executable at a space might have been incorrect,
46837    # since paths with space are more likely in Windows. Give it another try with the whole
46838    # argument.
46839    path="$complete"
46840    arguments="EOL"
46841    new_path="$path"
46842
46843  windows_path="$new_path"
46844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46845    unix_path=`$CYGPATH -u "$windows_path"`
46846    new_path="$unix_path"
46847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46849    new_path="$unix_path"
46850  fi
46851
46852
46853    new_path=`$WHICH "$new_path" 2> /dev/null`
46854    # bat and cmd files are not always considered executable in MSYS causing which
46855    # to not find them
46856    if test "x$new_path" = x \
46857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46859      new_path="$path"
46860
46861  windows_path="$new_path"
46862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46863    unix_path=`$CYGPATH -u "$windows_path"`
46864    new_path="$unix_path"
46865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46867    new_path="$unix_path"
46868  fi
46869
46870    fi
46871
46872    if test "x$new_path" = x; then
46873      # It's still not found. Now this is an unrecoverable error.
46874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46875$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46876      has_space=`$ECHO "$complete" | $GREP " "`
46877      if test "x$has_space" != x; then
46878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46880      fi
46881      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46882    fi
46883  fi
46884
46885  # Now new_path has a complete unix path to the binary
46886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46887    # Keep paths in /bin as-is, but remove trailing .exe if any
46888    new_path="${new_path/%.exe/}"
46889    # Do not save /bin paths to all_fixpath_prefixes!
46890  else
46891    # Not in mixed or Windows style, start by that.
46892    new_path=`cmd //c echo $new_path`
46893
46894  input_path="$new_path"
46895  # Check if we need to convert this using DOS-style short mode. If the path
46896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46897  # take no chances and rewrite it.
46898  # Note: m4 eats our [], so we need to use [ and ] instead.
46899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46900  if test "x$has_forbidden_chars" != x; then
46901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46903  fi
46904
46905    # Output is in $new_path
46906
46907  windows_path="$new_path"
46908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46909    unix_path=`$CYGPATH -u "$windows_path"`
46910    new_path="$unix_path"
46911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46913    new_path="$unix_path"
46914  fi
46915
46916    # remove trailing .exe if any
46917    new_path="${new_path/%.exe/}"
46918
46919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46921  fi
46922
46923    else
46924      # We're on a unix platform. Hooray! :)
46925      # First separate the path from the arguments. This will split at the first
46926      # space.
46927      complete="$BUILD_STRIP"
46928      path="${complete%% *}"
46929      tmp="$complete EOL"
46930      arguments="${tmp#* }"
46931
46932      # Cannot rely on the command "which" here since it doesn't always work.
46933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46934      if test -z "$is_absolute_path"; then
46935        # Path to executable is not absolute. Find it.
46936        IFS_save="$IFS"
46937        IFS=:
46938        for p in $PATH; do
46939          if test -f "$p/$path" && test -x "$p/$path"; then
46940            new_path="$p/$path"
46941            break
46942          fi
46943        done
46944        IFS="$IFS_save"
46945      else
46946        # This is an absolute path, we can use it without further modifications.
46947        new_path="$path"
46948      fi
46949
46950      if test "x$new_path" = x; then
46951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46952$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46953        has_space=`$ECHO "$complete" | $GREP " "`
46954        if test "x$has_space" != x; then
46955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46957        fi
46958        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46959      fi
46960    fi
46961
46962    # Now join together the path and the arguments once again
46963    if test "x$arguments" != xEOL; then
46964      new_complete="$new_path ${arguments% *}"
46965    else
46966      new_complete="$new_path"
46967    fi
46968
46969    if test "x$complete" != "x$new_complete"; then
46970      BUILD_STRIP="$new_complete"
46971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46972$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46973    fi
46974  fi
46975
46976    # Assume the C compiler is the assembler
46977    BUILD_AS="$BUILD_CC -c"
46978    # Just like for the target compiler, use the compiler as linker
46979    BUILD_LD="$BUILD_CC"
46980    BUILD_LDCXX="$BUILD_CXX"
46981
46982    PATH="$OLDPATH"
46983
46984
46985  COMPILER=$BUILD_CC
46986  COMPILER_NAME=BuildC
46987
46988  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46989    # cc -V output typically looks like
46990    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46991    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46992    # Check that this is likely to be the Solaris Studio cc.
46993    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46994    if test $? -ne 0; then
46995      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46996      { $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
46997$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46998      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46999$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47000      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47001$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47002      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47003    fi
47004    # Remove usage instructions (if present), and
47005    # collapse compiler output into a single line
47006    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47007        $SED -e 's/ *[Uu]sage:.*//'`
47008    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47009        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47010  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47011    # xlc -qversion output typically looks like
47012    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47013    #     Version: 11.01.0000.0015
47014    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47015    # Check that this is likely to be the IBM XL C compiler.
47016    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47017    if test $? -ne 0; then
47018      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47019      { $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
47020$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47022$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47023      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47024$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47025      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47026    fi
47027    # Collapse compiler output into a single line
47028    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47029    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47030        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47031  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47032    # There is no specific version flag, but all output starts with a version string.
47033    # First line typically looks something like:
47034    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47035    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47036    # Check that this is likely to be Microsoft CL.EXE.
47037    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47038    if test $? -ne 0; then
47039      { $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
47040$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47041      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47042$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47043      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47044    fi
47045    # Collapse compiler output into a single line
47046    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47047    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47048        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47049  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47050    # gcc --version output typically looks like
47051    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47052    #     Copyright (C) 2013 Free Software Foundation, Inc.
47053    #     This is free software; see the source for copying conditions.  There is NO
47054    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47055    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47056    # Check that this is likely to be GCC.
47057    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47058    if test $? -ne 0; then
47059      { $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
47060$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47061      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47062$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47063      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47064    fi
47065    # Remove Copyright and legalese from version string, and
47066    # collapse into a single line
47067    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47068        $SED -e 's/ *Copyright .*//'`
47069    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47070        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47071  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47072    # clang --version output typically looks like
47073    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47074    #    clang version 3.3 (tags/RELEASE_33/final)
47075    # or
47076    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47077    #    Target: x86_64-pc-linux-gnu
47078    #    Thread model: posix
47079    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47080    # Check that this is likely to be clang
47081    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47082    if test $? -ne 0; then
47083      { $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
47084$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47085      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47086$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47087      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47088    fi
47089    # Collapse compiler output into a single line
47090    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47091    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47092        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47093  else
47094      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47095  fi
47096  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47097  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47098  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47099  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47100
47101  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47102$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47103
47104
47105  COMPILER=$BUILD_CXX
47106  COMPILER_NAME=BuildC++
47107
47108  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47109    # cc -V output typically looks like
47110    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47111    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47112    # Check that this is likely to be the Solaris Studio cc.
47113    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47114    if test $? -ne 0; then
47115      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47116      { $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
47117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47119$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47120      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47121$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47122      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47123    fi
47124    # Remove usage instructions (if present), and
47125    # collapse compiler output into a single line
47126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47127        $SED -e 's/ *[Uu]sage:.*//'`
47128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47129        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47130  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47131    # xlc -qversion output typically looks like
47132    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47133    #     Version: 11.01.0000.0015
47134    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47135    # Check that this is likely to be the IBM XL C compiler.
47136    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47137    if test $? -ne 0; then
47138      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47139      { $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
47140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47142$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47143      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47144$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47145      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47146    fi
47147    # Collapse compiler output into a single line
47148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47150        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47151  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47152    # There is no specific version flag, but all output starts with a version string.
47153    # First line typically looks something like:
47154    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47155    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47156    # Check that this is likely to be Microsoft CL.EXE.
47157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47158    if test $? -ne 0; then
47159      { $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
47160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47162$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47164    fi
47165    # Collapse compiler output into a single line
47166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47168        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47169  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47170    # gcc --version output typically looks like
47171    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47172    #     Copyright (C) 2013 Free Software Foundation, Inc.
47173    #     This is free software; see the source for copying conditions.  There is NO
47174    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47175    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47176    # Check that this is likely to be GCC.
47177    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47178    if test $? -ne 0; then
47179      { $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
47180$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47182$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47183      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47184    fi
47185    # Remove Copyright and legalese from version string, and
47186    # collapse into a single line
47187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47188        $SED -e 's/ *Copyright .*//'`
47189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47190        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47191  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47192    # clang --version output typically looks like
47193    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47194    #    clang version 3.3 (tags/RELEASE_33/final)
47195    # or
47196    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47197    #    Target: x86_64-pc-linux-gnu
47198    #    Thread model: posix
47199    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47200    # Check that this is likely to be clang
47201    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47202    if test $? -ne 0; then
47203      { $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
47204$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47205      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47206$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47207      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47208    fi
47209    # Collapse compiler output into a single line
47210    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47211    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47212        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47213  else
47214      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47215  fi
47216  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47217  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47218  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47219  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47220
47221  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47222$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47223
47224
47225  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47226    { $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
47227$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47228    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47229$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47230  fi
47231
47232  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47233  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47235$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47236  fi
47237
47238  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47239    { $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
47240$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47241  fi
47242
47243  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47244
47245  else
47246    # If we are not cross compiling, use the normal target compilers for
47247    # building the build platform executables.
47248    BUILD_CC="$CC"
47249    BUILD_CXX="$CXX"
47250    BUILD_LD="$LD"
47251    BUILD_LDCXX="$LDCXX"
47252    BUILD_NM="$NM"
47253    BUILD_AS="$AS"
47254    BUILD_OBJCOPY="$OBJCOPY"
47255    BUILD_STRIP="$STRIP"
47256    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47257    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47258    BUILD_AR="$AR"
47259  fi
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47273    # For hotspot, we need these in Windows mixed path,
47274    # so rewrite them all. Need added .exe suffix.
47275    HOTSPOT_CXX="$CXX.exe"
47276    HOTSPOT_LD="$LD.exe"
47277    HOTSPOT_MT="$MT.exe"
47278    HOTSPOT_RC="$RC.exe"
47279
47280  unix_path="$HOTSPOT_CXX"
47281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47282    windows_path=`$CYGPATH -m "$unix_path"`
47283    HOTSPOT_CXX="$windows_path"
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    windows_path=`cmd //c echo $unix_path`
47286    HOTSPOT_CXX="$windows_path"
47287  fi
47288
47289
47290  unix_path="$HOTSPOT_LD"
47291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47292    windows_path=`$CYGPATH -m "$unix_path"`
47293    HOTSPOT_LD="$windows_path"
47294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47295    windows_path=`cmd //c echo $unix_path`
47296    HOTSPOT_LD="$windows_path"
47297  fi
47298
47299
47300  unix_path="$HOTSPOT_MT"
47301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302    windows_path=`$CYGPATH -m "$unix_path"`
47303    HOTSPOT_MT="$windows_path"
47304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47305    windows_path=`cmd //c echo $unix_path`
47306    HOTSPOT_MT="$windows_path"
47307  fi
47308
47309
47310  unix_path="$HOTSPOT_RC"
47311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47312    windows_path=`$CYGPATH -m "$unix_path"`
47313    HOTSPOT_RC="$windows_path"
47314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47315    windows_path=`cmd //c echo $unix_path`
47316    HOTSPOT_RC="$windows_path"
47317  fi
47318
47319
47320
47321  else
47322    HOTSPOT_CXX="$CXX"
47323    HOTSPOT_LD="$LD"
47324  fi
47325
47326
47327
47328  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47329    USE_CLANG=true
47330  fi
47331
47332
47333
47334
47335
47336  # The package path is used only on macosx?
47337  # FIXME: clean this up, and/or move it elsewhere.
47338  PACKAGE_PATH=/opt/local
47339
47340
47341  # Check for extra potential brokenness.
47342  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47343    # On Windows, double-check that we got the right compiler.
47344    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47345    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47346    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47347      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47348        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
47349      fi
47350    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47351      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47352        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47353      fi
47354    fi
47355  fi
47356
47357  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47358    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47359    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47360    # This is later checked when setting flags.
47361
47362    # "-Og" suppported for GCC 4.8 and later
47363    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411    # Execute function body
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460    # Execute function body
47461
47462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47463$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47464  supports=yes
47465
47466  saved_cflags="$CFLAGS"
47467  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47468  ac_ext=c
47469ac_cpp='$CPP $CPPFLAGS'
47470ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47471ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47472ac_compiler_gnu=$ac_cv_c_compiler_gnu
47473
47474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47475/* end confdefs.h.  */
47476int i;
47477_ACEOF
47478if ac_fn_c_try_compile "$LINENO"; then :
47479
47480else
47481  supports=no
47482fi
47483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47484  ac_ext=cpp
47485ac_cpp='$CXXCPP $CPPFLAGS'
47486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47489
47490  CFLAGS="$saved_cflags"
47491
47492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47493$as_echo "$supports" >&6; }
47494  if test "x$supports" = "xyes" ; then
47495    :
47496    C_COMP_SUPPORTS="yes"
47497  else
47498    :
47499    C_COMP_SUPPORTS="no"
47500  fi
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560    # Execute function body
47561
47562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47563$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47564  supports=yes
47565
47566  saved_cxxflags="$CXXFLAGS"
47567  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47568  ac_ext=cpp
47569ac_cpp='$CXXCPP $CPPFLAGS'
47570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47573
47574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47575/* end confdefs.h.  */
47576int i;
47577_ACEOF
47578if ac_fn_cxx_try_compile "$LINENO"; then :
47579
47580else
47581  supports=no
47582fi
47583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47584  ac_ext=cpp
47585ac_cpp='$CXXCPP $CPPFLAGS'
47586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47589
47590  CXXFLAGS="$saved_cxxflags"
47591
47592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47593$as_echo "$supports" >&6; }
47594  if test "x$supports" = "xyes" ; then
47595    :
47596    CXX_COMP_SUPPORTS="yes"
47597  else
47598    :
47599    CXX_COMP_SUPPORTS="no"
47600  fi
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47615$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47616  supports=no
47617  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47618
47619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47620$as_echo "$supports" >&6; }
47621  if test "x$supports" = "xyes" ; then
47622    :
47623    HAS_CFLAG_OPTIMIZE_DEBUG=true
47624  else
47625    :
47626    HAS_CFLAG_OPTIMIZE_DEBUG=false
47627  fi
47628
47629
47630
47631
47632
47633
47634
47635    # "-z relro" supported in GNU binutils 2.17 and later
47636    LINKER_RELRO_FLAG="-Wl,-z,relro"
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684    # Execute function body
47685
47686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47687$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47688  supports=yes
47689
47690  saved_ldflags="$LDFLAGS"
47691  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47692  ac_ext=c
47693ac_cpp='$CPP $CPPFLAGS'
47694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47696ac_compiler_gnu=$ac_cv_c_compiler_gnu
47697
47698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47699/* end confdefs.h.  */
47700
47701int
47702main ()
47703{
47704
47705  ;
47706  return 0;
47707}
47708_ACEOF
47709if ac_fn_c_try_link "$LINENO"; then :
47710
47711else
47712  supports=no
47713fi
47714rm -f core conftest.err conftest.$ac_objext \
47715    conftest$ac_exeext conftest.$ac_ext
47716  ac_ext=cpp
47717ac_cpp='$CXXCPP $CPPFLAGS'
47718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47721
47722  LDFLAGS="$saved_ldflags"
47723
47724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47725$as_echo "$supports" >&6; }
47726  if test "x$supports" = "xyes" ; then
47727    :
47728    HAS_LINKER_RELRO=true
47729  else
47730    :
47731    HAS_LINKER_RELRO=false
47732  fi
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746    # "-z now" supported in GNU binutils 2.11 and later
47747    LINKER_NOW_FLAG="-Wl,-z,now"
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795    # Execute function body
47796
47797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47798$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47799  supports=yes
47800
47801  saved_ldflags="$LDFLAGS"
47802  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47803  ac_ext=c
47804ac_cpp='$CPP $CPPFLAGS'
47805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47807ac_compiler_gnu=$ac_cv_c_compiler_gnu
47808
47809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47810/* end confdefs.h.  */
47811
47812int
47813main ()
47814{
47815
47816  ;
47817  return 0;
47818}
47819_ACEOF
47820if ac_fn_c_try_link "$LINENO"; then :
47821
47822else
47823  supports=no
47824fi
47825rm -f core conftest.err conftest.$ac_objext \
47826    conftest$ac_exeext conftest.$ac_ext
47827  ac_ext=cpp
47828ac_cpp='$CXXCPP $CPPFLAGS'
47829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47832
47833  LDFLAGS="$saved_ldflags"
47834
47835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47836$as_echo "$supports" >&6; }
47837  if test "x$supports" = "xyes" ; then
47838    :
47839    HAS_LINKER_NOW=true
47840  else
47841    :
47842    HAS_LINKER_NOW=false
47843  fi
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856  fi
47857
47858  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47859  # in executable.'
47860  USING_BROKEN_SUSE_LD=no
47861  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47863$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47864    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47865    $ECHO "int main() { }" > main.c
47866    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47868$as_echo "no" >&6; }
47869      USING_BROKEN_SUSE_LD=no
47870    else
47871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47872$as_echo "yes" >&6; }
47873      USING_BROKEN_SUSE_LD=yes
47874    fi
47875    $RM version-script.map main.c a.out
47876  fi
47877
47878
47879  # Setup hotspot lecagy names for toolchains
47880  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47881  if test "x$TOOLCHAIN_TYPE" = xclang; then
47882    HOTSPOT_TOOLCHAIN_TYPE=gcc
47883  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47884    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47885  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47886    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47887  fi
47888
47889
47890
47891# Setup the JTReg Regression Test Harness.
47892
47893
47894# Check whether --with-jtreg was given.
47895if test "${with_jtreg+set}" = set; then :
47896  withval=$with_jtreg;
47897else
47898  with_jtreg=no
47899fi
47900
47901
47902  if test "x$with_jtreg" = xno; then
47903    # jtreg disabled
47904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47905$as_echo_n "checking for jtreg... " >&6; }
47906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47907$as_echo "no" >&6; }
47908  else
47909    if test "x$with_jtreg" != xyes; then
47910      # with path specified.
47911      JT_HOME="$with_jtreg"
47912    fi
47913
47914    if test "x$JT_HOME" != x; then
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47916$as_echo_n "checking for jtreg... " >&6; }
47917
47918      # use JT_HOME enviroment var.
47919
47920  # Only process if variable expands to non-empty
47921
47922  if test "x$JT_HOME" != x; then
47923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47924
47925  # Input might be given as Windows format, start by converting to
47926  # unix format.
47927  path="$JT_HOME"
47928  new_path=`$CYGPATH -u "$path"`
47929
47930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47933  # "foo.exe" is OK but "foo" is an error.
47934  #
47935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47936  # It is also a way to make sure we got the proper file name for the real test later on.
47937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47938  if test "x$test_shortpath" = x; then
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47940$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47941    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47942  fi
47943
47944  # Call helper function which possibly converts this using DOS-style short mode.
47945  # If so, the updated path is stored in $new_path.
47946
47947  input_path="$new_path"
47948  # Check if we need to convert this using DOS-style short mode. If the path
47949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47950  # take no chances and rewrite it.
47951  # Note: m4 eats our [], so we need to use [ and ] instead.
47952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47953  if test "x$has_forbidden_chars" != x; then
47954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47958      # Going to short mode and back again did indeed matter. Since short mode is
47959      # case insensitive, let's make it lowercase to improve readability.
47960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47961      # Now convert it back to Unix-style (cygpath)
47962      input_path=`$CYGPATH -u "$shortmode_path"`
47963      new_path="$input_path"
47964    fi
47965  fi
47966
47967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47968  if test "x$test_cygdrive_prefix" = x; then
47969    # As a simple fix, exclude /usr/bin since it's not a real path.
47970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47972      # a path prefixed by /cygdrive for fixpath to work.
47973      new_path="$CYGWIN_ROOT_PATH$input_path"
47974    fi
47975  fi
47976
47977
47978  if test "x$path" != "x$new_path"; then
47979    JT_HOME="$new_path"
47980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47981$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47982  fi
47983
47984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47985
47986  path="$JT_HOME"
47987  has_colon=`$ECHO $path | $GREP ^.:`
47988  new_path="$path"
47989  if test "x$has_colon" = x; then
47990    # Not in mixed or Windows style, start by that.
47991    new_path=`cmd //c echo $path`
47992  fi
47993
47994
47995  input_path="$new_path"
47996  # Check if we need to convert this using DOS-style short mode. If the path
47997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47998  # take no chances and rewrite it.
47999  # Note: m4 eats our [], so we need to use [ and ] instead.
48000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48001  if test "x$has_forbidden_chars" != x; then
48002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48004  fi
48005
48006
48007  windows_path="$new_path"
48008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48009    unix_path=`$CYGPATH -u "$windows_path"`
48010    new_path="$unix_path"
48011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48013    new_path="$unix_path"
48014  fi
48015
48016  if test "x$path" != "x$new_path"; then
48017    JT_HOME="$new_path"
48018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48019$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48020  fi
48021
48022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48024
48025    else
48026      # We're on a unix platform. Hooray! :)
48027      path="$JT_HOME"
48028      has_space=`$ECHO "$path" | $GREP " "`
48029      if test "x$has_space" != x; then
48030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48031$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48033      fi
48034
48035      # Use eval to expand a potential ~
48036      eval path="$path"
48037      if test ! -f "$path" && test ! -d "$path"; then
48038        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48039      fi
48040
48041      if test -d "$path"; then
48042        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48043      else
48044        dir="`$DIRNAME "$path"`"
48045        base="`$BASENAME "$path"`"
48046        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48047      fi
48048    fi
48049  fi
48050
48051
48052      # jtreg win32 script works for everybody
48053      JTREGEXE="$JT_HOME/bin/jtreg"
48054
48055      if test ! -f "$JTREGEXE"; then
48056        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48057      fi
48058
48059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48060$as_echo "$JTREGEXE" >&6; }
48061    else
48062      # try to find jtreg on path
48063
48064
48065
48066  # Publish this variable in the help.
48067
48068
48069  if [ -z "${JTREGEXE+x}" ]; then
48070    # The variable is not set by user, try to locate tool using the code snippet
48071    for ac_prog in jtreg
48072do
48073  # Extract the first word of "$ac_prog", so it can be a program name with args.
48074set dummy $ac_prog; ac_word=$2
48075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48076$as_echo_n "checking for $ac_word... " >&6; }
48077if ${ac_cv_path_JTREGEXE+:} false; then :
48078  $as_echo_n "(cached) " >&6
48079else
48080  case $JTREGEXE in
48081  [\\/]* | ?:[\\/]*)
48082  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48083  ;;
48084  *)
48085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48086for as_dir in $PATH
48087do
48088  IFS=$as_save_IFS
48089  test -z "$as_dir" && as_dir=.
48090    for ac_exec_ext in '' $ac_executable_extensions; do
48091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48092    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48094    break 2
48095  fi
48096done
48097  done
48098IFS=$as_save_IFS
48099
48100  ;;
48101esac
48102fi
48103JTREGEXE=$ac_cv_path_JTREGEXE
48104if test -n "$JTREGEXE"; then
48105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48106$as_echo "$JTREGEXE" >&6; }
48107else
48108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48109$as_echo "no" >&6; }
48110fi
48111
48112
48113  test -n "$JTREGEXE" && break
48114done
48115
48116  else
48117    # The variable is set, but is it from the command line or the environment?
48118
48119    # Try to remove the string !JTREGEXE! from our list.
48120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48122      # If it failed, the variable was not from the command line. Ignore it,
48123      # but warn the user (except for BASH, which is always set by the calling BASH).
48124      if test "xJTREGEXE" != xBASH; then
48125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48126$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48127      fi
48128      # Try to locate tool using the code snippet
48129      for ac_prog in jtreg
48130do
48131  # Extract the first word of "$ac_prog", so it can be a program name with args.
48132set dummy $ac_prog; 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  test -n "$JTREGEXE" && break
48172done
48173
48174    else
48175      # If it succeeded, then it was overridden by the user. We will use it
48176      # for the tool.
48177
48178      # First remove it from the list of overridden variables, so we can test
48179      # for unknown variables in the end.
48180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48181
48182      # Check if we try to supply an empty value
48183      if test "x$JTREGEXE" = x; then
48184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48185$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48187$as_echo_n "checking for JTREGEXE... " >&6; }
48188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48189$as_echo "disabled" >&6; }
48190      else
48191        # Check if the provided tool contains a complete path.
48192        tool_specified="$JTREGEXE"
48193        tool_basename="${tool_specified##*/}"
48194        if test "x$tool_basename" = "x$tool_specified"; then
48195          # A command without a complete path is provided, search $PATH.
48196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48197$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48198          # Extract the first word of "$tool_basename", so it can be a program name with args.
48199set dummy $tool_basename; ac_word=$2
48200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48201$as_echo_n "checking for $ac_word... " >&6; }
48202if ${ac_cv_path_JTREGEXE+:} false; then :
48203  $as_echo_n "(cached) " >&6
48204else
48205  case $JTREGEXE in
48206  [\\/]* | ?:[\\/]*)
48207  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48208  ;;
48209  *)
48210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48211for as_dir in $PATH
48212do
48213  IFS=$as_save_IFS
48214  test -z "$as_dir" && as_dir=.
48215    for ac_exec_ext in '' $ac_executable_extensions; do
48216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48217    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48219    break 2
48220  fi
48221done
48222  done
48223IFS=$as_save_IFS
48224
48225  ;;
48226esac
48227fi
48228JTREGEXE=$ac_cv_path_JTREGEXE
48229if test -n "$JTREGEXE"; then
48230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48231$as_echo "$JTREGEXE" >&6; }
48232else
48233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48234$as_echo "no" >&6; }
48235fi
48236
48237
48238          if test "x$JTREGEXE" = x; then
48239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48240          fi
48241        else
48242          # Otherwise we believe it is a complete path. Use it as it is.
48243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48244$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48246$as_echo_n "checking for JTREGEXE... " >&6; }
48247          if test ! -x "$tool_specified"; then
48248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48249$as_echo "not found" >&6; }
48250            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48251          fi
48252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48253$as_echo "$tool_specified" >&6; }
48254        fi
48255      fi
48256    fi
48257
48258  fi
48259
48260
48261
48262  if test "x$JTREGEXE" = x; then
48263    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48264  fi
48265
48266
48267      JT_HOME="`$DIRNAME $JTREGEXE`"
48268    fi
48269  fi
48270
48271
48272
48273
48274
48275
48276  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48277  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48278  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48279  #                              commands produced by the link step (currently AIX only)
48280  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48281    COMPILER_TARGET_BITS_FLAG="-q"
48282    COMPILER_COMMAND_FILE_FLAG="-f"
48283    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48284  else
48285    COMPILER_TARGET_BITS_FLAG="-m"
48286    COMPILER_COMMAND_FILE_FLAG="@"
48287    COMPILER_BINDCMD_FILE_FLAG=""
48288
48289    # The solstudio linker does not support @-files.
48290    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48291      COMPILER_COMMAND_FILE_FLAG=
48292    fi
48293
48294    # Check if @file is supported by gcc
48295    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48297$as_echo_n "checking if @file is supported by gcc... " >&6; }
48298      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48299      $ECHO "" "--version" > command.file
48300      if $CXX @command.file 2>&5 >&5; then
48301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48302$as_echo "yes" >&6; }
48303        COMPILER_COMMAND_FILE_FLAG="@"
48304      else
48305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48306$as_echo "no" >&6; }
48307        COMPILER_COMMAND_FILE_FLAG=
48308      fi
48309      $RM command.file
48310    fi
48311  fi
48312
48313
48314
48315
48316  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48317  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48318    ARFLAGS="-r"
48319  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48320    ARFLAGS="-X64"
48321  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48322    # lib.exe is used as AR to create static libraries.
48323    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48324  else
48325    ARFLAGS=""
48326  fi
48327
48328
48329  ## Setup strip.
48330  # FIXME: should this really be per platform, or should it be per toolchain type?
48331  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48332  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48333  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48334    STRIPFLAGS="-g"
48335  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48336    STRIPFLAGS="-x"
48337  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48338    STRIPFLAGS="-S"
48339  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48340    STRIPFLAGS="-X32_64"
48341  fi
48342
48343
48344
48345  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48346    CC_OUT_OPTION=-Fo
48347    EXE_OUT_OPTION=-out:
48348    LD_OUT_OPTION=-out:
48349    AR_OUT_OPTION=-out:
48350  else
48351    # The option used to specify the target .o,.a or .so file.
48352    # When compiling, how to specify the to be created object file.
48353    CC_OUT_OPTION='-o$(SPACE)'
48354    # When linking, how to specify the to be created executable.
48355    EXE_OUT_OPTION='-o$(SPACE)'
48356    # When linking, how to specify the to be created dynamically linkable library.
48357    LD_OUT_OPTION='-o$(SPACE)'
48358    # When archiving, how to specify the to be create static archive for object files.
48359    AR_OUT_OPTION='rcs$(SPACE)'
48360  fi
48361
48362
48363
48364
48365
48366  # On Windows, we need to set RC flags.
48367  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48368    RC_FLAGS="-nologo -l0x409"
48369    JVM_RCFLAGS="-nologo"
48370    if test "x$DEBUG_LEVEL" = xrelease; then
48371      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48372      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48373    fi
48374
48375    # The version variables used to create RC_FLAGS may be overridden
48376    # in a custom configure script, or possibly the command line.
48377    # Let those variables be expanded at make time in spec.gmk.
48378    # The \$ are escaped to the shell, and the $(...) variables
48379    # are evaluated by make.
48380    RC_FLAGS="$RC_FLAGS \
48381        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48382        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48383        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48384        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48385        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48386        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48387        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48388
48389    JVM_RCFLAGS="$JVM_RCFLAGS \
48390        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48391        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48392        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48393        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48394        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48395        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48396        -D\"HS_FNAME=jvm.dll\" \
48397        -D\"HS_INTERNAL_NAME=jvm\""
48398  fi
48399
48400
48401
48402  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48403    # silence copyright notice and other headers.
48404    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48405  fi
48406
48407
48408# Now we can test some aspects on the target using configure macros.
48409
48410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48411$as_echo_n "checking for ANSI C header files... " >&6; }
48412if ${ac_cv_header_stdc+:} false; then :
48413  $as_echo_n "(cached) " >&6
48414else
48415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416/* end confdefs.h.  */
48417#include <stdlib.h>
48418#include <stdarg.h>
48419#include <string.h>
48420#include <float.h>
48421
48422int
48423main ()
48424{
48425
48426  ;
48427  return 0;
48428}
48429_ACEOF
48430if ac_fn_cxx_try_compile "$LINENO"; then :
48431  ac_cv_header_stdc=yes
48432else
48433  ac_cv_header_stdc=no
48434fi
48435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48436
48437if test $ac_cv_header_stdc = yes; then
48438  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48440/* end confdefs.h.  */
48441#include <string.h>
48442
48443_ACEOF
48444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48445  $EGREP "memchr" >/dev/null 2>&1; then :
48446
48447else
48448  ac_cv_header_stdc=no
48449fi
48450rm -f conftest*
48451
48452fi
48453
48454if test $ac_cv_header_stdc = yes; then
48455  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48457/* end confdefs.h.  */
48458#include <stdlib.h>
48459
48460_ACEOF
48461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48462  $EGREP "free" >/dev/null 2>&1; then :
48463
48464else
48465  ac_cv_header_stdc=no
48466fi
48467rm -f conftest*
48468
48469fi
48470
48471if test $ac_cv_header_stdc = yes; then
48472  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48473  if test "$cross_compiling" = yes; then :
48474  :
48475else
48476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48477/* end confdefs.h.  */
48478#include <ctype.h>
48479#include <stdlib.h>
48480#if ((' ' & 0x0FF) == 0x020)
48481# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48482# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48483#else
48484# define ISLOWER(c) \
48485		   (('a' <= (c) && (c) <= 'i') \
48486		     || ('j' <= (c) && (c) <= 'r') \
48487		     || ('s' <= (c) && (c) <= 'z'))
48488# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48489#endif
48490
48491#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48492int
48493main ()
48494{
48495  int i;
48496  for (i = 0; i < 256; i++)
48497    if (XOR (islower (i), ISLOWER (i))
48498	|| toupper (i) != TOUPPER (i))
48499      return 2;
48500  return 0;
48501}
48502_ACEOF
48503if ac_fn_cxx_try_run "$LINENO"; then :
48504
48505else
48506  ac_cv_header_stdc=no
48507fi
48508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48509  conftest.$ac_objext conftest.beam conftest.$ac_ext
48510fi
48511
48512fi
48513fi
48514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48515$as_echo "$ac_cv_header_stdc" >&6; }
48516if test $ac_cv_header_stdc = yes; then
48517
48518$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48519
48520fi
48521
48522# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48523for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48524		  inttypes.h stdint.h unistd.h
48525do :
48526  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48527ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48528"
48529if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48530  cat >>confdefs.h <<_ACEOF
48531#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48532_ACEOF
48533
48534fi
48535
48536done
48537
48538
48539
48540  ###############################################################################
48541  #
48542  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48543  # (The JVM can use 32 or 64 bit Java pointers but that decision
48544  # is made at runtime.)
48545  #
48546
48547  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48548    # Always specify -m flag on Solaris
48549    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48550
48551  # When we add flags to the "official" CFLAGS etc, we need to
48552  # keep track of these additions in ADDED_CFLAGS etc. These
48553  # will later be checked to make sure only controlled additions
48554  # have been made to CFLAGS etc.
48555  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48556  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48557  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48558
48559  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48560  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48561  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48562
48563  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48564  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48565  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48566
48567  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48568  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48569  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48570
48571  elif test "x$COMPILE_TYPE" = xreduced; then
48572    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48573      # Specify -m if running reduced on unix platforms
48574
48575  # When we add flags to the "official" CFLAGS etc, we need to
48576  # keep track of these additions in ADDED_CFLAGS etc. These
48577  # will later be checked to make sure only controlled additions
48578  # have been made to CFLAGS etc.
48579  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48580  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48581  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48582
48583  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48584  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48585  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48586
48587  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48588  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48589  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48590
48591  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48592  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48593  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48594
48595    fi
48596  fi
48597  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48598    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48599    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48600    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48601  fi
48602
48603  # Make compilation sanity check
48604  for ac_header in stdio.h
48605do :
48606  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48607if test "x$ac_cv_header_stdio_h" = xyes; then :
48608  cat >>confdefs.h <<_ACEOF
48609#define HAVE_STDIO_H 1
48610_ACEOF
48611
48612else
48613
48614    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48615$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48616    if test "x$COMPILE_TYPE" = xreduced; then
48617
48618  # Print a helpful message on how to acquire the necessary build dependency.
48619  # reduced is the help tag: freetype, cups, alsa etc
48620  MISSING_DEPENDENCY=reduced
48621
48622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48623    cygwin_help $MISSING_DEPENDENCY
48624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48625    msys_help $MISSING_DEPENDENCY
48626  else
48627    PKGHANDLER_COMMAND=
48628
48629    case $PKGHANDLER in
48630      apt-get)
48631        apt_help     $MISSING_DEPENDENCY ;;
48632      yum)
48633        yum_help     $MISSING_DEPENDENCY ;;
48634      port)
48635        port_help    $MISSING_DEPENDENCY ;;
48636      pkgutil)
48637        pkgutil_help $MISSING_DEPENDENCY ;;
48638      pkgadd)
48639        pkgadd_help  $MISSING_DEPENDENCY ;;
48640    esac
48641
48642    if test "x$PKGHANDLER_COMMAND" != x; then
48643      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48644    fi
48645  fi
48646
48647      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48648$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48649    elif test "x$COMPILE_TYPE" = xcross; then
48650      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48651$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48652    fi
48653    as_fn_error $? "Cannot continue." "$LINENO" 5
48654
48655fi
48656
48657done
48658
48659
48660  # The cast to long int works around a bug in the HP C Compiler
48661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48663# This bug is HP SR number 8606223364.
48664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48665$as_echo_n "checking size of int *... " >&6; }
48666if ${ac_cv_sizeof_int_p+:} false; then :
48667  $as_echo_n "(cached) " >&6
48668else
48669  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48670
48671else
48672  if test "$ac_cv_type_int_p" = yes; then
48673     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48675as_fn_error 77 "cannot compute sizeof (int *)
48676See \`config.log' for more details" "$LINENO" 5; }
48677   else
48678     ac_cv_sizeof_int_p=0
48679   fi
48680fi
48681
48682fi
48683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48684$as_echo "$ac_cv_sizeof_int_p" >&6; }
48685
48686
48687
48688cat >>confdefs.h <<_ACEOF
48689#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48690_ACEOF
48691
48692
48693
48694  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48695  if test "x$ac_cv_sizeof_int_p" = x; then
48696    # The test failed, lets stick to the assumed value.
48697    { $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
48698$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48699  else
48700    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48701
48702    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48703      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48704      # Let's try to implicitely set the compilers target architecture and retry the test
48705      { $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
48706$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;}
48707      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48708$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48709
48710  # When we add flags to the "official" CFLAGS etc, we need to
48711  # keep track of these additions in ADDED_CFLAGS etc. These
48712  # will later be checked to make sure only controlled additions
48713  # have been made to CFLAGS etc.
48714  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48715  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48716  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48717
48718  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48719  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48720  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48721
48722  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48723  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48724  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48725
48726  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48727  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48728  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48729
48730
48731      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48732      unset ac_cv_sizeof_int_p
48733      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48734      cat >>confdefs.h <<_ACEOF
48735#undef SIZEOF_INT_P
48736_ACEOF
48737
48738      # The cast to long int works around a bug in the HP C Compiler
48739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48741# This bug is HP SR number 8606223364.
48742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48743$as_echo_n "checking size of int *... " >&6; }
48744if ${ac_cv_sizeof_int_p+:} false; then :
48745  $as_echo_n "(cached) " >&6
48746else
48747  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48748
48749else
48750  if test "$ac_cv_type_int_p" = yes; then
48751     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48753as_fn_error 77 "cannot compute sizeof (int *)
48754See \`config.log' for more details" "$LINENO" 5; }
48755   else
48756     ac_cv_sizeof_int_p=0
48757   fi
48758fi
48759
48760fi
48761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48762$as_echo "$ac_cv_sizeof_int_p" >&6; }
48763
48764
48765
48766cat >>confdefs.h <<_ACEOF
48767#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48768_ACEOF
48769
48770
48771
48772      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48773
48774      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48775        { $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
48776$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;}
48777        if test "x$COMPILE_TYPE" = xreduced; then
48778
48779  # Print a helpful message on how to acquire the necessary build dependency.
48780  # reduced is the help tag: freetype, cups, alsa etc
48781  MISSING_DEPENDENCY=reduced
48782
48783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48784    cygwin_help $MISSING_DEPENDENCY
48785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48786    msys_help $MISSING_DEPENDENCY
48787  else
48788    PKGHANDLER_COMMAND=
48789
48790    case $PKGHANDLER in
48791      apt-get)
48792        apt_help     $MISSING_DEPENDENCY ;;
48793      yum)
48794        yum_help     $MISSING_DEPENDENCY ;;
48795      port)
48796        port_help    $MISSING_DEPENDENCY ;;
48797      pkgutil)
48798        pkgutil_help $MISSING_DEPENDENCY ;;
48799      pkgadd)
48800        pkgadd_help  $MISSING_DEPENDENCY ;;
48801    esac
48802
48803    if test "x$PKGHANDLER_COMMAND" != x; then
48804      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48805    fi
48806  fi
48807
48808          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48809$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48810        elif test "x$COMPILE_TYPE" = xcross; then
48811          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48812$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48813        fi
48814        as_fn_error $? "Cannot continue." "$LINENO" 5
48815      fi
48816    fi
48817  fi
48818
48819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48820$as_echo_n "checking for target address size... " >&6; }
48821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48822$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48823
48824
48825  ###############################################################################
48826  #
48827  # Is the target little of big endian?
48828  #
48829   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48830$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48831if ${ac_cv_c_bigendian+:} false; then :
48832  $as_echo_n "(cached) " >&6
48833else
48834  ac_cv_c_bigendian=unknown
48835    # See if we're dealing with a universal compiler.
48836    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48837/* end confdefs.h.  */
48838#ifndef __APPLE_CC__
48839	       not a universal capable compiler
48840	     #endif
48841	     typedef int dummy;
48842
48843_ACEOF
48844if ac_fn_cxx_try_compile "$LINENO"; then :
48845
48846	# Check for potential -arch flags.  It is not universal unless
48847	# there are at least two -arch flags with different values.
48848	ac_arch=
48849	ac_prev=
48850	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48851	 if test -n "$ac_prev"; then
48852	   case $ac_word in
48853	     i?86 | x86_64 | ppc | ppc64)
48854	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48855		 ac_arch=$ac_word
48856	       else
48857		 ac_cv_c_bigendian=universal
48858		 break
48859	       fi
48860	       ;;
48861	   esac
48862	   ac_prev=
48863	 elif test "x$ac_word" = "x-arch"; then
48864	   ac_prev=arch
48865	 fi
48866       done
48867fi
48868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48869    if test $ac_cv_c_bigendian = unknown; then
48870      # See if sys/param.h defines the BYTE_ORDER macro.
48871      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48872/* end confdefs.h.  */
48873#include <sys/types.h>
48874	     #include <sys/param.h>
48875
48876int
48877main ()
48878{
48879#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48880		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48881		     && LITTLE_ENDIAN)
48882	      bogus endian macros
48883	     #endif
48884
48885  ;
48886  return 0;
48887}
48888_ACEOF
48889if ac_fn_cxx_try_compile "$LINENO"; then :
48890  # It does; now see whether it defined to BIG_ENDIAN or not.
48891	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48892/* end confdefs.h.  */
48893#include <sys/types.h>
48894		#include <sys/param.h>
48895
48896int
48897main ()
48898{
48899#if BYTE_ORDER != BIG_ENDIAN
48900		 not big endian
48901		#endif
48902
48903  ;
48904  return 0;
48905}
48906_ACEOF
48907if ac_fn_cxx_try_compile "$LINENO"; then :
48908  ac_cv_c_bigendian=yes
48909else
48910  ac_cv_c_bigendian=no
48911fi
48912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48913fi
48914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48915    fi
48916    if test $ac_cv_c_bigendian = unknown; then
48917      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48918      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48919/* end confdefs.h.  */
48920#include <limits.h>
48921
48922int
48923main ()
48924{
48925#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48926	      bogus endian macros
48927	     #endif
48928
48929  ;
48930  return 0;
48931}
48932_ACEOF
48933if ac_fn_cxx_try_compile "$LINENO"; then :
48934  # It does; now see whether it defined to _BIG_ENDIAN or not.
48935	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48936/* end confdefs.h.  */
48937#include <limits.h>
48938
48939int
48940main ()
48941{
48942#ifndef _BIG_ENDIAN
48943		 not big endian
48944		#endif
48945
48946  ;
48947  return 0;
48948}
48949_ACEOF
48950if ac_fn_cxx_try_compile "$LINENO"; then :
48951  ac_cv_c_bigendian=yes
48952else
48953  ac_cv_c_bigendian=no
48954fi
48955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48956fi
48957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48958    fi
48959    if test $ac_cv_c_bigendian = unknown; then
48960      # Compile a test program.
48961      if test "$cross_compiling" = yes; then :
48962  # Try to guess by grepping values from an object file.
48963	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48964/* end confdefs.h.  */
48965short int ascii_mm[] =
48966		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48967		short int ascii_ii[] =
48968		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48969		int use_ascii (int i) {
48970		  return ascii_mm[i] + ascii_ii[i];
48971		}
48972		short int ebcdic_ii[] =
48973		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48974		short int ebcdic_mm[] =
48975		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48976		int use_ebcdic (int i) {
48977		  return ebcdic_mm[i] + ebcdic_ii[i];
48978		}
48979		extern int foo;
48980
48981int
48982main ()
48983{
48984return use_ascii (foo) == use_ebcdic (foo);
48985  ;
48986  return 0;
48987}
48988_ACEOF
48989if ac_fn_cxx_try_compile "$LINENO"; then :
48990  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48991	      ac_cv_c_bigendian=yes
48992	    fi
48993	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48994	      if test "$ac_cv_c_bigendian" = unknown; then
48995		ac_cv_c_bigendian=no
48996	      else
48997		# finding both strings is unlikely to happen, but who knows?
48998		ac_cv_c_bigendian=unknown
48999	      fi
49000	    fi
49001fi
49002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49003else
49004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49005/* end confdefs.h.  */
49006$ac_includes_default
49007int
49008main ()
49009{
49010
49011	     /* Are we little or big endian?  From Harbison&Steele.  */
49012	     union
49013	     {
49014	       long int l;
49015	       char c[sizeof (long int)];
49016	     } u;
49017	     u.l = 1;
49018	     return u.c[sizeof (long int) - 1] == 1;
49019
49020  ;
49021  return 0;
49022}
49023_ACEOF
49024if ac_fn_cxx_try_run "$LINENO"; then :
49025  ac_cv_c_bigendian=no
49026else
49027  ac_cv_c_bigendian=yes
49028fi
49029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49030  conftest.$ac_objext conftest.beam conftest.$ac_ext
49031fi
49032
49033    fi
49034fi
49035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49036$as_echo "$ac_cv_c_bigendian" >&6; }
49037 case $ac_cv_c_bigendian in #(
49038   yes)
49039     ENDIAN="big";; #(
49040   no)
49041     ENDIAN="little" ;; #(
49042   universal)
49043     ENDIAN="universal_endianness"
49044     ;; #(
49045   *)
49046     ENDIAN="unknown" ;;
49047 esac
49048
49049
49050  if test "x$ENDIAN" = xuniversal_endianness; then
49051    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49052  fi
49053  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49054    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
49055  fi
49056
49057
49058# Configure flags for the tools
49059
49060  ###############################################################################
49061  #
49062  # How to compile shared libraries.
49063  #
49064
49065  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49066    PICFLAG="-fPIC"
49067    C_FLAG_REORDER=''
49068    CXX_FLAG_REORDER=''
49069
49070    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49071      # Linking is different on MacOSX
49072      if test "x$STATIC_BUILD" = xtrue; then
49073        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49074      else
49075        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49076        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49077      fi
49078      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49079      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49080      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49081      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49082    else
49083      # Default works for linux, might work on other platforms as well.
49084      SHARED_LIBRARY_FLAGS='-shared'
49085      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49086      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49087      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49088      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49089    fi
49090  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49091    C_FLAG_REORDER=''
49092    CXX_FLAG_REORDER=''
49093
49094    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49095      # Linking is different on MacOSX
49096      PICFLAG=''
49097      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49098      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49099      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49100      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49101      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49102
49103      if test "x$STATIC_BUILD" = xfalse; then
49104        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49105      fi
49106    else
49107      # Default works for linux, might work on other platforms as well.
49108      PICFLAG='-fPIC'
49109      SHARED_LIBRARY_FLAGS='-shared'
49110      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49111      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49112      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49113      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49114    fi
49115  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49116    PICFLAG="-KPIC"
49117    C_FLAG_REORDER='-xF'
49118    CXX_FLAG_REORDER='-xF'
49119    SHARED_LIBRARY_FLAGS="-G"
49120    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49121    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49122    SET_SHARED_LIBRARY_NAME='-h $1'
49123    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49124  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49125    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49126    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49127    # will have to patch this single instruction with a call to some out-of-order code which
49128    # does the load from the TOC. This is of course slow. But in that case we also would have
49129    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49130    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49131    # can be patched directly by the linker and does not require a jump to out-of-order code.
49132    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49133    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49134    # loads for accessing a global variable). But there are rumors that this may be seen as a
49135    # 'performance feature' because of improved code locality of the symbols used in a
49136    # compilation unit.
49137    PICFLAG="-qpic"
49138    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49139    C_FLAG_REORDER=''
49140    CXX_FLAG_REORDER=''
49141    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49142    SET_EXECUTABLE_ORIGIN=""
49143    SET_SHARED_LIBRARY_ORIGIN=''
49144    SET_SHARED_LIBRARY_NAME=''
49145    SET_SHARED_LIBRARY_MAPFILE=''
49146  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49147    PICFLAG=""
49148    C_FLAG_REORDER=''
49149    CXX_FLAG_REORDER=''
49150    SHARED_LIBRARY_FLAGS="-dll"
49151    SET_EXECUTABLE_ORIGIN=''
49152    SET_SHARED_LIBRARY_ORIGIN=''
49153    SET_SHARED_LIBRARY_NAME=''
49154    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49155  fi
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165  # The (cross) compiler is now configured, we can now test capabilities
49166  # of the target platform.
49167
49168
49169
49170  ###############################################################################
49171  #
49172  # Setup the opt flags for different compilers
49173  # and different operating systems.
49174  #
49175
49176  # FIXME: this was indirectly the old default, but just inherited.
49177  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49178  #   C_FLAG_DEPS="-MMD -MF"
49179  # fi
49180
49181  # Generate make dependency files
49182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49183    C_FLAG_DEPS="-MMD -MF"
49184  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49185    C_FLAG_DEPS="-MMD -MF"
49186  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49187    C_FLAG_DEPS="-xMMD -xMF"
49188  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49189    C_FLAG_DEPS="-qmakedep=gcc -MF"
49190  fi
49191  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49192
49193
49194
49195  # Debug symbols
49196  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49197    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49198      # reduce from default "-g2" option to save space
49199      CFLAGS_DEBUG_SYMBOLS="-g1"
49200      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49201    else
49202      CFLAGS_DEBUG_SYMBOLS="-g"
49203      CXXFLAGS_DEBUG_SYMBOLS="-g"
49204    fi
49205  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49206    CFLAGS_DEBUG_SYMBOLS="-g"
49207    CXXFLAGS_DEBUG_SYMBOLS="-g"
49208  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49209    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49210    # -g0 enables debug symbols without disabling inlining.
49211    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49212  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49213    CFLAGS_DEBUG_SYMBOLS="-g"
49214    CXXFLAGS_DEBUG_SYMBOLS="-g"
49215  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49216    CFLAGS_DEBUG_SYMBOLS="-Zi"
49217    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49218  fi
49219
49220
49221
49222  # Debug symbols for JVM_CFLAGS
49223  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49224    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49225    if test "x$DEBUG_LEVEL" = xslowdebug; then
49226      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49227    else
49228      # -g0 does not disable inlining, which -g does.
49229      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49230    fi
49231  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49232    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49233  else
49234    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49235  fi
49236
49237
49238  # bounds, memory and behavior checking options
49239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49240    case $DEBUG_LEVEL in
49241    release )
49242      # no adjustment
49243      ;;
49244    fastdebug )
49245      # no adjustment
49246      ;;
49247    slowdebug )
49248      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49249      # get's added conditionally on whether we produce debug symbols or not.
49250      # This is most likely not really correct.
49251
49252      # Add runtime stack smashing and undefined behavior checks.
49253      # Not all versions of gcc support -fstack-protector
49254      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297    # Execute function body
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346    # Execute function body
49347
49348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49349$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49350  supports=yes
49351
49352  saved_cflags="$CFLAGS"
49353  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49354  ac_ext=c
49355ac_cpp='$CPP $CPPFLAGS'
49356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49358ac_compiler_gnu=$ac_cv_c_compiler_gnu
49359
49360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49361/* end confdefs.h.  */
49362int i;
49363_ACEOF
49364if ac_fn_c_try_compile "$LINENO"; then :
49365
49366else
49367  supports=no
49368fi
49369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49370  ac_ext=cpp
49371ac_cpp='$CXXCPP $CPPFLAGS'
49372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49375
49376  CFLAGS="$saved_cflags"
49377
49378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49379$as_echo "$supports" >&6; }
49380  if test "x$supports" = "xyes" ; then
49381    :
49382    C_COMP_SUPPORTS="yes"
49383  else
49384    :
49385    C_COMP_SUPPORTS="no"
49386  fi
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446    # Execute function body
49447
49448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49449$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49450  supports=yes
49451
49452  saved_cxxflags="$CXXFLAGS"
49453  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49454  ac_ext=cpp
49455ac_cpp='$CXXCPP $CPPFLAGS'
49456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49459
49460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49461/* end confdefs.h.  */
49462int i;
49463_ACEOF
49464if ac_fn_cxx_try_compile "$LINENO"; then :
49465
49466else
49467  supports=no
49468fi
49469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49470  ac_ext=cpp
49471ac_cpp='$CXXCPP $CPPFLAGS'
49472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49475
49476  CXXFLAGS="$saved_cxxflags"
49477
49478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49479$as_echo "$supports" >&6; }
49480  if test "x$supports" = "xyes" ; then
49481    :
49482    CXX_COMP_SUPPORTS="yes"
49483  else
49484    :
49485    CXX_COMP_SUPPORTS="no"
49486  fi
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49501$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49502  supports=no
49503  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49504
49505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49506$as_echo "$supports" >&6; }
49507  if test "x$supports" = "xyes" ; then
49508    :
49509
49510  else
49511    :
49512    STACK_PROTECTOR_CFLAG=""
49513  fi
49514
49515
49516
49517
49518
49519
49520
49521      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49522      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49523      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49524        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49525      fi
49526      ;;
49527    esac
49528  fi
49529
49530  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49531    if test "x$DEBUG_LEVEL" != xrelease; then
49532      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49533        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49534      fi
49535    fi
49536  fi
49537
49538  # Optimization levels
49539  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49540    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49541
49542    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49543      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49544      C_O_FLAG_HIGHEST_JVM="-xO4"
49545      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49546      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49547      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49548      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49549      C_O_FLAG_DEBUG_JVM=""
49550      C_O_FLAG_NONE="-xregs=no%frameptr"
49551      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49552      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49553      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49554      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49555      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49556      CXX_O_FLAG_DEBUG_JVM=""
49557      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49558      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49559        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49560        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49561      fi
49562    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49563      C_O_FLAG_HIGHEST_JVM="-xO4"
49564      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49565      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49566      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49567      C_O_FLAG_DEBUG=""
49568      C_O_FLAG_DEBUG_JVM=""
49569      C_O_FLAG_NONE=""
49570      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49571      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49572      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49573      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49574      CXX_O_FLAG_DEBUG=""
49575      CXX_O_FLAG_DEBUG_JVM=""
49576      CXX_O_FLAG_NONE=""
49577    fi
49578  else
49579    # The remaining toolchains share opt flags between CC and CXX;
49580    # setup for C and duplicate afterwards.
49581    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49582      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49583        # On MacOSX we optimize for size, something
49584        # we should do for all platforms?
49585        C_O_FLAG_HIGHEST_JVM="-Os"
49586        C_O_FLAG_HIGHEST="-Os"
49587        C_O_FLAG_HI="-Os"
49588        C_O_FLAG_NORM="-Os"
49589        C_O_FLAG_SIZE="-Os"
49590      else
49591        C_O_FLAG_HIGHEST_JVM="-O3"
49592        C_O_FLAG_HIGHEST="-O3"
49593        C_O_FLAG_HI="-O3"
49594        C_O_FLAG_NORM="-O2"
49595        C_O_FLAG_SIZE="-Os"
49596      fi
49597      C_O_FLAG_DEBUG="-O0"
49598      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49599        C_O_FLAG_DEBUG_JVM=""
49600      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49601        C_O_FLAG_DEBUG_JVM="-O0"
49602      fi
49603      C_O_FLAG_NONE="-O0"
49604    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49605      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49606        # On MacOSX we optimize for size, something
49607        # we should do for all platforms?
49608        C_O_FLAG_HIGHEST_JVM="-Os"
49609        C_O_FLAG_HIGHEST="-Os"
49610        C_O_FLAG_HI="-Os"
49611        C_O_FLAG_NORM="-Os"
49612        C_O_FLAG_SIZE="-Os"
49613      else
49614        C_O_FLAG_HIGHEST_JVM="-O3"
49615        C_O_FLAG_HIGHEST="-O3"
49616        C_O_FLAG_HI="-O3"
49617        C_O_FLAG_NORM="-O2"
49618        C_O_FLAG_SIZE="-Os"
49619      fi
49620      C_O_FLAG_DEBUG="-O0"
49621      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49622        C_O_FLAG_DEBUG_JVM=""
49623      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49624        C_O_FLAG_DEBUG_JVM="-O0"
49625      fi
49626      C_O_FLAG_NONE="-O0"
49627    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49628      C_O_FLAG_HIGHEST_JVM="-O3"
49629      C_O_FLAG_HIGHEST="-O3"
49630      C_O_FLAG_HI="-O3 -qstrict"
49631      C_O_FLAG_NORM="-O2"
49632      C_O_FLAG_DEBUG="-qnoopt"
49633      # FIXME: Value below not verified.
49634      C_O_FLAG_DEBUG_JVM=""
49635      C_O_FLAG_NONE="-qnoopt"
49636    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49637      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49638      C_O_FLAG_HIGHEST="-O2"
49639      C_O_FLAG_HI="-O1"
49640      C_O_FLAG_NORM="-O1"
49641      C_O_FLAG_DEBUG="-Od"
49642      C_O_FLAG_DEBUG_JVM=""
49643      C_O_FLAG_NONE="-Od"
49644      C_O_FLAG_SIZE="-Os"
49645    fi
49646    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49647    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49648    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49649    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49650    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49651    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49652    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49653    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49654  fi
49655
49656  # Adjust optimization flags according to debug level.
49657  case $DEBUG_LEVEL in
49658    release )
49659      # no adjustment
49660      ;;
49661    fastdebug )
49662      # Not quite so much optimization
49663      C_O_FLAG_HI="$C_O_FLAG_NORM"
49664      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49665      ;;
49666    slowdebug )
49667      # Disable optimization
49668      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49669      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49670      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49671      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49672      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49673      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49674      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49675      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49676      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49677      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49678      ;;
49679  esac
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699  # Special extras...
49700  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49701    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49702      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49703      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49704    fi
49705    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49706    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49707  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49708    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49709    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49710  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49711    CXXSTD_CXXFLAG="-std=gnu++98"
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754    # Execute function body
49755
49756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49757$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49758  supports=yes
49759
49760  saved_cxxflags="$CXXFLAGS"
49761  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49762  ac_ext=cpp
49763ac_cpp='$CXXCPP $CPPFLAGS'
49764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49767
49768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49769/* end confdefs.h.  */
49770int i;
49771_ACEOF
49772if ac_fn_cxx_try_compile "$LINENO"; then :
49773
49774else
49775  supports=no
49776fi
49777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49778  ac_ext=cpp
49779ac_cpp='$CXXCPP $CPPFLAGS'
49780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49783
49784  CXXFLAGS="$saved_cxxflags"
49785
49786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49787$as_echo "$supports" >&6; }
49788  if test "x$supports" = "xyes" ; then
49789    :
49790
49791  else
49792    :
49793    CXXSTD_CXXFLAG=""
49794  fi
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49808
49809  fi
49810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49812    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49813    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49814    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49815    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49816  fi
49817
49818  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49819    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49820    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49821    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49822  fi
49823
49824  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49825  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49826  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49827
49828  ###############################################################################
49829  #
49830  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49831  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49832  #
49833
49834  # Setup compiler/platform specific flags into
49835  #    CFLAGS_JDK    - C Compiler flags
49836  #    CXXFLAGS_JDK  - C++ Compiler flags
49837  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49838  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49839    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49840    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49841    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49842    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49843      # Force compatibility with i586 on 32 bit intel platforms.
49844      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49845      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49846    fi
49847    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49848        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49849    case $OPENJDK_TARGET_CPU_ARCH in
49850      arm )
49851        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49852        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49853        ;;
49854      ppc )
49855        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49856        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49857        ;;
49858      * )
49859        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49860        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49861        ;;
49862    esac
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917    # Execute function body
49918
49919  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49920  REFERENCE_VERSION=6
49921
49922  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49923    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49924  fi
49925
49926  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49927    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49928  fi
49929
49930  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49931  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49932
49933  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49934    :
49935
49936  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49937  # runs afoul of the more aggressive versions of these optimisations.
49938  # Notably, value range propagation now assumes that the this pointer of C++
49939  # member functions is non-null.
49940  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983    # Execute function body
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032    # Execute function body
50033
50034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50035$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50036  supports=yes
50037
50038  saved_cflags="$CFLAGS"
50039  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50040  ac_ext=c
50041ac_cpp='$CPP $CPPFLAGS'
50042ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50043ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50044ac_compiler_gnu=$ac_cv_c_compiler_gnu
50045
50046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50047/* end confdefs.h.  */
50048int i;
50049_ACEOF
50050if ac_fn_c_try_compile "$LINENO"; then :
50051
50052else
50053  supports=no
50054fi
50055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50056  ac_ext=cpp
50057ac_cpp='$CXXCPP $CPPFLAGS'
50058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50061
50062  CFLAGS="$saved_cflags"
50063
50064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50065$as_echo "$supports" >&6; }
50066  if test "x$supports" = "xyes" ; then
50067    :
50068    C_COMP_SUPPORTS="yes"
50069  else
50070    :
50071    C_COMP_SUPPORTS="no"
50072  fi
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
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    # Execute function body
50133
50134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50135$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50136  supports=yes
50137
50138  saved_cxxflags="$CXXFLAGS"
50139  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50140  ac_ext=cpp
50141ac_cpp='$CXXCPP $CPPFLAGS'
50142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50145
50146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50147/* end confdefs.h.  */
50148int i;
50149_ACEOF
50150if ac_fn_cxx_try_compile "$LINENO"; then :
50151
50152else
50153  supports=no
50154fi
50155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50156  ac_ext=cpp
50157ac_cpp='$CXXCPP $CPPFLAGS'
50158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50161
50162  CXXFLAGS="$saved_cxxflags"
50163
50164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50165$as_echo "$supports" >&6; }
50166  if test "x$supports" = "xyes" ; then
50167    :
50168    CXX_COMP_SUPPORTS="yes"
50169  else
50170    :
50171    CXX_COMP_SUPPORTS="no"
50172  fi
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50187$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50188  supports=no
50189  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50190
50191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50192$as_echo "$supports" >&6; }
50193  if test "x$supports" = "xyes" ; then
50194    :
50195
50196  else
50197    :
50198    NO_NULL_POINTER_CHECK_CFLAG=""
50199  fi
50200
50201
50202
50203
50204
50205
50206
50207  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250    # Execute function body
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299    # Execute function body
50300
50301  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50302$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50303  supports=yes
50304
50305  saved_cflags="$CFLAGS"
50306  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50307  ac_ext=c
50308ac_cpp='$CPP $CPPFLAGS'
50309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50311ac_compiler_gnu=$ac_cv_c_compiler_gnu
50312
50313  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50314/* end confdefs.h.  */
50315int i;
50316_ACEOF
50317if ac_fn_c_try_compile "$LINENO"; then :
50318
50319else
50320  supports=no
50321fi
50322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50323  ac_ext=cpp
50324ac_cpp='$CXXCPP $CPPFLAGS'
50325ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50326ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50327ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50328
50329  CFLAGS="$saved_cflags"
50330
50331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50332$as_echo "$supports" >&6; }
50333  if test "x$supports" = "xyes" ; then
50334    :
50335    C_COMP_SUPPORTS="yes"
50336  else
50337    :
50338    C_COMP_SUPPORTS="no"
50339  fi
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399    # Execute function body
50400
50401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50402$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50403  supports=yes
50404
50405  saved_cxxflags="$CXXFLAGS"
50406  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50407  ac_ext=cpp
50408ac_cpp='$CXXCPP $CPPFLAGS'
50409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50412
50413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50414/* end confdefs.h.  */
50415int i;
50416_ACEOF
50417if ac_fn_cxx_try_compile "$LINENO"; then :
50418
50419else
50420  supports=no
50421fi
50422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50423  ac_ext=cpp
50424ac_cpp='$CXXCPP $CPPFLAGS'
50425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50428
50429  CXXFLAGS="$saved_cxxflags"
50430
50431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50432$as_echo "$supports" >&6; }
50433  if test "x$supports" = "xyes" ; then
50434    :
50435    CXX_COMP_SUPPORTS="yes"
50436  else
50437    :
50438    CXX_COMP_SUPPORTS="no"
50439  fi
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50454$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50455  supports=no
50456  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50457
50458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50459$as_echo "$supports" >&6; }
50460  if test "x$supports" = "xyes" ; then
50461    :
50462
50463  else
50464    :
50465    NO_LIFETIME_DSE_CFLAG=""
50466  fi
50467
50468
50469
50470
50471
50472
50473  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50474
50475
50476
50477  else
50478    :
50479
50480  fi
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50496    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50497
50498    # Restrict the debug information created by Clang to avoid
50499    # too big object files and speed the build up a little bit
50500    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50501    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50502    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50503      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50504        # Force compatibility with i586 on 32 bit intel platforms.
50505        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50506        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50507      fi
50508      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50509      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50510          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50511      case $OPENJDK_TARGET_CPU_ARCH in
50512        ppc )
50513          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50514          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50515          ;;
50516        * )
50517          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50518          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50519          ;;
50520      esac
50521    fi
50522  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50523    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50524    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50525    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50526      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50527    fi
50528
50529    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50530    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50531  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50532    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50533    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50534    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50535  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50536    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50537        -MD -Zc:wchar_t- -W3 -wd4800 \
50538        -DWIN32_LEAN_AND_MEAN \
50539        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50540        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50541        -DWIN32 -DIAL"
50542    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50543      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50544    else
50545      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50546    fi
50547    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50548    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50549    # studio.
50550    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50551      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50552      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50553      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50554    fi
50555  fi
50556
50557  ###############################################################################
50558
50559  # Adjust flags according to debug level.
50560  case $DEBUG_LEVEL in
50561    fastdebug | slowdebug )
50562      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50563      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50564      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50565      ;;
50566    release )
50567      ;;
50568    * )
50569      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50570      ;;
50571  esac
50572
50573  # Set some common defines. These works for all compilers, but assume
50574  # -D is universally accepted.
50575
50576  # Setup endianness
50577  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50578    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50579    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50580    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50581    #   Note: -Dmacro         is the same as    #define macro 1
50582    #         -Dmacro=        is the same as    #define macro
50583    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50584      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50585    else
50586      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50587    fi
50588  else
50589    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50590    # are defined in the system?
50591    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50592      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50593    else
50594      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50595    fi
50596  fi
50597
50598  # Setup target OS define. Use OS target name but in upper case.
50599  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50600  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50601
50602  # Setup target CPU
50603  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50604      $OPENJDK_TARGET_ADD_LP64 \
50605      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50606
50607  # Setup debug/release defines
50608  if test "x$DEBUG_LEVEL" = xrelease; then
50609    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50610    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50611      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50612    fi
50613  else
50614    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50615  fi
50616
50617  # Set some additional per-OS defines.
50618  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50619    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50620    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50621        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50622  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50623    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50624    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50625        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50626  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50627    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50628    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50629    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50630    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50631        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50632        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50633        -fno-omit-frame-pointer"
50634  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50635    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50636    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50637    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50638        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50639        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50640  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50641    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50642  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50643    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50644    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50645  fi
50646
50647  # Set some additional per-CPU defines.
50648  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50649    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50650  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50651    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50652  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50653    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50654      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50655      # fixes `relocation truncated to fit' error for gcc 4.1.
50656      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50657      # Use ppc64 instructions, but schedule for power5
50658      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50659    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50660      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50661    fi
50662  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50663    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50664      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50665      # Little endian machine uses ELFv2 ABI.
50666      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50667      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50668      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50669    fi
50670  fi
50671
50672  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50673    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50674  fi
50675
50676  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50677    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50678      # Solaris does not have _LP64=1 in the old build.
50679      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50680      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50681    fi
50682  fi
50683
50684  # Set JVM_CFLAGS warning handling
50685  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50686    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50687        -Wunused-value -Woverloaded-virtual"
50688
50689    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744    # Execute function body
50745
50746  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50747  REFERENCE_VERSION=4.8
50748
50749  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50750    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50751  fi
50752
50753  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50754    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50755  fi
50756
50757  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50758  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50759
50760  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50761    :
50762
50763            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50764            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50765
50766
50767  else
50768    :
50769
50770  fi
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785    fi
50786    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50787      # Non-zero builds have stricter warnings
50788      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50789    else
50790      if test "x$TOOLCHAIN_TYPE" = xclang; then
50791        # Some versions of llvm do not like -Wundef
50792        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50793      fi
50794    fi
50795  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50796    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50797        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50798  fi
50799
50800  # Additional macosx handling
50801  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50802    # Setting these parameters makes it an error to link to macosx APIs that are
50803    # newer than the given OS version and makes the linked binaries compatible
50804    # even if built on a newer version of the OS.
50805    # The expected format is X.Y.Z
50806    MACOSX_VERSION_MIN=10.7.0
50807
50808
50809    # The macro takes the version with no dots, ex: 1070
50810    # Let the flags variables get resolved in make for easier override on make
50811    # command line.
50812    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50813    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50814  fi
50815
50816  # Setup some hard coded includes
50817  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50818      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50819      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50820      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50821      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50822      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50823
50824  # The shared libraries are compiled using the picflag.
50825  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50826      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50827  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50828      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50829
50830  # Executable flags
50831  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50832  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50833
50834
50835
50836
50837
50838
50839  # Setup LDFLAGS et al.
50840  #
50841
50842  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50843    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50844    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50845    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50846    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50847      LDFLAGS_SAFESH="-safeseh"
50848      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50849      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50850      # NOTE: Old build added -machine. Probably not needed.
50851      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50852    else
50853      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50854    fi
50855  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50856      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50857      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50858        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50859        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50860    fi
50861  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50862    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50863    # We have previously set HAS_GNU_HASH if this is the case
50864    if test -n "$HAS_GNU_HASH"; then
50865      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50866      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50867      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50868    fi
50869      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50870        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50871    fi
50872    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50873      # And since we now know that the linker is gnu, then add -z defs, to forbid
50874      # undefined symbols in object files.
50875      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50876      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50877      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50878      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50879      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50880      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50881        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50882      fi
50883      case $DEBUG_LEVEL in
50884        release )
50885          # tell linker to optimize libraries.
50886          # Should this be supplied to the OSS linker as well?
50887          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50888          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50889          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50890          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50891            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50892          fi
50893          ;;
50894        slowdebug )
50895          # Hotspot always let the linker optimize
50896          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50897          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50898            # do relocations at load
50899            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50900            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50901            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50902          fi
50903          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50904            # mark relocations read only
50905            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50906            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50907            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50908          fi
50909          ;;
50910        fastdebug )
50911          # Hotspot always let the linker optimize
50912          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50913          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50914            # mark relocations read only
50915            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50916            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50917            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50918          fi
50919          ;;
50920        * )
50921          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50922          ;;
50923        esac
50924    fi
50925  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50926    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50927    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50928    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50929    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50930    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50931    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50932      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50933    fi
50934  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50935    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50936    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50937    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50938  fi
50939
50940  # Customize LDFLAGS for executables
50941
50942  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50943
50944  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50945    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50946      LDFLAGS_STACK_SIZE=1048576
50947    else
50948      LDFLAGS_STACK_SIZE=327680
50949    fi
50950    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50951  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50952    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50953  fi
50954
50955  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50956
50957  # Customize LDFLAGS for libs
50958  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50959
50960  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50961  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50962    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50963        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50964    JDKLIB_LIBS=""
50965  else
50966    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50967        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50968
50969    if test "xTARGET" = "xTARGET"; then
50970    # On some platforms (mac) the linker warns about non existing -L dirs.
50971    # Add server first if available. Linking aginst client does not always produce the same results.
50972      # Only add client/minimal dir if client/minimal is being built.
50973    # Default to server for other variants.
50974      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50975        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50976      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50977        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50978      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50979        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50980    else
50981        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50982    fi
50983    elif test "xTARGET" = "xBUILD"; then
50984      # When building a buildjdk, it's always only the server variant
50985      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50986          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50987    fi
50988
50989    JDKLIB_LIBS="-ljava -ljvm"
50990    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50991      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50992    fi
50993
50994  fi
50995
50996  # Set JVM_LIBS (per os)
50997  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50998    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50999  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51000    # FIXME: This hard-coded path is not really proper.
51001    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51002      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51003    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51004      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51005    fi
51006    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51007        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51008  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51009    JVM_LIBS="$JVM_LIBS -lm"
51010  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51011    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51012  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51013    JVM_LIBS="$JVM_LIBS -lm"
51014  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51015    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51016        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51017        wsock32.lib winmm.lib version.lib psapi.lib"
51018    fi
51019
51020  # Set JVM_ASFLAGS
51021  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51022    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51023      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51024    fi
51025  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51026    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51027  fi
51028
51029  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045  # Special extras...
51046  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51047    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51048      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51049      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51050    fi
51051    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51052    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51053  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51054    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51055    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51056  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51057    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100    # Execute function body
51101
51102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51103$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51104  supports=yes
51105
51106  saved_cxxflags="$CXXFLAGS"
51107  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51108  ac_ext=cpp
51109ac_cpp='$CXXCPP $CPPFLAGS'
51110ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51111ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51112ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51113
51114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51115/* end confdefs.h.  */
51116int i;
51117_ACEOF
51118if ac_fn_cxx_try_compile "$LINENO"; then :
51119
51120else
51121  supports=no
51122fi
51123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51124  ac_ext=cpp
51125ac_cpp='$CXXCPP $CPPFLAGS'
51126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51129
51130  CXXFLAGS="$saved_cxxflags"
51131
51132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51133$as_echo "$supports" >&6; }
51134  if test "x$supports" = "xyes" ; then
51135    :
51136
51137  else
51138    :
51139    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51140  fi
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51154
51155  fi
51156  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51157    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51158    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51159    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51160    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51161    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51162  fi
51163
51164  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51165    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51166    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51167    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51168  fi
51169
51170  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51171  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51172  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51173
51174  ###############################################################################
51175  #
51176  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51177  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51178  #
51179
51180  # Setup compiler/platform specific flags into
51181  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51182  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51183  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51184  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51185    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51186    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51187    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51188    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51189      # Force compatibility with i586 on 32 bit intel platforms.
51190      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51191      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51192    fi
51193    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51194        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51195    case $OPENJDK_BUILD_CPU_ARCH in
51196      arm )
51197        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51198        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51199        ;;
51200      ppc )
51201        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51202        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51203        ;;
51204      * )
51205        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51206        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51207        ;;
51208    esac
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263    # Execute function body
51264
51265  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51266  REFERENCE_VERSION=6
51267
51268  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51269    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51270  fi
51271
51272  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51273    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51274  fi
51275
51276  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51277  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51278
51279  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51280    :
51281
51282  else
51283    :
51284
51285  fi
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51301    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51302
51303    # Restrict the debug information created by Clang to avoid
51304    # too big object files and speed the build up a little bit
51305    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51306    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51307    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51308      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51309        # Force compatibility with i586 on 32 bit intel platforms.
51310        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51311        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51312      fi
51313      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51314      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51315          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51316      case $OPENJDK_BUILD_CPU_ARCH in
51317        ppc )
51318          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51319          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51320          ;;
51321        * )
51322          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51323          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51324          ;;
51325      esac
51326    fi
51327  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51328    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51329    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51330    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51331      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51332    fi
51333
51334    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51335    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51336  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51337    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51338    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51339    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51340  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51341    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51342        -MD -Zc:wchar_t- -W3 -wd4800 \
51343        -DWIN32_LEAN_AND_MEAN \
51344        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51345        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51346        -DWIN32 -DIAL"
51347    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51348      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51349    else
51350      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51351    fi
51352    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51353    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51354    # studio.
51355    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51356      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51357      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51358      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51359    fi
51360  fi
51361
51362  ###############################################################################
51363
51364  # Adjust flags according to debug level.
51365  case $DEBUG_LEVEL in
51366    fastdebug | slowdebug )
51367      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51368      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51369      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51370      ;;
51371    release )
51372      ;;
51373    * )
51374      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51375      ;;
51376  esac
51377
51378  # Set some common defines. These works for all compilers, but assume
51379  # -D is universally accepted.
51380
51381  # Setup endianness
51382  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51383    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51384    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51385    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51386    #   Note: -Dmacro         is the same as    #define macro 1
51387    #         -Dmacro=        is the same as    #define macro
51388    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51389      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51390    else
51391      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51392    fi
51393  else
51394    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51395    # are defined in the system?
51396    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51397      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51398    else
51399      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51400    fi
51401  fi
51402
51403  # Setup target OS define. Use OS target name but in upper case.
51404  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51405  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51406
51407  # Setup target CPU
51408  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51409      $OPENJDK_BUILD_ADD_LP64 \
51410      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51411
51412  # Setup debug/release defines
51413  if test "x$DEBUG_LEVEL" = xrelease; then
51414    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51415    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51416      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51417    fi
51418  else
51419    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51420  fi
51421
51422  # Set some additional per-OS defines.
51423  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51424    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51425    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51426        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51427  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51428    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51429    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51430        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51431  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51432    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51433    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51434    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51435    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51436        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51437        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51438        -fno-omit-frame-pointer"
51439  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51440    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51441    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51442    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
51443        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51444        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51445  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51446    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51447  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51448    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51449    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51450  fi
51451
51452  # Set some additional per-CPU defines.
51453  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51454    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51455  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51456    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51457  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51458    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51459      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51460      # fixes `relocation truncated to fit' error for gcc 4.1.
51461      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51462      # Use ppc64 instructions, but schedule for power5
51463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51464    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51465      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51466    fi
51467  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51468    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51469      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51470      # Little endian machine uses ELFv2 ABI.
51471      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51472      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51473      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51474    fi
51475  fi
51476
51477  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51478    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51479  fi
51480
51481  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51482    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51483      # Solaris does not have _LP64=1 in the old build.
51484      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51485      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51486    fi
51487  fi
51488
51489  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51490  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51491    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51492        -Wunused-value -Woverloaded-virtual"
51493
51494    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549    # Execute function body
51550
51551  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51552  REFERENCE_VERSION=4.8
51553
51554  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51555    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51556  fi
51557
51558  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51559    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51560  fi
51561
51562  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51563  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51564
51565  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51566    :
51567
51568            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51569            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51570
51571
51572  else
51573    :
51574
51575  fi
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590    fi
51591    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51592      # Non-zero builds have stricter warnings
51593      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51594    else
51595      if test "x$TOOLCHAIN_TYPE" = xclang; then
51596        # Some versions of llvm do not like -Wundef
51597        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51598      fi
51599    fi
51600  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51601    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51602        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51603  fi
51604
51605  # Additional macosx handling
51606  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51607    # Setting these parameters makes it an error to link to macosx APIs that are
51608    # newer than the given OS version and makes the linked binaries compatible
51609    # even if built on a newer version of the OS.
51610    # The expected format is X.Y.Z
51611    MACOSX_VERSION_MIN=10.7.0
51612
51613
51614    # The macro takes the version with no dots, ex: 1070
51615    # Let the flags variables get resolved in make for easier override on make
51616    # command line.
51617    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)"
51618    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51619  fi
51620
51621  # Setup some hard coded includes
51622  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51623      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51624      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51625      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51626      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51627      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51628
51629  # The shared libraries are compiled using the picflag.
51630  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51631      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51632  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51633      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51634
51635  # Executable flags
51636  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51637  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51638
51639
51640
51641
51642
51643
51644  # Setup LDFLAGS et al.
51645  #
51646
51647  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51648    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51649    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51650    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51651    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51652      LDFLAGS_SAFESH="-safeseh"
51653      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51654      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51655      # NOTE: Old build added -machine. Probably not needed.
51656      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51657    else
51658      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51659    fi
51660  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51661      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51662      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51663        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51664        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51665    fi
51666  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51667    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51668    # We have previously set HAS_GNU_HASH if this is the case
51669    if test -n "$HAS_GNU_HASH"; then
51670      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51671      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51672      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51673    fi
51674      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51675        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51676    fi
51677    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51678      # And since we now know that the linker is gnu, then add -z defs, to forbid
51679      # undefined symbols in object files.
51680      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51681      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51682      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51683      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51684      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51685      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51686        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51687      fi
51688      case $DEBUG_LEVEL in
51689        release )
51690          # tell linker to optimize libraries.
51691          # Should this be supplied to the OSS linker as well?
51692          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51693          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51694          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51695          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51696            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51697          fi
51698          ;;
51699        slowdebug )
51700          # Hotspot always let the linker optimize
51701          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51702          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51703            # do relocations at load
51704            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51705            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51706            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51707          fi
51708          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51709            # mark relocations read only
51710            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51711            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51712            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51713          fi
51714          ;;
51715        fastdebug )
51716          # Hotspot always let the linker optimize
51717          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51718          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51719            # mark relocations read only
51720            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51721            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51722            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51723          fi
51724          ;;
51725        * )
51726          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51727          ;;
51728        esac
51729    fi
51730  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51731    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51732    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51733    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51734    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51735    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51736    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51737      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51738    fi
51739  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51740    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51741    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51742    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51743  fi
51744
51745  # Customize LDFLAGS for executables
51746
51747  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51748
51749  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51750    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51751      LDFLAGS_STACK_SIZE=1048576
51752    else
51753      LDFLAGS_STACK_SIZE=327680
51754    fi
51755    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51756  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51757    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51758  fi
51759
51760  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51761
51762  # Customize LDFLAGS for libs
51763  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51764
51765  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51766  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51767    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51768        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51769    OPENJDK_BUILD_JDKLIB_LIBS=""
51770  else
51771    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51772        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51773
51774    if test "xBUILD" = "xTARGET"; then
51775    # On some platforms (mac) the linker warns about non existing -L dirs.
51776    # Add server first if available. Linking aginst client does not always produce the same results.
51777      # Only add client/minimal dir if client/minimal is being built.
51778    # Default to server for other variants.
51779      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51780        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51781      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51782        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51783      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51784        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51785    else
51786        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51787    fi
51788    elif test "xBUILD" = "xBUILD"; then
51789      # When building a buildjdk, it's always only the server variant
51790      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51791          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51792    fi
51793
51794    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51795    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51796      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51797    fi
51798
51799  fi
51800
51801  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51802  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51803    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51804  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51805    # FIXME: This hard-coded path is not really proper.
51806    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51807      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51808    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51809      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51810    fi
51811    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51812        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51813  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51814    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51815  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51816    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51817  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51818    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51819  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51820    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51821        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51822        wsock32.lib winmm.lib version.lib psapi.lib"
51823    fi
51824
51825  # Set OPENJDK_BUILD_JVM_ASFLAGS
51826  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51827    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51828      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51829    fi
51830  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51831    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51832  fi
51833
51834  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850  # Tests are only ever compiled for TARGET
51851  # Flags for compiling test libraries
51852  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51853  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51854
51855  # Flags for compiling test executables
51856  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51857  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51858
51859
51860
51861
51862
51863
51864  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51865  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51866
51867
51868
51869
51870
51871
51872  # Some Zero and Shark settings.
51873  # ZERO_ARCHFLAG tells the compiler which mode to build for
51874  case "${OPENJDK_TARGET_CPU}" in
51875    s390)
51876      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51877      ;;
51878    *)
51879      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51880  esac
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923    # Execute function body
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972    # Execute function body
51973
51974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51975$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51976  supports=yes
51977
51978  saved_cflags="$CFLAGS"
51979  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51980  ac_ext=c
51981ac_cpp='$CPP $CPPFLAGS'
51982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51984ac_compiler_gnu=$ac_cv_c_compiler_gnu
51985
51986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51987/* end confdefs.h.  */
51988int i;
51989_ACEOF
51990if ac_fn_c_try_compile "$LINENO"; then :
51991
51992else
51993  supports=no
51994fi
51995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51996  ac_ext=cpp
51997ac_cpp='$CXXCPP $CPPFLAGS'
51998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52001
52002  CFLAGS="$saved_cflags"
52003
52004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52005$as_echo "$supports" >&6; }
52006  if test "x$supports" = "xyes" ; then
52007    :
52008    C_COMP_SUPPORTS="yes"
52009  else
52010    :
52011    C_COMP_SUPPORTS="no"
52012  fi
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072    # Execute function body
52073
52074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52075$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52076  supports=yes
52077
52078  saved_cxxflags="$CXXFLAGS"
52079  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52080  ac_ext=cpp
52081ac_cpp='$CXXCPP $CPPFLAGS'
52082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52085
52086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52087/* end confdefs.h.  */
52088int i;
52089_ACEOF
52090if ac_fn_cxx_try_compile "$LINENO"; then :
52091
52092else
52093  supports=no
52094fi
52095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52096  ac_ext=cpp
52097ac_cpp='$CXXCPP $CPPFLAGS'
52098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52101
52102  CXXFLAGS="$saved_cxxflags"
52103
52104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52105$as_echo "$supports" >&6; }
52106  if test "x$supports" = "xyes" ; then
52107    :
52108    CXX_COMP_SUPPORTS="yes"
52109  else
52110    :
52111    CXX_COMP_SUPPORTS="no"
52112  fi
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52127$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52128  supports=no
52129  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52130
52131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52132$as_echo "$supports" >&6; }
52133  if test "x$supports" = "xyes" ; then
52134    :
52135
52136  else
52137    :
52138    ZERO_ARCHFLAG=""
52139  fi
52140
52141
52142
52143
52144
52145
52146
52147
52148  # Check that the compiler supports -mX (or -qX on AIX) flags
52149  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197    # Execute function body
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
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246    # Execute function body
52247
52248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52249$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52250  supports=yes
52251
52252  saved_cflags="$CFLAGS"
52253  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52254  ac_ext=c
52255ac_cpp='$CPP $CPPFLAGS'
52256ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52258ac_compiler_gnu=$ac_cv_c_compiler_gnu
52259
52260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52261/* end confdefs.h.  */
52262int i;
52263_ACEOF
52264if ac_fn_c_try_compile "$LINENO"; then :
52265
52266else
52267  supports=no
52268fi
52269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52270  ac_ext=cpp
52271ac_cpp='$CXXCPP $CPPFLAGS'
52272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52275
52276  CFLAGS="$saved_cflags"
52277
52278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52279$as_echo "$supports" >&6; }
52280  if test "x$supports" = "xyes" ; then
52281    :
52282    C_COMP_SUPPORTS="yes"
52283  else
52284    :
52285    C_COMP_SUPPORTS="no"
52286  fi
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346    # Execute function body
52347
52348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52349$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52350  supports=yes
52351
52352  saved_cxxflags="$CXXFLAGS"
52353  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52354  ac_ext=cpp
52355ac_cpp='$CXXCPP $CPPFLAGS'
52356ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52357ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52358ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52359
52360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52361/* end confdefs.h.  */
52362int i;
52363_ACEOF
52364if ac_fn_cxx_try_compile "$LINENO"; then :
52365
52366else
52367  supports=no
52368fi
52369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52370  ac_ext=cpp
52371ac_cpp='$CXXCPP $CPPFLAGS'
52372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52375
52376  CXXFLAGS="$saved_cxxflags"
52377
52378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52379$as_echo "$supports" >&6; }
52380  if test "x$supports" = "xyes" ; then
52381    :
52382    CXX_COMP_SUPPORTS="yes"
52383  else
52384    :
52385    CXX_COMP_SUPPORTS="no"
52386  fi
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52401$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52402  supports=no
52403  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52404
52405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52406$as_echo "$supports" >&6; }
52407  if test "x$supports" = "xyes" ; then
52408    :
52409    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52410  else
52411    :
52412    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52413  fi
52414
52415
52416
52417
52418
52419
52420
52421
52422  # Check whether --enable-warnings-as-errors was given.
52423if test "${enable_warnings_as_errors+set}" = set; then :
52424  enableval=$enable_warnings_as_errors;
52425fi
52426
52427
52428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52429$as_echo_n "checking if native warnings are errors... " >&6; }
52430  if test "x$enable_warnings_as_errors" = "xyes"; then
52431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52432$as_echo "yes (explicitely set)" >&6; }
52433    WARNINGS_AS_ERRORS=true
52434  elif test "x$enable_warnings_as_errors" = "xno"; then
52435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52436$as_echo "no" >&6; }
52437    WARNINGS_AS_ERRORS=false
52438  elif test "x$enable_warnings_as_errors" = "x"; then
52439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52440$as_echo "yes (default)" >&6; }
52441    WARNINGS_AS_ERRORS=true
52442  else
52443    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52444  fi
52445
52446  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52447    # Set legacy hotspot variable
52448    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52449  else
52450    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52451  fi
52452
52453
52454
52455
52456  case "${TOOLCHAIN_TYPE}" in
52457    microsoft)
52458      DISABLE_WARNING_PREFIX="-wd"
52459      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52460      ;;
52461    solstudio)
52462      DISABLE_WARNING_PREFIX="-erroff="
52463      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52464      ;;
52465    gcc)
52466      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514    # Execute function body
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563    # Execute function body
52564
52565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52566$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52567  supports=yes
52568
52569  saved_cflags="$CFLAGS"
52570  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52571  ac_ext=c
52572ac_cpp='$CPP $CPPFLAGS'
52573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52575ac_compiler_gnu=$ac_cv_c_compiler_gnu
52576
52577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52578/* end confdefs.h.  */
52579int i;
52580_ACEOF
52581if ac_fn_c_try_compile "$LINENO"; then :
52582
52583else
52584  supports=no
52585fi
52586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52587  ac_ext=cpp
52588ac_cpp='$CXXCPP $CPPFLAGS'
52589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52592
52593  CFLAGS="$saved_cflags"
52594
52595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52596$as_echo "$supports" >&6; }
52597  if test "x$supports" = "xyes" ; then
52598    :
52599    C_COMP_SUPPORTS="yes"
52600  else
52601    :
52602    C_COMP_SUPPORTS="no"
52603  fi
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663    # Execute function body
52664
52665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52666$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52667  supports=yes
52668
52669  saved_cxxflags="$CXXFLAGS"
52670  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52671  ac_ext=cpp
52672ac_cpp='$CXXCPP $CPPFLAGS'
52673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52676
52677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52678/* end confdefs.h.  */
52679int i;
52680_ACEOF
52681if ac_fn_cxx_try_compile "$LINENO"; then :
52682
52683else
52684  supports=no
52685fi
52686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52687  ac_ext=cpp
52688ac_cpp='$CXXCPP $CPPFLAGS'
52689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52692
52693  CXXFLAGS="$saved_cxxflags"
52694
52695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52696$as_echo "$supports" >&6; }
52697  if test "x$supports" = "xyes" ; then
52698    :
52699    CXX_COMP_SUPPORTS="yes"
52700  else
52701    :
52702    CXX_COMP_SUPPORTS="no"
52703  fi
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52718$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52719  supports=no
52720  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52721
52722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52723$as_echo "$supports" >&6; }
52724  if test "x$supports" = "xyes" ; then
52725    :
52726    GCC_CAN_DISABLE_WARNINGS=true
52727  else
52728    :
52729    GCC_CAN_DISABLE_WARNINGS=false
52730
52731  fi
52732
52733
52734
52735
52736
52737
52738      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52739        DISABLE_WARNING_PREFIX="-Wno-"
52740      else
52741        DISABLE_WARNING_PREFIX=
52742      fi
52743      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52744      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52745      # CFLAGS since any target specific flags will likely not work with the
52746      # build compiler
52747      CC_OLD="$CC"
52748      CXX_OLD="$CXX"
52749      CC="$BUILD_CC"
52750      CXX="$BUILD_CXX"
52751      CFLAGS_OLD="$CFLAGS"
52752      CFLAGS=""
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800    # Execute function body
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849    # Execute function body
52850
52851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52852$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52853  supports=yes
52854
52855  saved_cflags="$CFLAGS"
52856  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52857  ac_ext=c
52858ac_cpp='$CPP $CPPFLAGS'
52859ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52860ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52861ac_compiler_gnu=$ac_cv_c_compiler_gnu
52862
52863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52864/* end confdefs.h.  */
52865int i;
52866_ACEOF
52867if ac_fn_c_try_compile "$LINENO"; then :
52868
52869else
52870  supports=no
52871fi
52872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52873  ac_ext=cpp
52874ac_cpp='$CXXCPP $CPPFLAGS'
52875ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52876ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52877ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52878
52879  CFLAGS="$saved_cflags"
52880
52881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52882$as_echo "$supports" >&6; }
52883  if test "x$supports" = "xyes" ; then
52884    :
52885    C_COMP_SUPPORTS="yes"
52886  else
52887    :
52888    C_COMP_SUPPORTS="no"
52889  fi
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949    # Execute function body
52950
52951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52952$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52953  supports=yes
52954
52955  saved_cxxflags="$CXXFLAGS"
52956  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52957  ac_ext=cpp
52958ac_cpp='$CXXCPP $CPPFLAGS'
52959ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52960ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52961ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52962
52963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52964/* end confdefs.h.  */
52965int i;
52966_ACEOF
52967if ac_fn_cxx_try_compile "$LINENO"; then :
52968
52969else
52970  supports=no
52971fi
52972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52973  ac_ext=cpp
52974ac_cpp='$CXXCPP $CPPFLAGS'
52975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52978
52979  CXXFLAGS="$saved_cxxflags"
52980
52981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52982$as_echo "$supports" >&6; }
52983  if test "x$supports" = "xyes" ; then
52984    :
52985    CXX_COMP_SUPPORTS="yes"
52986  else
52987    :
52988    CXX_COMP_SUPPORTS="no"
52989  fi
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53004$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53005  supports=no
53006  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53007
53008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53009$as_echo "$supports" >&6; }
53010  if test "x$supports" = "xyes" ; then
53011    :
53012    BUILD_CC_CAN_DISABLE_WARNINGS=true
53013  else
53014    :
53015    BUILD_CC_CAN_DISABLE_WARNINGS=false
53016
53017  fi
53018
53019
53020
53021
53022
53023
53024      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53025        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53026      else
53027        BUILD_CC_DISABLE_WARNING_PREFIX=
53028      fi
53029      CC="$CC_OLD"
53030      CXX="$CXX_OLD"
53031      CFLAGS="$CFLAGS_OLD"
53032      ;;
53033    clang)
53034      DISABLE_WARNING_PREFIX="-Wno-"
53035      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53036      ;;
53037    xlc)
53038      DISABLE_WARNING_PREFIX="-qsuppress="
53039      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53040      ;;
53041  esac
53042
53043
53044
53045
53046
53047# Setup debug symbols (need objcopy from the toolchain for that)
53048
53049  #
53050  # NATIVE_DEBUG_SYMBOLS
53051  # This must be done after the toolchain is setup, since we're looking at objcopy.
53052  #
53053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53054$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53055
53056# Check whether --with-native-debug-symbols was given.
53057if test "${with_native_debug_symbols+set}" = set; then :
53058  withval=$with_native_debug_symbols;
53059        if test "x$OPENJDK_TARGET_OS" = xaix; then
53060          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53061            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53062          fi
53063        fi
53064
53065else
53066
53067        if test "x$OPENJDK_TARGET_OS" = xaix; then
53068          # AIX doesn't support 'zipped' so use 'internal' as default
53069          with_native_debug_symbols="internal"
53070        else
53071          if test "x$STATIC_BUILD" = xtrue; then
53072            with_native_debug_symbols="none"
53073          else
53074            with_native_debug_symbols="zipped"
53075          fi
53076        fi
53077
53078fi
53079
53080  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53082$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53083
53084  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53085
53086    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53087      if test "x$OBJCOPY" = x; then
53088        # enabling of enable-debug-symbols and can't find objcopy
53089        # this is an error
53090        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53091      fi
53092    fi
53093
53094    COMPILE_WITH_DEBUG_SYMBOLS=true
53095    COPY_DEBUG_SYMBOLS=true
53096    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53097
53098    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53099    DEBUG_BINARIES=false
53100    STRIP_POLICY=min_strip
53101
53102  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53103    COMPILE_WITH_DEBUG_SYMBOLS=false
53104    COPY_DEBUG_SYMBOLS=false
53105    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53106
53107    DEBUG_BINARIES=false
53108    STRIP_POLICY=no_strip
53109  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53110    COMPILE_WITH_DEBUG_SYMBOLS=true
53111    COPY_DEBUG_SYMBOLS=false
53112    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53113
53114    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53115    DEBUG_BINARIES=true
53116    STRIP_POLICY=no_strip
53117    STRIP=""
53118
53119  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53120
53121    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53122      if test "x$OBJCOPY" = x; then
53123        # enabling of enable-debug-symbols and can't find objcopy
53124        # this is an error
53125        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53126      fi
53127    fi
53128
53129    COMPILE_WITH_DEBUG_SYMBOLS=true
53130    COPY_DEBUG_SYMBOLS=true
53131    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53132
53133    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53134    DEBUG_BINARIES=false
53135    STRIP_POLICY=min_strip
53136  else
53137    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53138  fi
53139
53140  # --enable-debug-symbols is deprecated.
53141  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53142
53143  # Check whether --enable-debug-symbols was given.
53144if test "${enable_debug_symbols+set}" = set; then :
53145  enableval=$enable_debug_symbols;
53146fi
53147
53148  if test "x$enable_debug_symbols" != x; then
53149    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53150$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53151
53152    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53153      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53154$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53155    fi
53156
53157  fi
53158
53159
53160  # --enable-zip-debug-info is deprecated.
53161  # Please use --with-native-debug-symbols=zipped .
53162
53163  # Check whether --enable-zip-debug-info was given.
53164if test "${enable_zip_debug_info+set}" = set; then :
53165  enableval=$enable_zip_debug_info;
53166fi
53167
53168  if test "x$enable_zip_debug_info" != x; then
53169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53170$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53171
53172    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53173      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53174$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53175    fi
53176
53177  fi
53178
53179
53180
53181
53182
53183
53184  # Legacy values
53185
53186
53187
53188
53189  # Check whether --enable-native-coverage was given.
53190if test "${enable_native_coverage+set}" = set; then :
53191  enableval=$enable_native_coverage;
53192fi
53193
53194  GCOV_ENABLED="false"
53195  if test "x$enable_native_coverage" = "xyes"; then
53196    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53197      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53198$as_echo_n "checking if native coverage is enabled... " >&6; }
53199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53200$as_echo "yes" >&6; }
53201      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53202      GCOV_LDFLAGS="-fprofile-arcs"
53203      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53204      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53205      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53206      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53207      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53208      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53209      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53210      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53211      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53212      GCOV_ENABLED="true"
53213    else
53214      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53215    fi
53216  elif test "x$enable_native_coverage" = "xno"; then
53217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53218$as_echo_n "checking if native coverage is enabled... " >&6; }
53219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53220$as_echo "no" >&6; }
53221  elif test "x$enable_native_coverage" != "x"; then
53222    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53223  fi
53224
53225
53226
53227
53228# Need toolchain to setup dtrace
53229
53230  # Test for dtrace dependencies
53231  # Check whether --enable-dtrace was given.
53232if test "${enable_dtrace+set}" = set; then :
53233  enableval=$enable_dtrace;
53234fi
53235
53236
53237  DTRACE_DEP_MISSING=false
53238
53239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53240$as_echo_n "checking for dtrace tool... " >&6; }
53241  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53243$as_echo "$DTRACE" >&6; }
53244  else
53245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53246$as_echo "not found, cannot build dtrace" >&6; }
53247    DTRACE_DEP_MISSING=true
53248  fi
53249
53250  for ac_header in sys/sdt.h
53251do :
53252  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53253if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53254  cat >>confdefs.h <<_ACEOF
53255#define HAVE_SYS_SDT_H 1
53256_ACEOF
53257 DTRACE_HEADERS_OK=yes
53258else
53259  DTRACE_HEADERS_OK=no
53260fi
53261
53262done
53263
53264  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53265    DTRACE_DEP_MISSING=true
53266  fi
53267
53268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53269$as_echo_n "checking if dtrace should be built... " >&6; }
53270  if test "x$enable_dtrace" = "xyes"; then
53271    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53273$as_echo "no, missing dependencies" >&6; }
53274
53275  # Print a helpful message on how to acquire the necessary build dependency.
53276  # dtrace is the help tag: freetype, cups, alsa etc
53277  MISSING_DEPENDENCY=dtrace
53278
53279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53280    cygwin_help $MISSING_DEPENDENCY
53281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53282    msys_help $MISSING_DEPENDENCY
53283  else
53284    PKGHANDLER_COMMAND=
53285
53286    case $PKGHANDLER in
53287      apt-get)
53288        apt_help     $MISSING_DEPENDENCY ;;
53289      yum)
53290        yum_help     $MISSING_DEPENDENCY ;;
53291      port)
53292        port_help    $MISSING_DEPENDENCY ;;
53293      pkgutil)
53294        pkgutil_help $MISSING_DEPENDENCY ;;
53295      pkgadd)
53296        pkgadd_help  $MISSING_DEPENDENCY ;;
53297    esac
53298
53299    if test "x$PKGHANDLER_COMMAND" != x; then
53300      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53301    fi
53302  fi
53303
53304      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53305    else
53306      INCLUDE_DTRACE=true
53307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53308$as_echo "yes, forced" >&6; }
53309    fi
53310  elif test "x$enable_dtrace" = "xno"; then
53311    INCLUDE_DTRACE=false
53312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53313$as_echo "no, forced" >&6; }
53314  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53315    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
53316      INCLUDE_DTRACE=false
53317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
53318$as_echo "no, non-open linux build" >&6; }
53319    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53320      INCLUDE_DTRACE=false
53321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53322$as_echo "no, missing dependencies" >&6; }
53323    else
53324      INCLUDE_DTRACE=true
53325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53326$as_echo "yes, dependencies present" >&6; }
53327    fi
53328  else
53329    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53330  fi
53331
53332
53333
53334  # The user can in some cases supply additional jvm features. For the custom
53335  # variant, this defines the entire variant.
53336
53337# Check whether --with-jvm-features was given.
53338if test "${with_jvm_features+set}" = set; then :
53339  withval=$with_jvm_features;
53340fi
53341
53342  if test "x$with_jvm_features" != x; then
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53344$as_echo_n "checking additional JVM features... " >&6; }
53345    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53347$as_echo "$JVM_FEATURES" >&6; }
53348  fi
53349
53350  # Verify that dependencies are met for explicitly set features.
53351  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53352    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53353  fi
53354
53355  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53356    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53357  fi
53358
53359  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
53360    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
53361  fi
53362
53363  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53364    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53365  fi
53366
53367  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53368    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53369  fi
53370
53371  # Turn on additional features based on other parts of configure
53372  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53373    JVM_FEATURES="$JVM_FEATURES dtrace"
53374  else
53375    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53376      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53377    fi
53378  fi
53379
53380  if test "x$STATIC_BUILD" = "xtrue"; then
53381    JVM_FEATURES="$JVM_FEATURES static-build"
53382  else
53383    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53384      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53385    fi
53386  fi
53387
53388  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53389    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53390      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53391    fi
53392  fi
53393
53394  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53395    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53396      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53397    fi
53398  fi
53399
53400  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
53401  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53402      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53403      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53404    JVM_FEATURES_jvmci="jvmci"
53405  else
53406    JVM_FEATURES_jvmci=""
53407  fi
53408
53409  # All variants but minimal (and custom) get these features
53410  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53411
53412  # Enable features depending on variant.
53413  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53414  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
53415  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53416  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53417  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53418  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53419  JVM_FEATURES_custom="$JVM_FEATURES"
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429  # Used for verification of Makefiles by check-jvm-feature
53430
53431
53432  # We don't support --with-jvm-interpreter anymore, use zero instead.
53433
53434
53435# Check whether --with-jvm-interpreter was given.
53436if test "${with_jvm_interpreter+set}" = set; then :
53437  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53438$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53439fi
53440
53441
53442
53443
53444  # Check whether --enable-hotspot-gtest was given.
53445if test "${enable_hotspot_gtest+set}" = set; then :
53446  enableval=$enable_hotspot_gtest;
53447fi
53448
53449
53450  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53451    GTEST_DIR_EXISTS="true"
53452  else
53453    GTEST_DIR_EXISTS="false"
53454  fi
53455
53456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53457$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53458  if test "x$enable_hotspot_gtest" = "xyes"; then
53459    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53461$as_echo "yes, forced" >&6; }
53462      BUILD_GTEST="true"
53463    else
53464      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53465    fi
53466  elif test "x$enable_hotspot_gtest" = "xno"; then
53467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53468$as_echo "no, forced" >&6; }
53469    BUILD_GTEST="false"
53470  elif test "x$enable_hotspot_gtest" = "x"; then
53471    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53473$as_echo "yes" >&6; }
53474      BUILD_GTEST="true"
53475    else
53476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53477$as_echo "no" >&6; }
53478      BUILD_GTEST="false"
53479    fi
53480  else
53481    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53482  fi
53483
53484
53485
53486
53487###############################################################################
53488#
53489# Check dependencies for external and internal libraries.
53490#
53491###############################################################################
53492
53493# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53494
53495  # When using cygwin or msys, we need a wrapper binary that renames
53496  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53497  # @files and rewrites these too! This wrapper binary is
53498  # called fixpath.
53499  FIXPATH=
53500  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53502$as_echo_n "checking if fixpath can be created... " >&6; }
53503    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53504    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53505    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53506    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53507      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53508      FIXPATH="$FIXPATH_BIN -c"
53509    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53510      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53511      # @ was chosen as separator to minimize risk of other tools messing around with it
53512      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53513          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53514      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53515      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53516    fi
53517    FIXPATH_SRC_W="$FIXPATH_SRC"
53518    FIXPATH_BIN_W="$FIXPATH_BIN"
53519
53520  unix_path="$FIXPATH_SRC_W"
53521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53522    windows_path=`$CYGPATH -m "$unix_path"`
53523    FIXPATH_SRC_W="$windows_path"
53524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53525    windows_path=`cmd //c echo $unix_path`
53526    FIXPATH_SRC_W="$windows_path"
53527  fi
53528
53529
53530  unix_path="$FIXPATH_BIN_W"
53531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53532    windows_path=`$CYGPATH -m "$unix_path"`
53533    FIXPATH_BIN_W="$windows_path"
53534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53535    windows_path=`cmd //c echo $unix_path`
53536    FIXPATH_BIN_W="$windows_path"
53537  fi
53538
53539    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53540    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53541    cd $FIXPATH_DIR
53542    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53543    cd $CURDIR
53544
53545    if test ! -x $FIXPATH_BIN; then
53546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53547$as_echo "no" >&6; }
53548      cat $FIXPATH_DIR/fixpath1.log
53549      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53550    fi
53551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53552$as_echo "yes" >&6; }
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53554$as_echo_n "checking if fixpath.exe works... " >&6; }
53555    cd $FIXPATH_DIR
53556    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53557        > $FIXPATH_DIR/fixpath2.log 2>&1
53558    cd $CURDIR
53559    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53561$as_echo "no" >&6; }
53562      cat $FIXPATH_DIR/fixpath2.log
53563      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53564    fi
53565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53566$as_echo "yes" >&6; }
53567
53568    FIXPATH_DETACH_FLAG="--detach"
53569  fi
53570
53571
53572
53573
53574
53575
53576  # Check if X11 is needed
53577  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53578    # No X11 support on windows or macosx
53579    NEEDS_LIB_X11=false
53580  else
53581    if test "x$SUPPORT_HEADFUL" = xno; then
53582      # No X11 support if building headless-only
53583      NEEDS_LIB_X11=false
53584    else
53585      # All other instances need X11
53586      NEEDS_LIB_X11=true
53587    fi
53588  fi
53589
53590  # Check if cups is needed
53591  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53592    # Windows have a separate print system
53593    NEEDS_LIB_CUPS=false
53594  else
53595    NEEDS_LIB_CUPS=true
53596  fi
53597
53598  # Check if freetype is needed
53599  if test "x$OPENJDK" = "xtrue"; then
53600    NEEDS_LIB_FREETYPE=true
53601  else
53602    NEEDS_LIB_FREETYPE=false
53603  fi
53604
53605  # Check if alsa is needed
53606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53607    NEEDS_LIB_ALSA=true
53608  else
53609    NEEDS_LIB_ALSA=false
53610  fi
53611
53612  # Check if ffi is needed
53613  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53614    NEEDS_LIB_FFI=true
53615  else
53616    NEEDS_LIB_FFI=false
53617  fi
53618
53619
53620  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53621  # dynamic build is configured on command line.
53622
53623# Check whether --with-stdc++lib was given.
53624if test "${with_stdc__lib+set}" = set; then :
53625  withval=$with_stdc__lib;
53626        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53627                && test "x$with_stdc__lib" != xdefault; then
53628          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53629        fi
53630
53631else
53632  with_stdc__lib=default
53633
53634fi
53635
53636
53637  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53638    # Test if -lstdc++ works.
53639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53640$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53641    ac_ext=cpp
53642ac_cpp='$CXXCPP $CPPFLAGS'
53643ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53644ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53645ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53646
53647    OLD_CXXFLAGS="$CXXFLAGS"
53648    CXXFLAGS="$CXXFLAGS -lstdc++"
53649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53650/* end confdefs.h.  */
53651
53652int
53653main ()
53654{
53655return 0;
53656  ;
53657  return 0;
53658}
53659_ACEOF
53660if ac_fn_cxx_try_link "$LINENO"; then :
53661  has_dynamic_libstdcxx=yes
53662else
53663  has_dynamic_libstdcxx=no
53664fi
53665rm -f core conftest.err conftest.$ac_objext \
53666    conftest$ac_exeext conftest.$ac_ext
53667    CXXFLAGS="$OLD_CXXFLAGS"
53668    ac_ext=cpp
53669ac_cpp='$CXXCPP $CPPFLAGS'
53670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53673
53674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53675$as_echo "$has_dynamic_libstdcxx" >&6; }
53676
53677    # Test if stdc++ can be linked statically.
53678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53679$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53680    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53681    ac_ext=cpp
53682ac_cpp='$CXXCPP $CPPFLAGS'
53683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53686
53687    OLD_LIBS="$LIBS"
53688    OLD_CXX="$CXX"
53689    LIBS="$STATIC_STDCXX_FLAGS"
53690    CXX="$CC"
53691    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53692/* end confdefs.h.  */
53693
53694int
53695main ()
53696{
53697return 0;
53698  ;
53699  return 0;
53700}
53701_ACEOF
53702if ac_fn_cxx_try_link "$LINENO"; then :
53703  has_static_libstdcxx=yes
53704else
53705  has_static_libstdcxx=no
53706fi
53707rm -f core conftest.err conftest.$ac_objext \
53708    conftest$ac_exeext conftest.$ac_ext
53709    LIBS="$OLD_LIBS"
53710    CXX="$OLD_CXX"
53711    ac_ext=cpp
53712ac_cpp='$CXXCPP $CPPFLAGS'
53713ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53714ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53715ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53716
53717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53718$as_echo "$has_static_libstdcxx" >&6; }
53719
53720    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53721      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53722    fi
53723
53724    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53725      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53726    fi
53727
53728    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53729      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53730    fi
53731
53732    # If dynamic was requested, it's available since it would fail above otherwise.
53733    # If dynamic wasn't requested, go with static unless it isn't available.
53734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53735$as_echo_n "checking how to link with libstdc++... " >&6; }
53736    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53737      LIBCXX="$LIBCXX -lstdc++"
53738      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53739      JVM_LIBS="-lstdc++ $JVM_LIBS"
53740      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53741      # just use the same setting as for the TARGET toolchain.
53742      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53743      LDCXX="$CXX"
53744      STATIC_CXX_SETTING="STATIC_CXX=false"
53745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53746$as_echo "dynamic" >&6; }
53747    else
53748      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53749      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53750      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53751      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53752      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53753      # just use the same setting as for the TARGET toolchain.
53754      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53755      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53756      LDCXX="$CC"
53757      STATIC_CXX_SETTING="STATIC_CXX=true"
53758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53759$as_echo "static" >&6; }
53760    fi
53761  fi
53762
53763
53764  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53765  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53766    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53767  fi
53768
53769  # TODO better (platform agnostic) test
53770  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53771    LIBCXX="-lstdc++"
53772  fi
53773
53774
53775  # Setup Windows runtime dlls
53776  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53777
53778
53779# Check whether --with-msvcr-dll was given.
53780if test "${with_msvcr_dll+set}" = set; then :
53781  withval=$with_msvcr_dll;
53782fi
53783
53784
53785  if test "x$with_msvcr_dll" != x; then
53786    # If given explicitely by user, do not probe. If not present, fail directly.
53787
53788  DLL_NAME="$MSVCR_NAME"
53789  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53790  METHOD="--with-msvcr-dll"
53791  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53792    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53793$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53794
53795    # Need to check if the found msvcr is correct architecture
53796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53797$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53798    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53800      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53801      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53802      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53803        CORRECT_MSVCR_ARCH="PE32 executable"
53804      else
53805        CORRECT_MSVCR_ARCH="PE32+ executable"
53806      fi
53807    else
53808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53809        CORRECT_MSVCR_ARCH=386
53810      else
53811        CORRECT_MSVCR_ARCH=x86-64
53812      fi
53813    fi
53814    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53816$as_echo "ok" >&6; }
53817      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53818
53819  # Only process if variable expands to non-empty
53820
53821  if test "x$MSVC_DLL" != x; then
53822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53823
53824  # Input might be given as Windows format, start by converting to
53825  # unix format.
53826  path="$MSVC_DLL"
53827  new_path=`$CYGPATH -u "$path"`
53828
53829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53832  # "foo.exe" is OK but "foo" is an error.
53833  #
53834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53835  # It is also a way to make sure we got the proper file name for the real test later on.
53836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53837  if test "x$test_shortpath" = x; then
53838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53839$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53840    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53841  fi
53842
53843  # Call helper function which possibly converts this using DOS-style short mode.
53844  # If so, the updated path is stored in $new_path.
53845
53846  input_path="$new_path"
53847  # Check if we need to convert this using DOS-style short mode. If the path
53848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53849  # take no chances and rewrite it.
53850  # Note: m4 eats our [], so we need to use [ and ] instead.
53851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53852  if test "x$has_forbidden_chars" != x; then
53853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53857      # Going to short mode and back again did indeed matter. Since short mode is
53858      # case insensitive, let's make it lowercase to improve readability.
53859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53860      # Now convert it back to Unix-style (cygpath)
53861      input_path=`$CYGPATH -u "$shortmode_path"`
53862      new_path="$input_path"
53863    fi
53864  fi
53865
53866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53867  if test "x$test_cygdrive_prefix" = x; then
53868    # As a simple fix, exclude /usr/bin since it's not a real path.
53869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53871      # a path prefixed by /cygdrive for fixpath to work.
53872      new_path="$CYGWIN_ROOT_PATH$input_path"
53873    fi
53874  fi
53875
53876
53877  if test "x$path" != "x$new_path"; then
53878    MSVC_DLL="$new_path"
53879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53880$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53881  fi
53882
53883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53884
53885  path="$MSVC_DLL"
53886  has_colon=`$ECHO $path | $GREP ^.:`
53887  new_path="$path"
53888  if test "x$has_colon" = x; then
53889    # Not in mixed or Windows style, start by that.
53890    new_path=`cmd //c echo $path`
53891  fi
53892
53893
53894  input_path="$new_path"
53895  # Check if we need to convert this using DOS-style short mode. If the path
53896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53897  # take no chances and rewrite it.
53898  # Note: m4 eats our [], so we need to use [ and ] instead.
53899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53900  if test "x$has_forbidden_chars" != x; then
53901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53903  fi
53904
53905
53906  windows_path="$new_path"
53907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53908    unix_path=`$CYGPATH -u "$windows_path"`
53909    new_path="$unix_path"
53910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53912    new_path="$unix_path"
53913  fi
53914
53915  if test "x$path" != "x$new_path"; then
53916    MSVC_DLL="$new_path"
53917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53918$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53919  fi
53920
53921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53923
53924    else
53925      # We're on a unix platform. Hooray! :)
53926      path="$MSVC_DLL"
53927      has_space=`$ECHO "$path" | $GREP " "`
53928      if test "x$has_space" != x; then
53929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53930$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53932      fi
53933
53934      # Use eval to expand a potential ~
53935      eval path="$path"
53936      if test ! -f "$path" && test ! -d "$path"; then
53937        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53938      fi
53939
53940      if test -d "$path"; then
53941        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53942      else
53943        dir="`$DIRNAME "$path"`"
53944        base="`$BASENAME "$path"`"
53945        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53946      fi
53947    fi
53948  fi
53949
53950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53951$as_echo_n "checking for $DLL_NAME... " >&6; }
53952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53953$as_echo "$MSVC_DLL" >&6; }
53954    else
53955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53956$as_echo "incorrect, ignoring" >&6; }
53957      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53958$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53959    fi
53960  fi
53961
53962    if test "x$MSVC_DLL" = x; then
53963      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53964    fi
53965    MSVCR_DLL="$MSVC_DLL"
53966  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53967
53968  DLL_NAME="$MSVCR_NAME"
53969  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53970  METHOD="devkit"
53971  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53972    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53973$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53974
53975    # Need to check if the found msvcr is correct architecture
53976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53977$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53978    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53980      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53981      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53982      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53983        CORRECT_MSVCR_ARCH="PE32 executable"
53984      else
53985        CORRECT_MSVCR_ARCH="PE32+ executable"
53986      fi
53987    else
53988      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53989        CORRECT_MSVCR_ARCH=386
53990      else
53991        CORRECT_MSVCR_ARCH=x86-64
53992      fi
53993    fi
53994    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53996$as_echo "ok" >&6; }
53997      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53998
53999  # Only process if variable expands to non-empty
54000
54001  if test "x$MSVC_DLL" != x; then
54002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54003
54004  # Input might be given as Windows format, start by converting to
54005  # unix format.
54006  path="$MSVC_DLL"
54007  new_path=`$CYGPATH -u "$path"`
54008
54009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54012  # "foo.exe" is OK but "foo" is an error.
54013  #
54014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54015  # It is also a way to make sure we got the proper file name for the real test later on.
54016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54017  if test "x$test_shortpath" = x; then
54018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54019$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54020    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54021  fi
54022
54023  # Call helper function which possibly converts this using DOS-style short mode.
54024  # If so, the updated path is stored in $new_path.
54025
54026  input_path="$new_path"
54027  # Check if we need to convert this using DOS-style short mode. If the path
54028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54029  # take no chances and rewrite it.
54030  # Note: m4 eats our [], so we need to use [ and ] instead.
54031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54032  if test "x$has_forbidden_chars" != x; then
54033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54037      # Going to short mode and back again did indeed matter. Since short mode is
54038      # case insensitive, let's make it lowercase to improve readability.
54039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54040      # Now convert it back to Unix-style (cygpath)
54041      input_path=`$CYGPATH -u "$shortmode_path"`
54042      new_path="$input_path"
54043    fi
54044  fi
54045
54046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54047  if test "x$test_cygdrive_prefix" = x; then
54048    # As a simple fix, exclude /usr/bin since it's not a real path.
54049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54051      # a path prefixed by /cygdrive for fixpath to work.
54052      new_path="$CYGWIN_ROOT_PATH$input_path"
54053    fi
54054  fi
54055
54056
54057  if test "x$path" != "x$new_path"; then
54058    MSVC_DLL="$new_path"
54059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54060$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54061  fi
54062
54063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54064
54065  path="$MSVC_DLL"
54066  has_colon=`$ECHO $path | $GREP ^.:`
54067  new_path="$path"
54068  if test "x$has_colon" = x; then
54069    # Not in mixed or Windows style, start by that.
54070    new_path=`cmd //c echo $path`
54071  fi
54072
54073
54074  input_path="$new_path"
54075  # Check if we need to convert this using DOS-style short mode. If the path
54076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54077  # take no chances and rewrite it.
54078  # Note: m4 eats our [], so we need to use [ and ] instead.
54079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54080  if test "x$has_forbidden_chars" != x; then
54081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54083  fi
54084
54085
54086  windows_path="$new_path"
54087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54088    unix_path=`$CYGPATH -u "$windows_path"`
54089    new_path="$unix_path"
54090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54092    new_path="$unix_path"
54093  fi
54094
54095  if test "x$path" != "x$new_path"; then
54096    MSVC_DLL="$new_path"
54097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54098$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54099  fi
54100
54101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54103
54104    else
54105      # We're on a unix platform. Hooray! :)
54106      path="$MSVC_DLL"
54107      has_space=`$ECHO "$path" | $GREP " "`
54108      if test "x$has_space" != x; then
54109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54110$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54112      fi
54113
54114      # Use eval to expand a potential ~
54115      eval path="$path"
54116      if test ! -f "$path" && test ! -d "$path"; then
54117        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54118      fi
54119
54120      if test -d "$path"; then
54121        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54122      else
54123        dir="`$DIRNAME "$path"`"
54124        base="`$BASENAME "$path"`"
54125        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54126      fi
54127    fi
54128  fi
54129
54130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54131$as_echo_n "checking for $DLL_NAME... " >&6; }
54132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54133$as_echo "$MSVC_DLL" >&6; }
54134    else
54135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54136$as_echo "incorrect, ignoring" >&6; }
54137      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54138$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54139    fi
54140  fi
54141
54142    if test "x$MSVC_DLL" = x; then
54143      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54144    fi
54145    MSVCR_DLL="$MSVC_DLL"
54146  else
54147
54148  DLL_NAME="${MSVCR_NAME}"
54149  MSVC_DLL=
54150
54151  if test "x$MSVC_DLL" = x; then
54152    # Probe: Using well-known location from Visual Studio 10.0
54153    if test "x$VCINSTALLDIR" != x; then
54154      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54155
54156  windows_path="$CYGWIN_VC_INSTALL_DIR"
54157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54158    unix_path=`$CYGPATH -u "$windows_path"`
54159    CYGWIN_VC_INSTALL_DIR="$unix_path"
54160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54162    CYGWIN_VC_INSTALL_DIR="$unix_path"
54163  fi
54164
54165      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54166        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54167      else
54168        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54169      fi
54170      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54171
54172  DLL_NAME="$DLL_NAME"
54173  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54174  METHOD="well-known location in VCINSTALLDIR"
54175  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54176    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54177$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54178
54179    # Need to check if the found msvcr is correct architecture
54180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54181$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54182    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54184      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54185      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54187        CORRECT_MSVCR_ARCH="PE32 executable"
54188      else
54189        CORRECT_MSVCR_ARCH="PE32+ executable"
54190      fi
54191    else
54192      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54193        CORRECT_MSVCR_ARCH=386
54194      else
54195        CORRECT_MSVCR_ARCH=x86-64
54196      fi
54197    fi
54198    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54200$as_echo "ok" >&6; }
54201      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54202
54203  # Only process if variable expands to non-empty
54204
54205  if test "x$MSVC_DLL" != x; then
54206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54207
54208  # Input might be given as Windows format, start by converting to
54209  # unix format.
54210  path="$MSVC_DLL"
54211  new_path=`$CYGPATH -u "$path"`
54212
54213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54216  # "foo.exe" is OK but "foo" is an error.
54217  #
54218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54219  # It is also a way to make sure we got the proper file name for the real test later on.
54220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54221  if test "x$test_shortpath" = x; then
54222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54223$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54224    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54225  fi
54226
54227  # Call helper function which possibly converts this using DOS-style short mode.
54228  # If so, the updated path is stored in $new_path.
54229
54230  input_path="$new_path"
54231  # Check if we need to convert this using DOS-style short mode. If the path
54232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54233  # take no chances and rewrite it.
54234  # Note: m4 eats our [], so we need to use [ and ] instead.
54235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54236  if test "x$has_forbidden_chars" != x; then
54237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54241      # Going to short mode and back again did indeed matter. Since short mode is
54242      # case insensitive, let's make it lowercase to improve readability.
54243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54244      # Now convert it back to Unix-style (cygpath)
54245      input_path=`$CYGPATH -u "$shortmode_path"`
54246      new_path="$input_path"
54247    fi
54248  fi
54249
54250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54251  if test "x$test_cygdrive_prefix" = x; then
54252    # As a simple fix, exclude /usr/bin since it's not a real path.
54253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54255      # a path prefixed by /cygdrive for fixpath to work.
54256      new_path="$CYGWIN_ROOT_PATH$input_path"
54257    fi
54258  fi
54259
54260
54261  if test "x$path" != "x$new_path"; then
54262    MSVC_DLL="$new_path"
54263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54264$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54265  fi
54266
54267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54268
54269  path="$MSVC_DLL"
54270  has_colon=`$ECHO $path | $GREP ^.:`
54271  new_path="$path"
54272  if test "x$has_colon" = x; then
54273    # Not in mixed or Windows style, start by that.
54274    new_path=`cmd //c echo $path`
54275  fi
54276
54277
54278  input_path="$new_path"
54279  # Check if we need to convert this using DOS-style short mode. If the path
54280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54281  # take no chances and rewrite it.
54282  # Note: m4 eats our [], so we need to use [ and ] instead.
54283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54284  if test "x$has_forbidden_chars" != x; then
54285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54287  fi
54288
54289
54290  windows_path="$new_path"
54291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54292    unix_path=`$CYGPATH -u "$windows_path"`
54293    new_path="$unix_path"
54294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54296    new_path="$unix_path"
54297  fi
54298
54299  if test "x$path" != "x$new_path"; then
54300    MSVC_DLL="$new_path"
54301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54303  fi
54304
54305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54307
54308    else
54309      # We're on a unix platform. Hooray! :)
54310      path="$MSVC_DLL"
54311      has_space=`$ECHO "$path" | $GREP " "`
54312      if test "x$has_space" != x; then
54313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54314$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54316      fi
54317
54318      # Use eval to expand a potential ~
54319      eval path="$path"
54320      if test ! -f "$path" && test ! -d "$path"; then
54321        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54322      fi
54323
54324      if test -d "$path"; then
54325        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54326      else
54327        dir="`$DIRNAME "$path"`"
54328        base="`$BASENAME "$path"`"
54329        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54330      fi
54331    fi
54332  fi
54333
54334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54335$as_echo_n "checking for $DLL_NAME... " >&6; }
54336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54337$as_echo "$MSVC_DLL" >&6; }
54338    else
54339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54340$as_echo "incorrect, ignoring" >&6; }
54341      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54342$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54343    fi
54344  fi
54345
54346    fi
54347  fi
54348
54349  if test "x$MSVC_DLL" = x; then
54350    # Probe: Check in the Boot JDK directory.
54351    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54352
54353  DLL_NAME="$DLL_NAME"
54354  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54355  METHOD="well-known location in Boot JDK"
54356  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54357    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54358$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54359
54360    # Need to check if the found msvcr is correct architecture
54361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54362$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54363    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54365      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54366      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54367      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54368        CORRECT_MSVCR_ARCH="PE32 executable"
54369      else
54370        CORRECT_MSVCR_ARCH="PE32+ executable"
54371      fi
54372    else
54373      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54374        CORRECT_MSVCR_ARCH=386
54375      else
54376        CORRECT_MSVCR_ARCH=x86-64
54377      fi
54378    fi
54379    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54381$as_echo "ok" >&6; }
54382      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54383
54384  # Only process if variable expands to non-empty
54385
54386  if test "x$MSVC_DLL" != x; then
54387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54388
54389  # Input might be given as Windows format, start by converting to
54390  # unix format.
54391  path="$MSVC_DLL"
54392  new_path=`$CYGPATH -u "$path"`
54393
54394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54397  # "foo.exe" is OK but "foo" is an error.
54398  #
54399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54400  # It is also a way to make sure we got the proper file name for the real test later on.
54401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54402  if test "x$test_shortpath" = x; then
54403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54404$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54405    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54406  fi
54407
54408  # Call helper function which possibly converts this using DOS-style short mode.
54409  # If so, the updated path is stored in $new_path.
54410
54411  input_path="$new_path"
54412  # Check if we need to convert this using DOS-style short mode. If the path
54413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54414  # take no chances and rewrite it.
54415  # Note: m4 eats our [], so we need to use [ and ] instead.
54416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54417  if test "x$has_forbidden_chars" != x; then
54418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54422      # Going to short mode and back again did indeed matter. Since short mode is
54423      # case insensitive, let's make it lowercase to improve readability.
54424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54425      # Now convert it back to Unix-style (cygpath)
54426      input_path=`$CYGPATH -u "$shortmode_path"`
54427      new_path="$input_path"
54428    fi
54429  fi
54430
54431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54432  if test "x$test_cygdrive_prefix" = x; then
54433    # As a simple fix, exclude /usr/bin since it's not a real path.
54434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54436      # a path prefixed by /cygdrive for fixpath to work.
54437      new_path="$CYGWIN_ROOT_PATH$input_path"
54438    fi
54439  fi
54440
54441
54442  if test "x$path" != "x$new_path"; then
54443    MSVC_DLL="$new_path"
54444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54446  fi
54447
54448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54449
54450  path="$MSVC_DLL"
54451  has_colon=`$ECHO $path | $GREP ^.:`
54452  new_path="$path"
54453  if test "x$has_colon" = x; then
54454    # Not in mixed or Windows style, start by that.
54455    new_path=`cmd //c echo $path`
54456  fi
54457
54458
54459  input_path="$new_path"
54460  # Check if we need to convert this using DOS-style short mode. If the path
54461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54462  # take no chances and rewrite it.
54463  # Note: m4 eats our [], so we need to use [ and ] instead.
54464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54465  if test "x$has_forbidden_chars" != x; then
54466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54468  fi
54469
54470
54471  windows_path="$new_path"
54472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54473    unix_path=`$CYGPATH -u "$windows_path"`
54474    new_path="$unix_path"
54475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54477    new_path="$unix_path"
54478  fi
54479
54480  if test "x$path" != "x$new_path"; then
54481    MSVC_DLL="$new_path"
54482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54483$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54484  fi
54485
54486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54488
54489    else
54490      # We're on a unix platform. Hooray! :)
54491      path="$MSVC_DLL"
54492      has_space=`$ECHO "$path" | $GREP " "`
54493      if test "x$has_space" != x; then
54494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54495$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54496        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54497      fi
54498
54499      # Use eval to expand a potential ~
54500      eval path="$path"
54501      if test ! -f "$path" && test ! -d "$path"; then
54502        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54503      fi
54504
54505      if test -d "$path"; then
54506        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54507      else
54508        dir="`$DIRNAME "$path"`"
54509        base="`$BASENAME "$path"`"
54510        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54511      fi
54512    fi
54513  fi
54514
54515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54516$as_echo_n "checking for $DLL_NAME... " >&6; }
54517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54518$as_echo "$MSVC_DLL" >&6; }
54519    else
54520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54521$as_echo "incorrect, ignoring" >&6; }
54522      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54523$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54524    fi
54525  fi
54526
54527  fi
54528
54529  if test "x$MSVC_DLL" = x; then
54530    # Probe: Look in the Windows system32 directory
54531    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54532
54533  windows_path="$CYGWIN_SYSTEMROOT"
54534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54535    unix_path=`$CYGPATH -u "$windows_path"`
54536    CYGWIN_SYSTEMROOT="$unix_path"
54537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54539    CYGWIN_SYSTEMROOT="$unix_path"
54540  fi
54541
54542    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54543
54544  DLL_NAME="$DLL_NAME"
54545  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54546  METHOD="well-known location in SYSTEMROOT"
54547  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54549$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54550
54551    # Need to check if the found msvcr is correct architecture
54552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54553$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54554    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54556      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54557      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54558      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54559        CORRECT_MSVCR_ARCH="PE32 executable"
54560      else
54561        CORRECT_MSVCR_ARCH="PE32+ executable"
54562      fi
54563    else
54564      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54565        CORRECT_MSVCR_ARCH=386
54566      else
54567        CORRECT_MSVCR_ARCH=x86-64
54568      fi
54569    fi
54570    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54572$as_echo "ok" >&6; }
54573      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54574
54575  # Only process if variable expands to non-empty
54576
54577  if test "x$MSVC_DLL" != x; then
54578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54579
54580  # Input might be given as Windows format, start by converting to
54581  # unix format.
54582  path="$MSVC_DLL"
54583  new_path=`$CYGPATH -u "$path"`
54584
54585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54588  # "foo.exe" is OK but "foo" is an error.
54589  #
54590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54591  # It is also a way to make sure we got the proper file name for the real test later on.
54592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54593  if test "x$test_shortpath" = x; then
54594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54595$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54596    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54597  fi
54598
54599  # Call helper function which possibly converts this using DOS-style short mode.
54600  # If so, the updated path is stored in $new_path.
54601
54602  input_path="$new_path"
54603  # Check if we need to convert this using DOS-style short mode. If the path
54604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54605  # take no chances and rewrite it.
54606  # Note: m4 eats our [], so we need to use [ and ] instead.
54607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54608  if test "x$has_forbidden_chars" != x; then
54609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54613      # Going to short mode and back again did indeed matter. Since short mode is
54614      # case insensitive, let's make it lowercase to improve readability.
54615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54616      # Now convert it back to Unix-style (cygpath)
54617      input_path=`$CYGPATH -u "$shortmode_path"`
54618      new_path="$input_path"
54619    fi
54620  fi
54621
54622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54623  if test "x$test_cygdrive_prefix" = x; then
54624    # As a simple fix, exclude /usr/bin since it's not a real path.
54625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54627      # a path prefixed by /cygdrive for fixpath to work.
54628      new_path="$CYGWIN_ROOT_PATH$input_path"
54629    fi
54630  fi
54631
54632
54633  if test "x$path" != "x$new_path"; then
54634    MSVC_DLL="$new_path"
54635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54636$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54637  fi
54638
54639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54640
54641  path="$MSVC_DLL"
54642  has_colon=`$ECHO $path | $GREP ^.:`
54643  new_path="$path"
54644  if test "x$has_colon" = x; then
54645    # Not in mixed or Windows style, start by that.
54646    new_path=`cmd //c echo $path`
54647  fi
54648
54649
54650  input_path="$new_path"
54651  # Check if we need to convert this using DOS-style short mode. If the path
54652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54653  # take no chances and rewrite it.
54654  # Note: m4 eats our [], so we need to use [ and ] instead.
54655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54656  if test "x$has_forbidden_chars" != x; then
54657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54659  fi
54660
54661
54662  windows_path="$new_path"
54663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54664    unix_path=`$CYGPATH -u "$windows_path"`
54665    new_path="$unix_path"
54666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54668    new_path="$unix_path"
54669  fi
54670
54671  if test "x$path" != "x$new_path"; then
54672    MSVC_DLL="$new_path"
54673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54674$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54675  fi
54676
54677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54679
54680    else
54681      # We're on a unix platform. Hooray! :)
54682      path="$MSVC_DLL"
54683      has_space=`$ECHO "$path" | $GREP " "`
54684      if test "x$has_space" != x; then
54685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54686$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54688      fi
54689
54690      # Use eval to expand a potential ~
54691      eval path="$path"
54692      if test ! -f "$path" && test ! -d "$path"; then
54693        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54694      fi
54695
54696      if test -d "$path"; then
54697        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54698      else
54699        dir="`$DIRNAME "$path"`"
54700        base="`$BASENAME "$path"`"
54701        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54702      fi
54703    fi
54704  fi
54705
54706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54707$as_echo_n "checking for $DLL_NAME... " >&6; }
54708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54709$as_echo "$MSVC_DLL" >&6; }
54710    else
54711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54712$as_echo "incorrect, ignoring" >&6; }
54713      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54714$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54715    fi
54716  fi
54717
54718  fi
54719
54720  if test "x$MSVC_DLL" = x; then
54721    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54722    if test "x$VS100COMNTOOLS" != x; then
54723      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54724
54725  windows_path="$CYGWIN_VS_TOOLS_DIR"
54726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54727    unix_path=`$CYGPATH -u "$windows_path"`
54728    CYGWIN_VS_TOOLS_DIR="$unix_path"
54729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54731    CYGWIN_VS_TOOLS_DIR="$unix_path"
54732  fi
54733
54734      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54735        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54736	    | $GREP -i /x64/ | $HEAD --lines 1`
54737      else
54738        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54739	    | $GREP -i /x86/ | $HEAD --lines 1`
54740      fi
54741
54742  DLL_NAME="$DLL_NAME"
54743  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54744  METHOD="search of VS100COMNTOOLS"
54745  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54746    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54747$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54748
54749    # Need to check if the found msvcr is correct architecture
54750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54751$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54752    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54754      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54755      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54756      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54757        CORRECT_MSVCR_ARCH="PE32 executable"
54758      else
54759        CORRECT_MSVCR_ARCH="PE32+ executable"
54760      fi
54761    else
54762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54763        CORRECT_MSVCR_ARCH=386
54764      else
54765        CORRECT_MSVCR_ARCH=x86-64
54766      fi
54767    fi
54768    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54770$as_echo "ok" >&6; }
54771      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54772
54773  # Only process if variable expands to non-empty
54774
54775  if test "x$MSVC_DLL" != x; then
54776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54777
54778  # Input might be given as Windows format, start by converting to
54779  # unix format.
54780  path="$MSVC_DLL"
54781  new_path=`$CYGPATH -u "$path"`
54782
54783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54786  # "foo.exe" is OK but "foo" is an error.
54787  #
54788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54789  # It is also a way to make sure we got the proper file name for the real test later on.
54790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54791  if test "x$test_shortpath" = x; then
54792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54794    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54795  fi
54796
54797  # Call helper function which possibly converts this using DOS-style short mode.
54798  # If so, the updated path is stored in $new_path.
54799
54800  input_path="$new_path"
54801  # Check if we need to convert this using DOS-style short mode. If the path
54802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54803  # take no chances and rewrite it.
54804  # Note: m4 eats our [], so we need to use [ and ] instead.
54805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54806  if test "x$has_forbidden_chars" != x; then
54807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54811      # Going to short mode and back again did indeed matter. Since short mode is
54812      # case insensitive, let's make it lowercase to improve readability.
54813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54814      # Now convert it back to Unix-style (cygpath)
54815      input_path=`$CYGPATH -u "$shortmode_path"`
54816      new_path="$input_path"
54817    fi
54818  fi
54819
54820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54821  if test "x$test_cygdrive_prefix" = x; then
54822    # As a simple fix, exclude /usr/bin since it's not a real path.
54823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54825      # a path prefixed by /cygdrive for fixpath to work.
54826      new_path="$CYGWIN_ROOT_PATH$input_path"
54827    fi
54828  fi
54829
54830
54831  if test "x$path" != "x$new_path"; then
54832    MSVC_DLL="$new_path"
54833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54835  fi
54836
54837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54838
54839  path="$MSVC_DLL"
54840  has_colon=`$ECHO $path | $GREP ^.:`
54841  new_path="$path"
54842  if test "x$has_colon" = x; then
54843    # Not in mixed or Windows style, start by that.
54844    new_path=`cmd //c echo $path`
54845  fi
54846
54847
54848  input_path="$new_path"
54849  # Check if we need to convert this using DOS-style short mode. If the path
54850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54851  # take no chances and rewrite it.
54852  # Note: m4 eats our [], so we need to use [ and ] instead.
54853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54854  if test "x$has_forbidden_chars" != x; then
54855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54857  fi
54858
54859
54860  windows_path="$new_path"
54861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54862    unix_path=`$CYGPATH -u "$windows_path"`
54863    new_path="$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    new_path="$unix_path"
54867  fi
54868
54869  if test "x$path" != "x$new_path"; then
54870    MSVC_DLL="$new_path"
54871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54872$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54873  fi
54874
54875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54877
54878    else
54879      # We're on a unix platform. Hooray! :)
54880      path="$MSVC_DLL"
54881      has_space=`$ECHO "$path" | $GREP " "`
54882      if test "x$has_space" != x; then
54883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54886      fi
54887
54888      # Use eval to expand a potential ~
54889      eval path="$path"
54890      if test ! -f "$path" && test ! -d "$path"; then
54891        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54892      fi
54893
54894      if test -d "$path"; then
54895        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54896      else
54897        dir="`$DIRNAME "$path"`"
54898        base="`$BASENAME "$path"`"
54899        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54900      fi
54901    fi
54902  fi
54903
54904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54905$as_echo_n "checking for $DLL_NAME... " >&6; }
54906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54907$as_echo "$MSVC_DLL" >&6; }
54908    else
54909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54910$as_echo "incorrect, ignoring" >&6; }
54911      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54912$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54913    fi
54914  fi
54915
54916    fi
54917  fi
54918
54919  if test "x$MSVC_DLL" = x; then
54920    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54921    # (This was the original behaviour; kept since it might turn something up)
54922    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54923      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54924        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54925	    | $GREP x64 | $HEAD --lines 1`
54926      else
54927        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54928	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54929        if test "x$POSSIBLE_MSVC_DLL" = x; then
54930          # We're grasping at straws now...
54931          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54932	      | $HEAD --lines 1`
54933        fi
54934      fi
54935
54936
54937  DLL_NAME="$DLL_NAME"
54938  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54939  METHOD="search of VCINSTALLDIR"
54940  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54941    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54942$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54943
54944    # Need to check if the found msvcr is correct architecture
54945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54946$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54947    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54949      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54950      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54951      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54952        CORRECT_MSVCR_ARCH="PE32 executable"
54953      else
54954        CORRECT_MSVCR_ARCH="PE32+ executable"
54955      fi
54956    else
54957      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54958        CORRECT_MSVCR_ARCH=386
54959      else
54960        CORRECT_MSVCR_ARCH=x86-64
54961      fi
54962    fi
54963    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54965$as_echo "ok" >&6; }
54966      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54967
54968  # Only process if variable expands to non-empty
54969
54970  if test "x$MSVC_DLL" != x; then
54971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54972
54973  # Input might be given as Windows format, start by converting to
54974  # unix format.
54975  path="$MSVC_DLL"
54976  new_path=`$CYGPATH -u "$path"`
54977
54978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54981  # "foo.exe" is OK but "foo" is an error.
54982  #
54983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54984  # It is also a way to make sure we got the proper file name for the real test later on.
54985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54986  if test "x$test_shortpath" = x; then
54987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54988$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54989    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54990  fi
54991
54992  # Call helper function which possibly converts this using DOS-style short mode.
54993  # If so, the updated path is stored in $new_path.
54994
54995  input_path="$new_path"
54996  # Check if we need to convert this using DOS-style short mode. If the path
54997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54998  # take no chances and rewrite it.
54999  # Note: m4 eats our [], so we need to use [ and ] instead.
55000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55001  if test "x$has_forbidden_chars" != x; then
55002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55006      # Going to short mode and back again did indeed matter. Since short mode is
55007      # case insensitive, let's make it lowercase to improve readability.
55008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55009      # Now convert it back to Unix-style (cygpath)
55010      input_path=`$CYGPATH -u "$shortmode_path"`
55011      new_path="$input_path"
55012    fi
55013  fi
55014
55015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55016  if test "x$test_cygdrive_prefix" = x; then
55017    # As a simple fix, exclude /usr/bin since it's not a real path.
55018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55020      # a path prefixed by /cygdrive for fixpath to work.
55021      new_path="$CYGWIN_ROOT_PATH$input_path"
55022    fi
55023  fi
55024
55025
55026  if test "x$path" != "x$new_path"; then
55027    MSVC_DLL="$new_path"
55028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55029$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55030  fi
55031
55032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55033
55034  path="$MSVC_DLL"
55035  has_colon=`$ECHO $path | $GREP ^.:`
55036  new_path="$path"
55037  if test "x$has_colon" = x; then
55038    # Not in mixed or Windows style, start by that.
55039    new_path=`cmd //c echo $path`
55040  fi
55041
55042
55043  input_path="$new_path"
55044  # Check if we need to convert this using DOS-style short mode. If the path
55045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55046  # take no chances and rewrite it.
55047  # Note: m4 eats our [], so we need to use [ and ] instead.
55048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55049  if test "x$has_forbidden_chars" != x; then
55050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55052  fi
55053
55054
55055  windows_path="$new_path"
55056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55057    unix_path=`$CYGPATH -u "$windows_path"`
55058    new_path="$unix_path"
55059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55061    new_path="$unix_path"
55062  fi
55063
55064  if test "x$path" != "x$new_path"; then
55065    MSVC_DLL="$new_path"
55066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55067$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55068  fi
55069
55070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55072
55073    else
55074      # We're on a unix platform. Hooray! :)
55075      path="$MSVC_DLL"
55076      has_space=`$ECHO "$path" | $GREP " "`
55077      if test "x$has_space" != x; then
55078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55079$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55081      fi
55082
55083      # Use eval to expand a potential ~
55084      eval path="$path"
55085      if test ! -f "$path" && test ! -d "$path"; then
55086        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55087      fi
55088
55089      if test -d "$path"; then
55090        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55091      else
55092        dir="`$DIRNAME "$path"`"
55093        base="`$BASENAME "$path"`"
55094        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55095      fi
55096    fi
55097  fi
55098
55099      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55100$as_echo_n "checking for $DLL_NAME... " >&6; }
55101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55102$as_echo "$MSVC_DLL" >&6; }
55103    else
55104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55105$as_echo "incorrect, ignoring" >&6; }
55106      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55107$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55108    fi
55109  fi
55110
55111    fi
55112  fi
55113
55114  if test "x$MSVC_DLL" = x; then
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55116$as_echo_n "checking for $DLL_NAME... " >&6; }
55117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55118$as_echo "no" >&6; }
55119    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55120  fi
55121
55122    MSVCR_DLL="$MSVC_DLL"
55123  fi
55124
55125
55126
55127# Check whether --with-msvcp-dll was given.
55128if test "${with_msvcp_dll+set}" = set; then :
55129  withval=$with_msvcp_dll;
55130fi
55131
55132
55133  if test "x$MSVCP_NAME" != "x"; then
55134    if test "x$with_msvcp_dll" != x; then
55135      # If given explicitely by user, do not probe. If not present, fail directly.
55136
55137  DLL_NAME="$MSVCP_NAME"
55138  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55139  METHOD="--with-msvcp-dll"
55140  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55142$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55143
55144    # Need to check if the found msvcr is correct architecture
55145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55146$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55147    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55149      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55150      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55152        CORRECT_MSVCR_ARCH="PE32 executable"
55153      else
55154        CORRECT_MSVCR_ARCH="PE32+ executable"
55155      fi
55156    else
55157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55158        CORRECT_MSVCR_ARCH=386
55159      else
55160        CORRECT_MSVCR_ARCH=x86-64
55161      fi
55162    fi
55163    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55165$as_echo "ok" >&6; }
55166      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55167
55168  # Only process if variable expands to non-empty
55169
55170  if test "x$MSVC_DLL" != x; then
55171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55172
55173  # Input might be given as Windows format, start by converting to
55174  # unix format.
55175  path="$MSVC_DLL"
55176  new_path=`$CYGPATH -u "$path"`
55177
55178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55181  # "foo.exe" is OK but "foo" is an error.
55182  #
55183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55184  # It is also a way to make sure we got the proper file name for the real test later on.
55185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55186  if test "x$test_shortpath" = x; then
55187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55189    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55190  fi
55191
55192  # Call helper function which possibly converts this using DOS-style short mode.
55193  # If so, the updated path is stored in $new_path.
55194
55195  input_path="$new_path"
55196  # Check if we need to convert this using DOS-style short mode. If the path
55197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55198  # take no chances and rewrite it.
55199  # Note: m4 eats our [], so we need to use [ and ] instead.
55200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55201  if test "x$has_forbidden_chars" != x; then
55202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55206      # Going to short mode and back again did indeed matter. Since short mode is
55207      # case insensitive, let's make it lowercase to improve readability.
55208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55209      # Now convert it back to Unix-style (cygpath)
55210      input_path=`$CYGPATH -u "$shortmode_path"`
55211      new_path="$input_path"
55212    fi
55213  fi
55214
55215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55216  if test "x$test_cygdrive_prefix" = x; then
55217    # As a simple fix, exclude /usr/bin since it's not a real path.
55218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55220      # a path prefixed by /cygdrive for fixpath to work.
55221      new_path="$CYGWIN_ROOT_PATH$input_path"
55222    fi
55223  fi
55224
55225
55226  if test "x$path" != "x$new_path"; then
55227    MSVC_DLL="$new_path"
55228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55229$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55230  fi
55231
55232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55233
55234  path="$MSVC_DLL"
55235  has_colon=`$ECHO $path | $GREP ^.:`
55236  new_path="$path"
55237  if test "x$has_colon" = x; then
55238    # Not in mixed or Windows style, start by that.
55239    new_path=`cmd //c echo $path`
55240  fi
55241
55242
55243  input_path="$new_path"
55244  # Check if we need to convert this using DOS-style short mode. If the path
55245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55246  # take no chances and rewrite it.
55247  # Note: m4 eats our [], so we need to use [ and ] instead.
55248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55249  if test "x$has_forbidden_chars" != x; then
55250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55252  fi
55253
55254
55255  windows_path="$new_path"
55256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55257    unix_path=`$CYGPATH -u "$windows_path"`
55258    new_path="$unix_path"
55259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55261    new_path="$unix_path"
55262  fi
55263
55264  if test "x$path" != "x$new_path"; then
55265    MSVC_DLL="$new_path"
55266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55267$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55268  fi
55269
55270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55272
55273    else
55274      # We're on a unix platform. Hooray! :)
55275      path="$MSVC_DLL"
55276      has_space=`$ECHO "$path" | $GREP " "`
55277      if test "x$has_space" != x; then
55278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55279$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55281      fi
55282
55283      # Use eval to expand a potential ~
55284      eval path="$path"
55285      if test ! -f "$path" && test ! -d "$path"; then
55286        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55287      fi
55288
55289      if test -d "$path"; then
55290        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55291      else
55292        dir="`$DIRNAME "$path"`"
55293        base="`$BASENAME "$path"`"
55294        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55295      fi
55296    fi
55297  fi
55298
55299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55300$as_echo_n "checking for $DLL_NAME... " >&6; }
55301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55302$as_echo "$MSVC_DLL" >&6; }
55303    else
55304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55305$as_echo "incorrect, ignoring" >&6; }
55306      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55307$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55308    fi
55309  fi
55310
55311      if test "x$MSVC_DLL" = x; then
55312        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55313      fi
55314      MSVCP_DLL="$MSVC_DLL"
55315    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55316
55317  DLL_NAME="$MSVCP_NAME"
55318  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55319  METHOD="devkit"
55320  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55321    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55322$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55323
55324    # Need to check if the found msvcr is correct architecture
55325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55326$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55327    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55329      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55330      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55331      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55332        CORRECT_MSVCR_ARCH="PE32 executable"
55333      else
55334        CORRECT_MSVCR_ARCH="PE32+ executable"
55335      fi
55336    else
55337      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55338        CORRECT_MSVCR_ARCH=386
55339      else
55340        CORRECT_MSVCR_ARCH=x86-64
55341      fi
55342    fi
55343    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55345$as_echo "ok" >&6; }
55346      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55347
55348  # Only process if variable expands to non-empty
55349
55350  if test "x$MSVC_DLL" != x; then
55351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55352
55353  # Input might be given as Windows format, start by converting to
55354  # unix format.
55355  path="$MSVC_DLL"
55356  new_path=`$CYGPATH -u "$path"`
55357
55358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55361  # "foo.exe" is OK but "foo" is an error.
55362  #
55363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55364  # It is also a way to make sure we got the proper file name for the real test later on.
55365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55366  if test "x$test_shortpath" = x; then
55367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55368$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55369    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55370  fi
55371
55372  # Call helper function which possibly converts this using DOS-style short mode.
55373  # If so, the updated path is stored in $new_path.
55374
55375  input_path="$new_path"
55376  # Check if we need to convert this using DOS-style short mode. If the path
55377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55378  # take no chances and rewrite it.
55379  # Note: m4 eats our [], so we need to use [ and ] instead.
55380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55381  if test "x$has_forbidden_chars" != x; then
55382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55386      # Going to short mode and back again did indeed matter. Since short mode is
55387      # case insensitive, let's make it lowercase to improve readability.
55388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55389      # Now convert it back to Unix-style (cygpath)
55390      input_path=`$CYGPATH -u "$shortmode_path"`
55391      new_path="$input_path"
55392    fi
55393  fi
55394
55395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55396  if test "x$test_cygdrive_prefix" = x; then
55397    # As a simple fix, exclude /usr/bin since it's not a real path.
55398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55400      # a path prefixed by /cygdrive for fixpath to work.
55401      new_path="$CYGWIN_ROOT_PATH$input_path"
55402    fi
55403  fi
55404
55405
55406  if test "x$path" != "x$new_path"; then
55407    MSVC_DLL="$new_path"
55408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55409$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55410  fi
55411
55412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55413
55414  path="$MSVC_DLL"
55415  has_colon=`$ECHO $path | $GREP ^.:`
55416  new_path="$path"
55417  if test "x$has_colon" = x; then
55418    # Not in mixed or Windows style, start by that.
55419    new_path=`cmd //c echo $path`
55420  fi
55421
55422
55423  input_path="$new_path"
55424  # Check if we need to convert this using DOS-style short mode. If the path
55425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55426  # take no chances and rewrite it.
55427  # Note: m4 eats our [], so we need to use [ and ] instead.
55428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55429  if test "x$has_forbidden_chars" != x; then
55430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55432  fi
55433
55434
55435  windows_path="$new_path"
55436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55437    unix_path=`$CYGPATH -u "$windows_path"`
55438    new_path="$unix_path"
55439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55441    new_path="$unix_path"
55442  fi
55443
55444  if test "x$path" != "x$new_path"; then
55445    MSVC_DLL="$new_path"
55446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55447$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55448  fi
55449
55450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55452
55453    else
55454      # We're on a unix platform. Hooray! :)
55455      path="$MSVC_DLL"
55456      has_space=`$ECHO "$path" | $GREP " "`
55457      if test "x$has_space" != x; then
55458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55459$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55461      fi
55462
55463      # Use eval to expand a potential ~
55464      eval path="$path"
55465      if test ! -f "$path" && test ! -d "$path"; then
55466        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55467      fi
55468
55469      if test -d "$path"; then
55470        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55471      else
55472        dir="`$DIRNAME "$path"`"
55473        base="`$BASENAME "$path"`"
55474        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55475      fi
55476    fi
55477  fi
55478
55479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55480$as_echo_n "checking for $DLL_NAME... " >&6; }
55481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55482$as_echo "$MSVC_DLL" >&6; }
55483    else
55484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55485$as_echo "incorrect, ignoring" >&6; }
55486      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55487$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55488    fi
55489  fi
55490
55491      if test "x$MSVC_DLL" = x; then
55492        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55493      fi
55494      MSVCP_DLL="$MSVC_DLL"
55495    else
55496
55497  DLL_NAME="${MSVCP_NAME}"
55498  MSVC_DLL=
55499
55500  if test "x$MSVC_DLL" = x; then
55501    # Probe: Using well-known location from Visual Studio 10.0
55502    if test "x$VCINSTALLDIR" != x; then
55503      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55504
55505  windows_path="$CYGWIN_VC_INSTALL_DIR"
55506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55507    unix_path=`$CYGPATH -u "$windows_path"`
55508    CYGWIN_VC_INSTALL_DIR="$unix_path"
55509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55511    CYGWIN_VC_INSTALL_DIR="$unix_path"
55512  fi
55513
55514      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55515        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55516      else
55517        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55518      fi
55519      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55520
55521  DLL_NAME="$DLL_NAME"
55522  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55523  METHOD="well-known location in VCINSTALLDIR"
55524  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55526$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55527
55528    # Need to check if the found msvcr is correct architecture
55529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55530$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55531    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55533      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55534      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55536        CORRECT_MSVCR_ARCH="PE32 executable"
55537      else
55538        CORRECT_MSVCR_ARCH="PE32+ executable"
55539      fi
55540    else
55541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55542        CORRECT_MSVCR_ARCH=386
55543      else
55544        CORRECT_MSVCR_ARCH=x86-64
55545      fi
55546    fi
55547    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55549$as_echo "ok" >&6; }
55550      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55551
55552  # Only process if variable expands to non-empty
55553
55554  if test "x$MSVC_DLL" != x; then
55555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55556
55557  # Input might be given as Windows format, start by converting to
55558  # unix format.
55559  path="$MSVC_DLL"
55560  new_path=`$CYGPATH -u "$path"`
55561
55562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55565  # "foo.exe" is OK but "foo" is an error.
55566  #
55567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55568  # It is also a way to make sure we got the proper file name for the real test later on.
55569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55570  if test "x$test_shortpath" = x; then
55571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55572$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55573    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55574  fi
55575
55576  # Call helper function which possibly converts this using DOS-style short mode.
55577  # If so, the updated path is stored in $new_path.
55578
55579  input_path="$new_path"
55580  # Check if we need to convert this using DOS-style short mode. If the path
55581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55582  # take no chances and rewrite it.
55583  # Note: m4 eats our [], so we need to use [ and ] instead.
55584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55585  if test "x$has_forbidden_chars" != x; then
55586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55590      # Going to short mode and back again did indeed matter. Since short mode is
55591      # case insensitive, let's make it lowercase to improve readability.
55592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55593      # Now convert it back to Unix-style (cygpath)
55594      input_path=`$CYGPATH -u "$shortmode_path"`
55595      new_path="$input_path"
55596    fi
55597  fi
55598
55599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55600  if test "x$test_cygdrive_prefix" = x; then
55601    # As a simple fix, exclude /usr/bin since it's not a real path.
55602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55604      # a path prefixed by /cygdrive for fixpath to work.
55605      new_path="$CYGWIN_ROOT_PATH$input_path"
55606    fi
55607  fi
55608
55609
55610  if test "x$path" != "x$new_path"; then
55611    MSVC_DLL="$new_path"
55612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55613$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55614  fi
55615
55616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55617
55618  path="$MSVC_DLL"
55619  has_colon=`$ECHO $path | $GREP ^.:`
55620  new_path="$path"
55621  if test "x$has_colon" = x; then
55622    # Not in mixed or Windows style, start by that.
55623    new_path=`cmd //c echo $path`
55624  fi
55625
55626
55627  input_path="$new_path"
55628  # Check if we need to convert this using DOS-style short mode. If the path
55629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55630  # take no chances and rewrite it.
55631  # Note: m4 eats our [], so we need to use [ and ] instead.
55632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55633  if test "x$has_forbidden_chars" != x; then
55634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55636  fi
55637
55638
55639  windows_path="$new_path"
55640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55641    unix_path=`$CYGPATH -u "$windows_path"`
55642    new_path="$unix_path"
55643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55645    new_path="$unix_path"
55646  fi
55647
55648  if test "x$path" != "x$new_path"; then
55649    MSVC_DLL="$new_path"
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55651$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55652  fi
55653
55654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55656
55657    else
55658      # We're on a unix platform. Hooray! :)
55659      path="$MSVC_DLL"
55660      has_space=`$ECHO "$path" | $GREP " "`
55661      if test "x$has_space" != x; then
55662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55663$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55665      fi
55666
55667      # Use eval to expand a potential ~
55668      eval path="$path"
55669      if test ! -f "$path" && test ! -d "$path"; then
55670        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55671      fi
55672
55673      if test -d "$path"; then
55674        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55675      else
55676        dir="`$DIRNAME "$path"`"
55677        base="`$BASENAME "$path"`"
55678        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55679      fi
55680    fi
55681  fi
55682
55683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55684$as_echo_n "checking for $DLL_NAME... " >&6; }
55685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55686$as_echo "$MSVC_DLL" >&6; }
55687    else
55688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55689$as_echo "incorrect, ignoring" >&6; }
55690      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55691$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55692    fi
55693  fi
55694
55695    fi
55696  fi
55697
55698  if test "x$MSVC_DLL" = x; then
55699    # Probe: Check in the Boot JDK directory.
55700    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55701
55702  DLL_NAME="$DLL_NAME"
55703  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55704  METHOD="well-known location in Boot JDK"
55705  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55706    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55707$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55708
55709    # Need to check if the found msvcr is correct architecture
55710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55711$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55712    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55714      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55715      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55716      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55717        CORRECT_MSVCR_ARCH="PE32 executable"
55718      else
55719        CORRECT_MSVCR_ARCH="PE32+ executable"
55720      fi
55721    else
55722      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55723        CORRECT_MSVCR_ARCH=386
55724      else
55725        CORRECT_MSVCR_ARCH=x86-64
55726      fi
55727    fi
55728    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55730$as_echo "ok" >&6; }
55731      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55732
55733  # Only process if variable expands to non-empty
55734
55735  if test "x$MSVC_DLL" != x; then
55736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55737
55738  # Input might be given as Windows format, start by converting to
55739  # unix format.
55740  path="$MSVC_DLL"
55741  new_path=`$CYGPATH -u "$path"`
55742
55743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55746  # "foo.exe" is OK but "foo" is an error.
55747  #
55748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55749  # It is also a way to make sure we got the proper file name for the real test later on.
55750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55751  if test "x$test_shortpath" = x; then
55752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55753$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55754    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55755  fi
55756
55757  # Call helper function which possibly converts this using DOS-style short mode.
55758  # If so, the updated path is stored in $new_path.
55759
55760  input_path="$new_path"
55761  # Check if we need to convert this using DOS-style short mode. If the path
55762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55763  # take no chances and rewrite it.
55764  # Note: m4 eats our [], so we need to use [ and ] instead.
55765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55766  if test "x$has_forbidden_chars" != x; then
55767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55771      # Going to short mode and back again did indeed matter. Since short mode is
55772      # case insensitive, let's make it lowercase to improve readability.
55773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55774      # Now convert it back to Unix-style (cygpath)
55775      input_path=`$CYGPATH -u "$shortmode_path"`
55776      new_path="$input_path"
55777    fi
55778  fi
55779
55780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55781  if test "x$test_cygdrive_prefix" = x; then
55782    # As a simple fix, exclude /usr/bin since it's not a real path.
55783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55785      # a path prefixed by /cygdrive for fixpath to work.
55786      new_path="$CYGWIN_ROOT_PATH$input_path"
55787    fi
55788  fi
55789
55790
55791  if test "x$path" != "x$new_path"; then
55792    MSVC_DLL="$new_path"
55793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55794$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55795  fi
55796
55797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55798
55799  path="$MSVC_DLL"
55800  has_colon=`$ECHO $path | $GREP ^.:`
55801  new_path="$path"
55802  if test "x$has_colon" = x; then
55803    # Not in mixed or Windows style, start by that.
55804    new_path=`cmd //c echo $path`
55805  fi
55806
55807
55808  input_path="$new_path"
55809  # Check if we need to convert this using DOS-style short mode. If the path
55810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55811  # take no chances and rewrite it.
55812  # Note: m4 eats our [], so we need to use [ and ] instead.
55813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55814  if test "x$has_forbidden_chars" != x; then
55815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55817  fi
55818
55819
55820  windows_path="$new_path"
55821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55822    unix_path=`$CYGPATH -u "$windows_path"`
55823    new_path="$unix_path"
55824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55826    new_path="$unix_path"
55827  fi
55828
55829  if test "x$path" != "x$new_path"; then
55830    MSVC_DLL="$new_path"
55831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55833  fi
55834
55835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55837
55838    else
55839      # We're on a unix platform. Hooray! :)
55840      path="$MSVC_DLL"
55841      has_space=`$ECHO "$path" | $GREP " "`
55842      if test "x$has_space" != x; then
55843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55844$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55846      fi
55847
55848      # Use eval to expand a potential ~
55849      eval path="$path"
55850      if test ! -f "$path" && test ! -d "$path"; then
55851        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55852      fi
55853
55854      if test -d "$path"; then
55855        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55856      else
55857        dir="`$DIRNAME "$path"`"
55858        base="`$BASENAME "$path"`"
55859        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55860      fi
55861    fi
55862  fi
55863
55864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55865$as_echo_n "checking for $DLL_NAME... " >&6; }
55866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55867$as_echo "$MSVC_DLL" >&6; }
55868    else
55869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55870$as_echo "incorrect, ignoring" >&6; }
55871      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55872$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55873    fi
55874  fi
55875
55876  fi
55877
55878  if test "x$MSVC_DLL" = x; then
55879    # Probe: Look in the Windows system32 directory
55880    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55881
55882  windows_path="$CYGWIN_SYSTEMROOT"
55883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55884    unix_path=`$CYGPATH -u "$windows_path"`
55885    CYGWIN_SYSTEMROOT="$unix_path"
55886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55888    CYGWIN_SYSTEMROOT="$unix_path"
55889  fi
55890
55891    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55892
55893  DLL_NAME="$DLL_NAME"
55894  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55895  METHOD="well-known location in SYSTEMROOT"
55896  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55897    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55898$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55899
55900    # Need to check if the found msvcr is correct architecture
55901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55902$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55903    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55905      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55906      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55907      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55908        CORRECT_MSVCR_ARCH="PE32 executable"
55909      else
55910        CORRECT_MSVCR_ARCH="PE32+ executable"
55911      fi
55912    else
55913      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55914        CORRECT_MSVCR_ARCH=386
55915      else
55916        CORRECT_MSVCR_ARCH=x86-64
55917      fi
55918    fi
55919    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55921$as_echo "ok" >&6; }
55922      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55923
55924  # Only process if variable expands to non-empty
55925
55926  if test "x$MSVC_DLL" != x; then
55927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55928
55929  # Input might be given as Windows format, start by converting to
55930  # unix format.
55931  path="$MSVC_DLL"
55932  new_path=`$CYGPATH -u "$path"`
55933
55934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55937  # "foo.exe" is OK but "foo" is an error.
55938  #
55939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55940  # It is also a way to make sure we got the proper file name for the real test later on.
55941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55942  if test "x$test_shortpath" = x; then
55943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55944$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55945    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55946  fi
55947
55948  # Call helper function which possibly converts this using DOS-style short mode.
55949  # If so, the updated path is stored in $new_path.
55950
55951  input_path="$new_path"
55952  # Check if we need to convert this using DOS-style short mode. If the path
55953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55954  # take no chances and rewrite it.
55955  # Note: m4 eats our [], so we need to use [ and ] instead.
55956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55957  if test "x$has_forbidden_chars" != x; then
55958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55962      # Going to short mode and back again did indeed matter. Since short mode is
55963      # case insensitive, let's make it lowercase to improve readability.
55964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55965      # Now convert it back to Unix-style (cygpath)
55966      input_path=`$CYGPATH -u "$shortmode_path"`
55967      new_path="$input_path"
55968    fi
55969  fi
55970
55971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55972  if test "x$test_cygdrive_prefix" = x; then
55973    # As a simple fix, exclude /usr/bin since it's not a real path.
55974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55976      # a path prefixed by /cygdrive for fixpath to work.
55977      new_path="$CYGWIN_ROOT_PATH$input_path"
55978    fi
55979  fi
55980
55981
55982  if test "x$path" != "x$new_path"; then
55983    MSVC_DLL="$new_path"
55984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55985$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55986  fi
55987
55988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55989
55990  path="$MSVC_DLL"
55991  has_colon=`$ECHO $path | $GREP ^.:`
55992  new_path="$path"
55993  if test "x$has_colon" = x; then
55994    # Not in mixed or Windows style, start by that.
55995    new_path=`cmd //c echo $path`
55996  fi
55997
55998
55999  input_path="$new_path"
56000  # Check if we need to convert this using DOS-style short mode. If the path
56001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56002  # take no chances and rewrite it.
56003  # Note: m4 eats our [], so we need to use [ and ] instead.
56004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56005  if test "x$has_forbidden_chars" != x; then
56006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56008  fi
56009
56010
56011  windows_path="$new_path"
56012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56013    unix_path=`$CYGPATH -u "$windows_path"`
56014    new_path="$unix_path"
56015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56017    new_path="$unix_path"
56018  fi
56019
56020  if test "x$path" != "x$new_path"; then
56021    MSVC_DLL="$new_path"
56022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56023$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56024  fi
56025
56026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56028
56029    else
56030      # We're on a unix platform. Hooray! :)
56031      path="$MSVC_DLL"
56032      has_space=`$ECHO "$path" | $GREP " "`
56033      if test "x$has_space" != x; then
56034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56035$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56037      fi
56038
56039      # Use eval to expand a potential ~
56040      eval path="$path"
56041      if test ! -f "$path" && test ! -d "$path"; then
56042        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56043      fi
56044
56045      if test -d "$path"; then
56046        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56047      else
56048        dir="`$DIRNAME "$path"`"
56049        base="`$BASENAME "$path"`"
56050        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56051      fi
56052    fi
56053  fi
56054
56055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56056$as_echo_n "checking for $DLL_NAME... " >&6; }
56057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56058$as_echo "$MSVC_DLL" >&6; }
56059    else
56060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56061$as_echo "incorrect, ignoring" >&6; }
56062      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56063$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56064    fi
56065  fi
56066
56067  fi
56068
56069  if test "x$MSVC_DLL" = x; then
56070    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56071    if test "x$VS100COMNTOOLS" != x; then
56072      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56073
56074  windows_path="$CYGWIN_VS_TOOLS_DIR"
56075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56076    unix_path=`$CYGPATH -u "$windows_path"`
56077    CYGWIN_VS_TOOLS_DIR="$unix_path"
56078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56080    CYGWIN_VS_TOOLS_DIR="$unix_path"
56081  fi
56082
56083      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56084        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56085	    | $GREP -i /x64/ | $HEAD --lines 1`
56086      else
56087        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56088	    | $GREP -i /x86/ | $HEAD --lines 1`
56089      fi
56090
56091  DLL_NAME="$DLL_NAME"
56092  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56093  METHOD="search of VS100COMNTOOLS"
56094  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56095    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56096$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56097
56098    # Need to check if the found msvcr is correct architecture
56099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56100$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56101    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56103      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56104      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56105      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56106        CORRECT_MSVCR_ARCH="PE32 executable"
56107      else
56108        CORRECT_MSVCR_ARCH="PE32+ executable"
56109      fi
56110    else
56111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56112        CORRECT_MSVCR_ARCH=386
56113      else
56114        CORRECT_MSVCR_ARCH=x86-64
56115      fi
56116    fi
56117    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56119$as_echo "ok" >&6; }
56120      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56121
56122  # Only process if variable expands to non-empty
56123
56124  if test "x$MSVC_DLL" != x; then
56125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56126
56127  # Input might be given as Windows format, start by converting to
56128  # unix format.
56129  path="$MSVC_DLL"
56130  new_path=`$CYGPATH -u "$path"`
56131
56132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56135  # "foo.exe" is OK but "foo" is an error.
56136  #
56137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56138  # It is also a way to make sure we got the proper file name for the real test later on.
56139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56140  if test "x$test_shortpath" = x; then
56141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56143    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56144  fi
56145
56146  # Call helper function which possibly converts this using DOS-style short mode.
56147  # If so, the updated path is stored in $new_path.
56148
56149  input_path="$new_path"
56150  # Check if we need to convert this using DOS-style short mode. If the path
56151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56152  # take no chances and rewrite it.
56153  # Note: m4 eats our [], so we need to use [ and ] instead.
56154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56155  if test "x$has_forbidden_chars" != x; then
56156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56160      # Going to short mode and back again did indeed matter. Since short mode is
56161      # case insensitive, let's make it lowercase to improve readability.
56162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56163      # Now convert it back to Unix-style (cygpath)
56164      input_path=`$CYGPATH -u "$shortmode_path"`
56165      new_path="$input_path"
56166    fi
56167  fi
56168
56169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56170  if test "x$test_cygdrive_prefix" = x; then
56171    # As a simple fix, exclude /usr/bin since it's not a real path.
56172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56174      # a path prefixed by /cygdrive for fixpath to work.
56175      new_path="$CYGWIN_ROOT_PATH$input_path"
56176    fi
56177  fi
56178
56179
56180  if test "x$path" != "x$new_path"; then
56181    MSVC_DLL="$new_path"
56182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56184  fi
56185
56186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56187
56188  path="$MSVC_DLL"
56189  has_colon=`$ECHO $path | $GREP ^.:`
56190  new_path="$path"
56191  if test "x$has_colon" = x; then
56192    # Not in mixed or Windows style, start by that.
56193    new_path=`cmd //c echo $path`
56194  fi
56195
56196
56197  input_path="$new_path"
56198  # Check if we need to convert this using DOS-style short mode. If the path
56199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56200  # take no chances and rewrite it.
56201  # Note: m4 eats our [], so we need to use [ and ] instead.
56202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56203  if test "x$has_forbidden_chars" != x; then
56204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56206  fi
56207
56208
56209  windows_path="$new_path"
56210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56211    unix_path=`$CYGPATH -u "$windows_path"`
56212    new_path="$unix_path"
56213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56215    new_path="$unix_path"
56216  fi
56217
56218  if test "x$path" != "x$new_path"; then
56219    MSVC_DLL="$new_path"
56220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56222  fi
56223
56224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56226
56227    else
56228      # We're on a unix platform. Hooray! :)
56229      path="$MSVC_DLL"
56230      has_space=`$ECHO "$path" | $GREP " "`
56231      if test "x$has_space" != x; then
56232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56235      fi
56236
56237      # Use eval to expand a potential ~
56238      eval path="$path"
56239      if test ! -f "$path" && test ! -d "$path"; then
56240        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56241      fi
56242
56243      if test -d "$path"; then
56244        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56245      else
56246        dir="`$DIRNAME "$path"`"
56247        base="`$BASENAME "$path"`"
56248        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56249      fi
56250    fi
56251  fi
56252
56253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56254$as_echo_n "checking for $DLL_NAME... " >&6; }
56255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56256$as_echo "$MSVC_DLL" >&6; }
56257    else
56258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56259$as_echo "incorrect, ignoring" >&6; }
56260      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56261$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56262    fi
56263  fi
56264
56265    fi
56266  fi
56267
56268  if test "x$MSVC_DLL" = x; then
56269    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56270    # (This was the original behaviour; kept since it might turn something up)
56271    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56272      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56273        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56274	    | $GREP x64 | $HEAD --lines 1`
56275      else
56276        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56277	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56278        if test "x$POSSIBLE_MSVC_DLL" = x; then
56279          # We're grasping at straws now...
56280          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56281	      | $HEAD --lines 1`
56282        fi
56283      fi
56284
56285
56286  DLL_NAME="$DLL_NAME"
56287  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56288  METHOD="search of VCINSTALLDIR"
56289  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56290    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56291$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56292
56293    # Need to check if the found msvcr is correct architecture
56294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56295$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56296    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56298      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56299      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56300      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56301        CORRECT_MSVCR_ARCH="PE32 executable"
56302      else
56303        CORRECT_MSVCR_ARCH="PE32+ executable"
56304      fi
56305    else
56306      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56307        CORRECT_MSVCR_ARCH=386
56308      else
56309        CORRECT_MSVCR_ARCH=x86-64
56310      fi
56311    fi
56312    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56314$as_echo "ok" >&6; }
56315      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56316
56317  # Only process if variable expands to non-empty
56318
56319  if test "x$MSVC_DLL" != x; then
56320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56321
56322  # Input might be given as Windows format, start by converting to
56323  # unix format.
56324  path="$MSVC_DLL"
56325  new_path=`$CYGPATH -u "$path"`
56326
56327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56330  # "foo.exe" is OK but "foo" is an error.
56331  #
56332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56333  # It is also a way to make sure we got the proper file name for the real test later on.
56334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56335  if test "x$test_shortpath" = x; then
56336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56337$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56338    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56339  fi
56340
56341  # Call helper function which possibly converts this using DOS-style short mode.
56342  # If so, the updated path is stored in $new_path.
56343
56344  input_path="$new_path"
56345  # Check if we need to convert this using DOS-style short mode. If the path
56346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56347  # take no chances and rewrite it.
56348  # Note: m4 eats our [], so we need to use [ and ] instead.
56349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56350  if test "x$has_forbidden_chars" != x; then
56351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56355      # Going to short mode and back again did indeed matter. Since short mode is
56356      # case insensitive, let's make it lowercase to improve readability.
56357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56358      # Now convert it back to Unix-style (cygpath)
56359      input_path=`$CYGPATH -u "$shortmode_path"`
56360      new_path="$input_path"
56361    fi
56362  fi
56363
56364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56365  if test "x$test_cygdrive_prefix" = x; then
56366    # As a simple fix, exclude /usr/bin since it's not a real path.
56367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56369      # a path prefixed by /cygdrive for fixpath to work.
56370      new_path="$CYGWIN_ROOT_PATH$input_path"
56371    fi
56372  fi
56373
56374
56375  if test "x$path" != "x$new_path"; then
56376    MSVC_DLL="$new_path"
56377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56378$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56379  fi
56380
56381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56382
56383  path="$MSVC_DLL"
56384  has_colon=`$ECHO $path | $GREP ^.:`
56385  new_path="$path"
56386  if test "x$has_colon" = x; then
56387    # Not in mixed or Windows style, start by that.
56388    new_path=`cmd //c echo $path`
56389  fi
56390
56391
56392  input_path="$new_path"
56393  # Check if we need to convert this using DOS-style short mode. If the path
56394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56395  # take no chances and rewrite it.
56396  # Note: m4 eats our [], so we need to use [ and ] instead.
56397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56398  if test "x$has_forbidden_chars" != x; then
56399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56401  fi
56402
56403
56404  windows_path="$new_path"
56405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56406    unix_path=`$CYGPATH -u "$windows_path"`
56407    new_path="$unix_path"
56408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56410    new_path="$unix_path"
56411  fi
56412
56413  if test "x$path" != "x$new_path"; then
56414    MSVC_DLL="$new_path"
56415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56416$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56417  fi
56418
56419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56421
56422    else
56423      # We're on a unix platform. Hooray! :)
56424      path="$MSVC_DLL"
56425      has_space=`$ECHO "$path" | $GREP " "`
56426      if test "x$has_space" != x; then
56427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56428$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56430      fi
56431
56432      # Use eval to expand a potential ~
56433      eval path="$path"
56434      if test ! -f "$path" && test ! -d "$path"; then
56435        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56436      fi
56437
56438      if test -d "$path"; then
56439        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56440      else
56441        dir="`$DIRNAME "$path"`"
56442        base="`$BASENAME "$path"`"
56443        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56444      fi
56445    fi
56446  fi
56447
56448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56449$as_echo_n "checking for $DLL_NAME... " >&6; }
56450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56451$as_echo "$MSVC_DLL" >&6; }
56452    else
56453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56454$as_echo "incorrect, ignoring" >&6; }
56455      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56456$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56457    fi
56458  fi
56459
56460    fi
56461  fi
56462
56463  if test "x$MSVC_DLL" = x; then
56464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56465$as_echo_n "checking for $DLL_NAME... " >&6; }
56466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56467$as_echo "no" >&6; }
56468    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56469  fi
56470
56471      MSVCP_DLL="$MSVC_DLL"
56472    fi
56473
56474  fi
56475
56476  fi
56477
56478
56479  if test "x$NEEDS_LIB_X11" = xfalse; then
56480    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56481      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56482$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56483    fi
56484    X_CFLAGS=
56485    X_LIBS=
56486  else
56487
56488    if test "x${with_x}" = xno; then
56489      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56490    fi
56491
56492    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56493      # The user has specified a X11 base directory. Use it for includes and
56494      # libraries, unless explicitely overridden.
56495      if test "x$x_includes" = xNONE; then
56496        x_includes="${with_x}/include"
56497      fi
56498      if test "x$x_libraries" = xNONE; then
56499        x_libraries="${with_x}/lib"
56500      fi
56501    else
56502      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56503      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56504      # --x-libraries for the sysroot, if that seems to be correct.
56505      if test "x$SYSROOT" != "x"; then
56506        if test "x$x_includes" = xNONE; then
56507          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56508            x_includes="$SYSROOT/usr/X11R6/include"
56509          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56510            x_includes="$SYSROOT/usr/include"
56511          fi
56512        fi
56513        if test "x$x_libraries" = xNONE; then
56514          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56515            x_libraries="$SYSROOT/usr/X11R6/lib"
56516          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56517            x_libraries="$SYSROOT/usr/lib64"
56518          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56519            x_libraries="$SYSROOT/usr/lib"
56520          fi
56521        fi
56522      fi
56523    fi
56524
56525    # Now let autoconf do it's magic
56526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56527$as_echo_n "checking for X... " >&6; }
56528
56529
56530# Check whether --with-x was given.
56531if test "${with_x+set}" = set; then :
56532  withval=$with_x;
56533fi
56534
56535# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56536if test "x$with_x" = xno; then
56537  # The user explicitly disabled X.
56538  have_x=disabled
56539else
56540  case $x_includes,$x_libraries in #(
56541    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56542    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56543  $as_echo_n "(cached) " >&6
56544else
56545  # One or both of the vars are not set, and there is no cached value.
56546ac_x_includes=no ac_x_libraries=no
56547rm -f -r conftest.dir
56548if mkdir conftest.dir; then
56549  cd conftest.dir
56550  cat >Imakefile <<'_ACEOF'
56551incroot:
56552	@echo incroot='${INCROOT}'
56553usrlibdir:
56554	@echo usrlibdir='${USRLIBDIR}'
56555libdir:
56556	@echo libdir='${LIBDIR}'
56557_ACEOF
56558  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56559    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56560    for ac_var in incroot usrlibdir libdir; do
56561      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56562    done
56563    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56564    for ac_extension in a so sl dylib la dll; do
56565      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56566	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56567	ac_im_usrlibdir=$ac_im_libdir; break
56568      fi
56569    done
56570    # Screen out bogus values from the imake configuration.  They are
56571    # bogus both because they are the default anyway, and because
56572    # using them would break gcc on systems where it needs fixed includes.
56573    case $ac_im_incroot in
56574	/usr/include) ac_x_includes= ;;
56575	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56576    esac
56577    case $ac_im_usrlibdir in
56578	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56579	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56580    esac
56581  fi
56582  cd ..
56583  rm -f -r conftest.dir
56584fi
56585
56586# Standard set of common directories for X headers.
56587# Check X11 before X11Rn because it is often a symlink to the current release.
56588ac_x_header_dirs='
56589/usr/X11/include
56590/usr/X11R7/include
56591/usr/X11R6/include
56592/usr/X11R5/include
56593/usr/X11R4/include
56594
56595/usr/include/X11
56596/usr/include/X11R7
56597/usr/include/X11R6
56598/usr/include/X11R5
56599/usr/include/X11R4
56600
56601/usr/local/X11/include
56602/usr/local/X11R7/include
56603/usr/local/X11R6/include
56604/usr/local/X11R5/include
56605/usr/local/X11R4/include
56606
56607/usr/local/include/X11
56608/usr/local/include/X11R7
56609/usr/local/include/X11R6
56610/usr/local/include/X11R5
56611/usr/local/include/X11R4
56612
56613/usr/X386/include
56614/usr/x386/include
56615/usr/XFree86/include/X11
56616
56617/usr/include
56618/usr/local/include
56619/usr/unsupported/include
56620/usr/athena/include
56621/usr/local/x11r5/include
56622/usr/lpp/Xamples/include
56623
56624/usr/openwin/include
56625/usr/openwin/share/include'
56626
56627if test "$ac_x_includes" = no; then
56628  # Guess where to find include files, by looking for Xlib.h.
56629  # First, try using that file with no special directory specified.
56630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56631/* end confdefs.h.  */
56632#include <X11/Xlib.h>
56633_ACEOF
56634if ac_fn_cxx_try_cpp "$LINENO"; then :
56635  # We can compile using X headers with no special include directory.
56636ac_x_includes=
56637else
56638  for ac_dir in $ac_x_header_dirs; do
56639  if test -r "$ac_dir/X11/Xlib.h"; then
56640    ac_x_includes=$ac_dir
56641    break
56642  fi
56643done
56644fi
56645rm -f conftest.err conftest.i conftest.$ac_ext
56646fi # $ac_x_includes = no
56647
56648if test "$ac_x_libraries" = no; then
56649  # Check for the libraries.
56650  # See if we find them without any special options.
56651  # Don't add to $LIBS permanently.
56652  ac_save_LIBS=$LIBS
56653  LIBS="-lX11 $LIBS"
56654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56655/* end confdefs.h.  */
56656#include <X11/Xlib.h>
56657int
56658main ()
56659{
56660XrmInitialize ()
56661  ;
56662  return 0;
56663}
56664_ACEOF
56665if ac_fn_cxx_try_link "$LINENO"; then :
56666  LIBS=$ac_save_LIBS
56667# We can link X programs with no special library path.
56668ac_x_libraries=
56669else
56670  LIBS=$ac_save_LIBS
56671for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56672do
56673  # Don't even attempt the hair of trying to link an X program!
56674  for ac_extension in a so sl dylib la dll; do
56675    if test -r "$ac_dir/libX11.$ac_extension"; then
56676      ac_x_libraries=$ac_dir
56677      break 2
56678    fi
56679  done
56680done
56681fi
56682rm -f core conftest.err conftest.$ac_objext \
56683    conftest$ac_exeext conftest.$ac_ext
56684fi # $ac_x_libraries = no
56685
56686case $ac_x_includes,$ac_x_libraries in #(
56687  no,* | *,no | *\'*)
56688    # Didn't find X, or a directory has "'" in its name.
56689    ac_cv_have_x="have_x=no";; #(
56690  *)
56691    # Record where we found X for the cache.
56692    ac_cv_have_x="have_x=yes\
56693	ac_x_includes='$ac_x_includes'\
56694	ac_x_libraries='$ac_x_libraries'"
56695esac
56696fi
56697;; #(
56698    *) have_x=yes;;
56699  esac
56700  eval "$ac_cv_have_x"
56701fi # $with_x != no
56702
56703if test "$have_x" != yes; then
56704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56705$as_echo "$have_x" >&6; }
56706  no_x=yes
56707else
56708  # If each of the values was on the command line, it overrides each guess.
56709  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56710  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56711  # Update the cache value to reflect the command line values.
56712  ac_cv_have_x="have_x=yes\
56713	ac_x_includes='$x_includes'\
56714	ac_x_libraries='$x_libraries'"
56715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56716$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56717fi
56718
56719    if test "$no_x" = yes; then
56720  # Not all programs may use this symbol, but it does not hurt to define it.
56721
56722$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56723
56724  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56725else
56726  if test -n "$x_includes"; then
56727    X_CFLAGS="$X_CFLAGS -I$x_includes"
56728  fi
56729
56730  # It would also be nice to do this for all -L options, not just this one.
56731  if test -n "$x_libraries"; then
56732    X_LIBS="$X_LIBS -L$x_libraries"
56733    # For Solaris; some versions of Sun CC require a space after -R and
56734    # others require no space.  Words are not sufficient . . . .
56735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56736$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56737    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56738    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56739    ac_cxx_werror_flag=yes
56740    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56741/* end confdefs.h.  */
56742
56743int
56744main ()
56745{
56746
56747  ;
56748  return 0;
56749}
56750_ACEOF
56751if ac_fn_cxx_try_link "$LINENO"; then :
56752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56753$as_echo "no" >&6; }
56754       X_LIBS="$X_LIBS -R$x_libraries"
56755else
56756  LIBS="$ac_xsave_LIBS -R $x_libraries"
56757       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56758/* end confdefs.h.  */
56759
56760int
56761main ()
56762{
56763
56764  ;
56765  return 0;
56766}
56767_ACEOF
56768if ac_fn_cxx_try_link "$LINENO"; then :
56769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56770$as_echo "yes" >&6; }
56771	  X_LIBS="$X_LIBS -R $x_libraries"
56772else
56773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56774$as_echo "neither works" >&6; }
56775fi
56776rm -f core conftest.err conftest.$ac_objext \
56777    conftest$ac_exeext conftest.$ac_ext
56778fi
56779rm -f core conftest.err conftest.$ac_objext \
56780    conftest$ac_exeext conftest.$ac_ext
56781    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56782    LIBS=$ac_xsave_LIBS
56783  fi
56784
56785  # Check for system-dependent libraries X programs must link with.
56786  # Do this before checking for the system-independent R6 libraries
56787  # (-lICE), since we may need -lsocket or whatever for X linking.
56788
56789  if test "$ISC" = yes; then
56790    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56791  else
56792    # Martyn Johnson says this is needed for Ultrix, if the X
56793    # libraries were built with DECnet support.  And Karl Berry says
56794    # the Alpha needs dnet_stub (dnet does not exist).
56795    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56797/* end confdefs.h.  */
56798
56799/* Override any GCC internal prototype to avoid an error.
56800   Use char because int might match the return type of a GCC
56801   builtin and then its argument prototype would still apply.  */
56802#ifdef __cplusplus
56803extern "C"
56804#endif
56805char XOpenDisplay ();
56806int
56807main ()
56808{
56809return XOpenDisplay ();
56810  ;
56811  return 0;
56812}
56813_ACEOF
56814if ac_fn_cxx_try_link "$LINENO"; then :
56815
56816else
56817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56818$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56819if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56820  $as_echo_n "(cached) " >&6
56821else
56822  ac_check_lib_save_LIBS=$LIBS
56823LIBS="-ldnet  $LIBS"
56824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56825/* end confdefs.h.  */
56826
56827/* Override any GCC internal prototype to avoid an error.
56828   Use char because int might match the return type of a GCC
56829   builtin and then its argument prototype would still apply.  */
56830#ifdef __cplusplus
56831extern "C"
56832#endif
56833char dnet_ntoa ();
56834int
56835main ()
56836{
56837return dnet_ntoa ();
56838  ;
56839  return 0;
56840}
56841_ACEOF
56842if ac_fn_cxx_try_link "$LINENO"; then :
56843  ac_cv_lib_dnet_dnet_ntoa=yes
56844else
56845  ac_cv_lib_dnet_dnet_ntoa=no
56846fi
56847rm -f core conftest.err conftest.$ac_objext \
56848    conftest$ac_exeext conftest.$ac_ext
56849LIBS=$ac_check_lib_save_LIBS
56850fi
56851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56852$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56853if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56854  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56855fi
56856
56857    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56859$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56860if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56861  $as_echo_n "(cached) " >&6
56862else
56863  ac_check_lib_save_LIBS=$LIBS
56864LIBS="-ldnet_stub  $LIBS"
56865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56866/* end confdefs.h.  */
56867
56868/* Override any GCC internal prototype to avoid an error.
56869   Use char because int might match the return type of a GCC
56870   builtin and then its argument prototype would still apply.  */
56871#ifdef __cplusplus
56872extern "C"
56873#endif
56874char dnet_ntoa ();
56875int
56876main ()
56877{
56878return dnet_ntoa ();
56879  ;
56880  return 0;
56881}
56882_ACEOF
56883if ac_fn_cxx_try_link "$LINENO"; then :
56884  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56885else
56886  ac_cv_lib_dnet_stub_dnet_ntoa=no
56887fi
56888rm -f core conftest.err conftest.$ac_objext \
56889    conftest$ac_exeext conftest.$ac_ext
56890LIBS=$ac_check_lib_save_LIBS
56891fi
56892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56893$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56894if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56895  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56896fi
56897
56898    fi
56899fi
56900rm -f core conftest.err conftest.$ac_objext \
56901    conftest$ac_exeext conftest.$ac_ext
56902    LIBS="$ac_xsave_LIBS"
56903
56904    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56905    # to get the SysV transport functions.
56906    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56907    # needs -lnsl.
56908    # The nsl library prevents programs from opening the X display
56909    # on Irix 5.2, according to T.E. Dickey.
56910    # The functions gethostbyname, getservbyname, and inet_addr are
56911    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56912    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56913if test "x$ac_cv_func_gethostbyname" = xyes; then :
56914
56915fi
56916
56917    if test $ac_cv_func_gethostbyname = no; then
56918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56919$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56920if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56921  $as_echo_n "(cached) " >&6
56922else
56923  ac_check_lib_save_LIBS=$LIBS
56924LIBS="-lnsl  $LIBS"
56925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56926/* end confdefs.h.  */
56927
56928/* Override any GCC internal prototype to avoid an error.
56929   Use char because int might match the return type of a GCC
56930   builtin and then its argument prototype would still apply.  */
56931#ifdef __cplusplus
56932extern "C"
56933#endif
56934char gethostbyname ();
56935int
56936main ()
56937{
56938return gethostbyname ();
56939  ;
56940  return 0;
56941}
56942_ACEOF
56943if ac_fn_cxx_try_link "$LINENO"; then :
56944  ac_cv_lib_nsl_gethostbyname=yes
56945else
56946  ac_cv_lib_nsl_gethostbyname=no
56947fi
56948rm -f core conftest.err conftest.$ac_objext \
56949    conftest$ac_exeext conftest.$ac_ext
56950LIBS=$ac_check_lib_save_LIBS
56951fi
56952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56953$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56954if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56955  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56956fi
56957
56958      if test $ac_cv_lib_nsl_gethostbyname = no; then
56959	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56960$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56961if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56962  $as_echo_n "(cached) " >&6
56963else
56964  ac_check_lib_save_LIBS=$LIBS
56965LIBS="-lbsd  $LIBS"
56966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56967/* end confdefs.h.  */
56968
56969/* Override any GCC internal prototype to avoid an error.
56970   Use char because int might match the return type of a GCC
56971   builtin and then its argument prototype would still apply.  */
56972#ifdef __cplusplus
56973extern "C"
56974#endif
56975char gethostbyname ();
56976int
56977main ()
56978{
56979return gethostbyname ();
56980  ;
56981  return 0;
56982}
56983_ACEOF
56984if ac_fn_cxx_try_link "$LINENO"; then :
56985  ac_cv_lib_bsd_gethostbyname=yes
56986else
56987  ac_cv_lib_bsd_gethostbyname=no
56988fi
56989rm -f core conftest.err conftest.$ac_objext \
56990    conftest$ac_exeext conftest.$ac_ext
56991LIBS=$ac_check_lib_save_LIBS
56992fi
56993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56994$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56995if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56996  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56997fi
56998
56999      fi
57000    fi
57001
57002    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57003    # socket/setsockopt and other routines are undefined under SCO ODT
57004    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57005    # on later versions), says Simon Leinen: it contains gethostby*
57006    # variants that don't use the name server (or something).  -lsocket
57007    # must be given before -lnsl if both are needed.  We assume that
57008    # if connect needs -lnsl, so does gethostbyname.
57009    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57010if test "x$ac_cv_func_connect" = xyes; then :
57011
57012fi
57013
57014    if test $ac_cv_func_connect = no; then
57015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57016$as_echo_n "checking for connect in -lsocket... " >&6; }
57017if ${ac_cv_lib_socket_connect+:} false; then :
57018  $as_echo_n "(cached) " >&6
57019else
57020  ac_check_lib_save_LIBS=$LIBS
57021LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57023/* end confdefs.h.  */
57024
57025/* Override any GCC internal prototype to avoid an error.
57026   Use char because int might match the return type of a GCC
57027   builtin and then its argument prototype would still apply.  */
57028#ifdef __cplusplus
57029extern "C"
57030#endif
57031char connect ();
57032int
57033main ()
57034{
57035return connect ();
57036  ;
57037  return 0;
57038}
57039_ACEOF
57040if ac_fn_cxx_try_link "$LINENO"; then :
57041  ac_cv_lib_socket_connect=yes
57042else
57043  ac_cv_lib_socket_connect=no
57044fi
57045rm -f core conftest.err conftest.$ac_objext \
57046    conftest$ac_exeext conftest.$ac_ext
57047LIBS=$ac_check_lib_save_LIBS
57048fi
57049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57050$as_echo "$ac_cv_lib_socket_connect" >&6; }
57051if test "x$ac_cv_lib_socket_connect" = xyes; then :
57052  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57053fi
57054
57055    fi
57056
57057    # Guillermo Gomez says -lposix is necessary on A/UX.
57058    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57059if test "x$ac_cv_func_remove" = xyes; then :
57060
57061fi
57062
57063    if test $ac_cv_func_remove = no; then
57064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57065$as_echo_n "checking for remove in -lposix... " >&6; }
57066if ${ac_cv_lib_posix_remove+:} false; then :
57067  $as_echo_n "(cached) " >&6
57068else
57069  ac_check_lib_save_LIBS=$LIBS
57070LIBS="-lposix  $LIBS"
57071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57072/* end confdefs.h.  */
57073
57074/* Override any GCC internal prototype to avoid an error.
57075   Use char because int might match the return type of a GCC
57076   builtin and then its argument prototype would still apply.  */
57077#ifdef __cplusplus
57078extern "C"
57079#endif
57080char remove ();
57081int
57082main ()
57083{
57084return remove ();
57085  ;
57086  return 0;
57087}
57088_ACEOF
57089if ac_fn_cxx_try_link "$LINENO"; then :
57090  ac_cv_lib_posix_remove=yes
57091else
57092  ac_cv_lib_posix_remove=no
57093fi
57094rm -f core conftest.err conftest.$ac_objext \
57095    conftest$ac_exeext conftest.$ac_ext
57096LIBS=$ac_check_lib_save_LIBS
57097fi
57098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57099$as_echo "$ac_cv_lib_posix_remove" >&6; }
57100if test "x$ac_cv_lib_posix_remove" = xyes; then :
57101  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57102fi
57103
57104    fi
57105
57106    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57107    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57108if test "x$ac_cv_func_shmat" = xyes; then :
57109
57110fi
57111
57112    if test $ac_cv_func_shmat = no; then
57113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57114$as_echo_n "checking for shmat in -lipc... " >&6; }
57115if ${ac_cv_lib_ipc_shmat+:} false; then :
57116  $as_echo_n "(cached) " >&6
57117else
57118  ac_check_lib_save_LIBS=$LIBS
57119LIBS="-lipc  $LIBS"
57120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57121/* end confdefs.h.  */
57122
57123/* Override any GCC internal prototype to avoid an error.
57124   Use char because int might match the return type of a GCC
57125   builtin and then its argument prototype would still apply.  */
57126#ifdef __cplusplus
57127extern "C"
57128#endif
57129char shmat ();
57130int
57131main ()
57132{
57133return shmat ();
57134  ;
57135  return 0;
57136}
57137_ACEOF
57138if ac_fn_cxx_try_link "$LINENO"; then :
57139  ac_cv_lib_ipc_shmat=yes
57140else
57141  ac_cv_lib_ipc_shmat=no
57142fi
57143rm -f core conftest.err conftest.$ac_objext \
57144    conftest$ac_exeext conftest.$ac_ext
57145LIBS=$ac_check_lib_save_LIBS
57146fi
57147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57148$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57149if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57150  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57151fi
57152
57153    fi
57154  fi
57155
57156  # Check for libraries that X11R6 Xt/Xaw programs need.
57157  ac_save_LDFLAGS=$LDFLAGS
57158  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57159  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57160  # check for ICE first), but we must link in the order -lSM -lICE or
57161  # we get undefined symbols.  So assume we have SM if we have ICE.
57162  # These have to be linked with before -lX11, unlike the other
57163  # libraries we check for below, so use a different variable.
57164  # John Interrante, Karl Berry
57165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57166$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57167if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57168  $as_echo_n "(cached) " >&6
57169else
57170  ac_check_lib_save_LIBS=$LIBS
57171LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57173/* end confdefs.h.  */
57174
57175/* Override any GCC internal prototype to avoid an error.
57176   Use char because int might match the return type of a GCC
57177   builtin and then its argument prototype would still apply.  */
57178#ifdef __cplusplus
57179extern "C"
57180#endif
57181char IceConnectionNumber ();
57182int
57183main ()
57184{
57185return IceConnectionNumber ();
57186  ;
57187  return 0;
57188}
57189_ACEOF
57190if ac_fn_cxx_try_link "$LINENO"; then :
57191  ac_cv_lib_ICE_IceConnectionNumber=yes
57192else
57193  ac_cv_lib_ICE_IceConnectionNumber=no
57194fi
57195rm -f core conftest.err conftest.$ac_objext \
57196    conftest$ac_exeext conftest.$ac_ext
57197LIBS=$ac_check_lib_save_LIBS
57198fi
57199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57200$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57201if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57202  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57203fi
57204
57205  LDFLAGS=$ac_save_LDFLAGS
57206
57207fi
57208
57209
57210    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57211    # this doesn't make sense so we remove it.
57212    if test "x$COMPILE_TYPE" = xcross; then
57213      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57214    fi
57215
57216    if test "x$no_x" = xyes; then
57217
57218  # Print a helpful message on how to acquire the necessary build dependency.
57219  # x11 is the help tag: freetype, cups, alsa etc
57220  MISSING_DEPENDENCY=x11
57221
57222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57223    cygwin_help $MISSING_DEPENDENCY
57224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57225    msys_help $MISSING_DEPENDENCY
57226  else
57227    PKGHANDLER_COMMAND=
57228
57229    case $PKGHANDLER in
57230      apt-get)
57231        apt_help     $MISSING_DEPENDENCY ;;
57232      yum)
57233        yum_help     $MISSING_DEPENDENCY ;;
57234      port)
57235        port_help    $MISSING_DEPENDENCY ;;
57236      pkgutil)
57237        pkgutil_help $MISSING_DEPENDENCY ;;
57238      pkgadd)
57239        pkgadd_help  $MISSING_DEPENDENCY ;;
57240    esac
57241
57242    if test "x$PKGHANDLER_COMMAND" != x; then
57243      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57244    fi
57245  fi
57246
57247      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57248    fi
57249
57250    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57251      OPENWIN_HOME="/usr/openwin"
57252      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57253      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57254          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57255          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57256          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57257    fi
57258
57259    ac_ext=c
57260ac_cpp='$CPP $CPPFLAGS'
57261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57263ac_compiler_gnu=$ac_cv_c_compiler_gnu
57264
57265    OLD_CFLAGS="$CFLAGS"
57266    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57267
57268    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57269    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57270do :
57271  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57272ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57273          # include <X11/Xlib.h>
57274          # include <X11/Xutil.h>
57275
57276
57277"
57278if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57279  cat >>confdefs.h <<_ACEOF
57280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57281_ACEOF
57282 X11_HEADERS_OK=yes
57283else
57284  X11_HEADERS_OK=no; break
57285fi
57286
57287done
57288
57289
57290    if test "x$X11_HEADERS_OK" = xno; then
57291
57292  # Print a helpful message on how to acquire the necessary build dependency.
57293  # x11 is the help tag: freetype, cups, alsa etc
57294  MISSING_DEPENDENCY=x11
57295
57296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57297    cygwin_help $MISSING_DEPENDENCY
57298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57299    msys_help $MISSING_DEPENDENCY
57300  else
57301    PKGHANDLER_COMMAND=
57302
57303    case $PKGHANDLER in
57304      apt-get)
57305        apt_help     $MISSING_DEPENDENCY ;;
57306      yum)
57307        yum_help     $MISSING_DEPENDENCY ;;
57308      port)
57309        port_help    $MISSING_DEPENDENCY ;;
57310      pkgutil)
57311        pkgutil_help $MISSING_DEPENDENCY ;;
57312      pkgadd)
57313        pkgadd_help  $MISSING_DEPENDENCY ;;
57314    esac
57315
57316    if test "x$PKGHANDLER_COMMAND" != x; then
57317      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57318    fi
57319  fi
57320
57321      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57322    fi
57323
57324    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57325    # defined in libawt_xawt.
57326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57327$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57329/* end confdefs.h.  */
57330#include <X11/extensions/Xrender.h>
57331int
57332main ()
57333{
57334XLinearGradient x;
57335  ;
57336  return 0;
57337}
57338_ACEOF
57339if ac_fn_c_try_compile "$LINENO"; then :
57340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57341$as_echo "yes" >&6; }
57342else
57343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57344$as_echo "no" >&6; }
57345         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57346fi
57347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57348
57349    CFLAGS="$OLD_CFLAGS"
57350    ac_ext=cpp
57351ac_cpp='$CXXCPP $CPPFLAGS'
57352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57355
57356  fi # NEEDS_LIB_X11
57357
57358
57359
57360
57361
57362
57363# Check whether --with-cups was given.
57364if test "${with_cups+set}" = set; then :
57365  withval=$with_cups;
57366fi
57367
57368
57369# Check whether --with-cups-include was given.
57370if test "${with_cups_include+set}" = set; then :
57371  withval=$with_cups_include;
57372fi
57373
57374
57375  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57376    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57377        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57378      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57379$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57380    fi
57381    CUPS_CFLAGS=
57382  else
57383    CUPS_FOUND=no
57384
57385    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57386      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57387    fi
57388
57389    if test "x${with_cups}" != x; then
57390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57391$as_echo_n "checking for cups headers... " >&6; }
57392      if test -s "${with_cups}/include/cups/cups.h"; then
57393        CUPS_CFLAGS="-I${with_cups}/include"
57394        CUPS_FOUND=yes
57395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57396$as_echo "$CUPS_FOUND" >&6; }
57397      else
57398        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57399      fi
57400    fi
57401    if test "x${with_cups_include}" != x; then
57402      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57403$as_echo_n "checking for cups headers... " >&6; }
57404      if test -s "${with_cups_include}/cups/cups.h"; then
57405        CUPS_CFLAGS="-I${with_cups_include}"
57406        CUPS_FOUND=yes
57407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57408$as_echo "$CUPS_FOUND" >&6; }
57409      else
57410        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57411      fi
57412    fi
57413    if test "x$CUPS_FOUND" = xno; then
57414      # Are the cups headers installed in the default /usr/include location?
57415      for ac_header in cups/cups.h cups/ppd.h
57416do :
57417  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57418ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57419if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57420  cat >>confdefs.h <<_ACEOF
57421#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57422_ACEOF
57423
57424          CUPS_FOUND=yes
57425          CUPS_CFLAGS=
57426          DEFAULT_CUPS=yes
57427
57428fi
57429
57430done
57431
57432    fi
57433    if test "x$CUPS_FOUND" = xno; then
57434      # Getting nervous now? Lets poke around for standard Solaris third-party
57435      # package installation locations.
57436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57437$as_echo_n "checking for cups headers... " >&6; }
57438      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57439        # An SFW package seems to be installed!
57440        CUPS_FOUND=yes
57441        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57442      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57443        # A CSW package seems to be installed!
57444        CUPS_FOUND=yes
57445        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57446      fi
57447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57448$as_echo "$CUPS_FOUND" >&6; }
57449    fi
57450    if test "x$CUPS_FOUND" = xno; then
57451
57452  # Print a helpful message on how to acquire the necessary build dependency.
57453  # cups is the help tag: freetype, cups, alsa etc
57454  MISSING_DEPENDENCY=cups
57455
57456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57457    cygwin_help $MISSING_DEPENDENCY
57458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57459    msys_help $MISSING_DEPENDENCY
57460  else
57461    PKGHANDLER_COMMAND=
57462
57463    case $PKGHANDLER in
57464      apt-get)
57465        apt_help     $MISSING_DEPENDENCY ;;
57466      yum)
57467        yum_help     $MISSING_DEPENDENCY ;;
57468      port)
57469        port_help    $MISSING_DEPENDENCY ;;
57470      pkgutil)
57471        pkgutil_help $MISSING_DEPENDENCY ;;
57472      pkgadd)
57473        pkgadd_help  $MISSING_DEPENDENCY ;;
57474    esac
57475
57476    if test "x$PKGHANDLER_COMMAND" != x; then
57477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57478    fi
57479  fi
57480
57481      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57482    fi
57483  fi
57484
57485
57486
57487
57488
57489# Check whether --with-freetype was given.
57490if test "${with_freetype+set}" = set; then :
57491  withval=$with_freetype;
57492fi
57493
57494
57495# Check whether --with-freetype-include was given.
57496if test "${with_freetype_include+set}" = set; then :
57497  withval=$with_freetype_include;
57498fi
57499
57500
57501# Check whether --with-freetype-lib was given.
57502if test "${with_freetype_lib+set}" = set; then :
57503  withval=$with_freetype_lib;
57504fi
57505
57506
57507# Check whether --with-freetype-src was given.
57508if test "${with_freetype_src+set}" = set; then :
57509  withval=$with_freetype_src;
57510fi
57511
57512  # Check whether --enable-freetype-bundling was given.
57513if test "${enable_freetype_bundling+set}" = set; then :
57514  enableval=$enable_freetype_bundling;
57515fi
57516
57517
57518  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57519  FREETYPE_BASE_NAME=freetype
57520  FREETYPE_CFLAGS=
57521  FREETYPE_LIBS=
57522  FREETYPE_BUNDLE_LIB_PATH=
57523
57524  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57525    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57526        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57527        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57528        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57529      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57530$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57531    fi
57532    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57533      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57534$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57535    fi
57536  else
57537    # freetype is needed to build; go get it!
57538
57539    BUNDLE_FREETYPE="$enable_freetype_bundling"
57540
57541    if  test "x$with_freetype_src" != x; then
57542      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57543        # Try to build freetype if --with-freetype-src was given on Windows
57544
57545  FREETYPE_SRC_PATH="$with_freetype_src"
57546  BUILD_FREETYPE=yes
57547
57548  # Check if the freetype sources are acessible..
57549  if ! test -d $FREETYPE_SRC_PATH; then
57550    { $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
57551$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57552    BUILD_FREETYPE=no
57553  fi
57554  # ..and contain a vc2010 project file
57555  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57556  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57557    { $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
57558$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57559    BUILD_FREETYPE=no
57560  fi
57561  # Now check if configure found a version of 'msbuild.exe'
57562  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57563    { $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
57564$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;}
57565    BUILD_FREETYPE=no
57566  fi
57567
57568  # Ready to go..
57569  if test "x$BUILD_FREETYPE" = xyes; then
57570    # msbuild requires trailing slashes for output directories
57571    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57572    freetype_lib_path_unix="$freetype_lib_path"
57573    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57574
57575  unix_path="$vcxproj_path"
57576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57577    windows_path=`$CYGPATH -m "$unix_path"`
57578    vcxproj_path="$windows_path"
57579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57580    windows_path=`cmd //c echo $unix_path`
57581    vcxproj_path="$windows_path"
57582  fi
57583
57584
57585  unix_path="$freetype_lib_path"
57586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57587    windows_path=`$CYGPATH -m "$unix_path"`
57588    freetype_lib_path="$windows_path"
57589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57590    windows_path=`cmd //c echo $unix_path`
57591    freetype_lib_path="$windows_path"
57592  fi
57593
57594
57595  unix_path="$freetype_obj_path"
57596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57597    windows_path=`$CYGPATH -m "$unix_path"`
57598    freetype_obj_path="$windows_path"
57599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57600    windows_path=`cmd //c echo $unix_path`
57601    freetype_obj_path="$windows_path"
57602  fi
57603
57604    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57605      freetype_platform=x64
57606    else
57607      freetype_platform=win32
57608    fi
57609
57610    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57611    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57612    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57613    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57614    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57615$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57616
57617    # First we try to build the freetype.dll
57618    $ECHO -e "@echo off\n"\
57619        "$MSBUILD $vcxproj_path "\
57620        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57621        "/p:Configuration=\"Release Multithreaded\" "\
57622        "/p:Platform=$freetype_platform "\
57623        "/p:ConfigurationType=DynamicLibrary "\
57624        "/p:TargetName=freetype "\
57625        "/p:OutDir=\"$freetype_lib_path\" "\
57626        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57627    cmd /c freetype.bat
57628
57629    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57630      # If that succeeds we also build freetype.lib
57631      $ECHO -e "@echo off\n"\
57632          "$MSBUILD $vcxproj_path "\
57633          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57634          "/p:Configuration=\"Release Multithreaded\" "\
57635          "/p:Platform=$freetype_platform "\
57636          "/p:ConfigurationType=StaticLibrary "\
57637          "/p:TargetName=freetype "\
57638          "/p:OutDir=\"$freetype_lib_path\" "\
57639          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57640      cmd /c freetype.bat
57641
57642      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57643        # Once we build both, lib and dll, set freetype lib and include path appropriately
57644        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57645        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57646        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57647$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57648      else
57649        BUILD_FREETYPE=no
57650      fi
57651    else
57652      BUILD_FREETYPE=no
57653    fi
57654  fi
57655
57656        if test "x$BUILD_FREETYPE" = xyes; then
57657          # Okay, we built it. Check that it works.
57658
57659  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57660  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57661  METHOD="--with-freetype-src"
57662
57663  # Let's start with an optimistic view of the world :-)
57664  FOUND_FREETYPE=yes
57665
57666  # First look for the canonical freetype main include file ft2build.h.
57667  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57668    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57669    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57670    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57671      # Fail.
57672      FOUND_FREETYPE=no
57673    fi
57674  fi
57675
57676  if test "x$FOUND_FREETYPE" = xyes; then
57677    # Include file found, let's continue the sanity check.
57678    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57679$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57680
57681    # Reset to default value
57682    FREETYPE_BASE_NAME=freetype
57683    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57684    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57685      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57686          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57687        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57688        # for the .6 version explicitly.
57689        FREETYPE_BASE_NAME=freetype.6
57690        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57691        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57692$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57693      else
57694        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57695$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57696        FOUND_FREETYPE=no
57697      fi
57698    else
57699      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57700        # On Windows, we will need both .lib and .dll file.
57701        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57702          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57704          FOUND_FREETYPE=no
57705        fi
57706      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57707          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57708        # Found lib in isa dir, use that instead.
57709        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57710        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57711$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57712      fi
57713    fi
57714  fi
57715
57716  if test "x$FOUND_FREETYPE" = xyes; then
57717
57718  # Only process if variable expands to non-empty
57719
57720  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57722
57723  # Input might be given as Windows format, start by converting to
57724  # unix format.
57725  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57726  new_path=`$CYGPATH -u "$path"`
57727
57728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57731  # "foo.exe" is OK but "foo" is an error.
57732  #
57733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57734  # It is also a way to make sure we got the proper file name for the real test later on.
57735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57736  if test "x$test_shortpath" = x; then
57737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57739    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57740  fi
57741
57742  # Call helper function which possibly converts this using DOS-style short mode.
57743  # If so, the updated path is stored in $new_path.
57744
57745  input_path="$new_path"
57746  # Check if we need to convert this using DOS-style short mode. If the path
57747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57748  # take no chances and rewrite it.
57749  # Note: m4 eats our [], so we need to use [ and ] instead.
57750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57751  if test "x$has_forbidden_chars" != x; then
57752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57756      # Going to short mode and back again did indeed matter. Since short mode is
57757      # case insensitive, let's make it lowercase to improve readability.
57758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57759      # Now convert it back to Unix-style (cygpath)
57760      input_path=`$CYGPATH -u "$shortmode_path"`
57761      new_path="$input_path"
57762    fi
57763  fi
57764
57765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57766  if test "x$test_cygdrive_prefix" = x; then
57767    # As a simple fix, exclude /usr/bin since it's not a real path.
57768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57770      # a path prefixed by /cygdrive for fixpath to work.
57771      new_path="$CYGWIN_ROOT_PATH$input_path"
57772    fi
57773  fi
57774
57775
57776  if test "x$path" != "x$new_path"; then
57777    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57780  fi
57781
57782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57783
57784  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57785  has_colon=`$ECHO $path | $GREP ^.:`
57786  new_path="$path"
57787  if test "x$has_colon" = x; then
57788    # Not in mixed or Windows style, start by that.
57789    new_path=`cmd //c echo $path`
57790  fi
57791
57792
57793  input_path="$new_path"
57794  # Check if we need to convert this using DOS-style short mode. If the path
57795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57796  # take no chances and rewrite it.
57797  # Note: m4 eats our [], so we need to use [ and ] instead.
57798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57799  if test "x$has_forbidden_chars" != x; then
57800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57802  fi
57803
57804
57805  windows_path="$new_path"
57806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57807    unix_path=`$CYGPATH -u "$windows_path"`
57808    new_path="$unix_path"
57809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57811    new_path="$unix_path"
57812  fi
57813
57814  if test "x$path" != "x$new_path"; then
57815    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57817$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57818  fi
57819
57820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57822
57823    else
57824      # We're on a unix platform. Hooray! :)
57825      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57826      has_space=`$ECHO "$path" | $GREP " "`
57827      if test "x$has_space" != x; then
57828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57831      fi
57832
57833      # Use eval to expand a potential ~
57834      eval path="$path"
57835      if test ! -f "$path" && test ! -d "$path"; then
57836        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57837      fi
57838
57839      if test -d "$path"; then
57840        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57841      else
57842        dir="`$DIRNAME "$path"`"
57843        base="`$BASENAME "$path"`"
57844        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57845      fi
57846    fi
57847  fi
57848
57849
57850  # Only process if variable expands to non-empty
57851
57852  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57854
57855  # Input might be given as Windows format, start by converting to
57856  # unix format.
57857  path="$POTENTIAL_FREETYPE_LIB_PATH"
57858  new_path=`$CYGPATH -u "$path"`
57859
57860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57863  # "foo.exe" is OK but "foo" is an error.
57864  #
57865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57866  # It is also a way to make sure we got the proper file name for the real test later on.
57867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57868  if test "x$test_shortpath" = x; then
57869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57870$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57871    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57872  fi
57873
57874  # Call helper function which possibly converts this using DOS-style short mode.
57875  # If so, the updated path is stored in $new_path.
57876
57877  input_path="$new_path"
57878  # Check if we need to convert this using DOS-style short mode. If the path
57879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57880  # take no chances and rewrite it.
57881  # Note: m4 eats our [], so we need to use [ and ] instead.
57882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57883  if test "x$has_forbidden_chars" != x; then
57884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57888      # Going to short mode and back again did indeed matter. Since short mode is
57889      # case insensitive, let's make it lowercase to improve readability.
57890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57891      # Now convert it back to Unix-style (cygpath)
57892      input_path=`$CYGPATH -u "$shortmode_path"`
57893      new_path="$input_path"
57894    fi
57895  fi
57896
57897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57898  if test "x$test_cygdrive_prefix" = x; then
57899    # As a simple fix, exclude /usr/bin since it's not a real path.
57900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57902      # a path prefixed by /cygdrive for fixpath to work.
57903      new_path="$CYGWIN_ROOT_PATH$input_path"
57904    fi
57905  fi
57906
57907
57908  if test "x$path" != "x$new_path"; then
57909    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57911$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57912  fi
57913
57914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57915
57916  path="$POTENTIAL_FREETYPE_LIB_PATH"
57917  has_colon=`$ECHO $path | $GREP ^.:`
57918  new_path="$path"
57919  if test "x$has_colon" = x; then
57920    # Not in mixed or Windows style, start by that.
57921    new_path=`cmd //c echo $path`
57922  fi
57923
57924
57925  input_path="$new_path"
57926  # Check if we need to convert this using DOS-style short mode. If the path
57927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57928  # take no chances and rewrite it.
57929  # Note: m4 eats our [], so we need to use [ and ] instead.
57930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57931  if test "x$has_forbidden_chars" != x; then
57932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57934  fi
57935
57936
57937  windows_path="$new_path"
57938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57939    unix_path=`$CYGPATH -u "$windows_path"`
57940    new_path="$unix_path"
57941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57943    new_path="$unix_path"
57944  fi
57945
57946  if test "x$path" != "x$new_path"; then
57947    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57949$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57950  fi
57951
57952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57954
57955    else
57956      # We're on a unix platform. Hooray! :)
57957      path="$POTENTIAL_FREETYPE_LIB_PATH"
57958      has_space=`$ECHO "$path" | $GREP " "`
57959      if test "x$has_space" != x; then
57960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57961$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57963      fi
57964
57965      # Use eval to expand a potential ~
57966      eval path="$path"
57967      if test ! -f "$path" && test ! -d "$path"; then
57968        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57969      fi
57970
57971      if test -d "$path"; then
57972        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57973      else
57974        dir="`$DIRNAME "$path"`"
57975        base="`$BASENAME "$path"`"
57976        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57977      fi
57978    fi
57979  fi
57980
57981
57982    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57984$as_echo_n "checking for freetype includes... " >&6; }
57985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57986$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57987    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57989$as_echo_n "checking for freetype libraries... " >&6; }
57990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57991$as_echo "$FREETYPE_LIB_PATH" >&6; }
57992  fi
57993
57994          if test "x$FOUND_FREETYPE" != xyes; then
57995            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57996          fi
57997        else
57998          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57999$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58000          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58001        fi
58002      else
58003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58004$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58005      fi
58006    fi
58007
58008    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58009      # User has specified settings
58010
58011      if test "x$BUNDLE_FREETYPE" = x; then
58012        # If not specified, default is to bundle freetype
58013        BUNDLE_FREETYPE=yes
58014      fi
58015
58016      if test "x$with_freetype" != x; then
58017        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58018        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58019      fi
58020
58021      # Allow --with-freetype-lib and --with-freetype-include to override
58022      if test "x$with_freetype_include" != x; then
58023        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58024      fi
58025      if test "x$with_freetype_lib" != x; then
58026        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58027      fi
58028
58029      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58030        # Okay, we got it. Check that it works.
58031
58032  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58033  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58034  METHOD="--with-freetype"
58035
58036  # Let's start with an optimistic view of the world :-)
58037  FOUND_FREETYPE=yes
58038
58039  # First look for the canonical freetype main include file ft2build.h.
58040  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58041    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58042    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58043    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58044      # Fail.
58045      FOUND_FREETYPE=no
58046    fi
58047  fi
58048
58049  if test "x$FOUND_FREETYPE" = xyes; then
58050    # Include file found, let's continue the sanity check.
58051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58052$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58053
58054    # Reset to default value
58055    FREETYPE_BASE_NAME=freetype
58056    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58057    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58058      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58059          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58060        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58061        # for the .6 version explicitly.
58062        FREETYPE_BASE_NAME=freetype.6
58063        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58064        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58065$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58066      else
58067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58068$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58069        FOUND_FREETYPE=no
58070      fi
58071    else
58072      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58073        # On Windows, we will need both .lib and .dll file.
58074        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58075          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58076$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58077          FOUND_FREETYPE=no
58078        fi
58079      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58080          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58081        # Found lib in isa dir, use that instead.
58082        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58083        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58084$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58085      fi
58086    fi
58087  fi
58088
58089  if test "x$FOUND_FREETYPE" = xyes; then
58090
58091  # Only process if variable expands to non-empty
58092
58093  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58095
58096  # Input might be given as Windows format, start by converting to
58097  # unix format.
58098  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58099  new_path=`$CYGPATH -u "$path"`
58100
58101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58104  # "foo.exe" is OK but "foo" is an error.
58105  #
58106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58107  # It is also a way to make sure we got the proper file name for the real test later on.
58108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58109  if test "x$test_shortpath" = x; then
58110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58112    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58113  fi
58114
58115  # Call helper function which possibly converts this using DOS-style short mode.
58116  # If so, the updated path is stored in $new_path.
58117
58118  input_path="$new_path"
58119  # Check if we need to convert this using DOS-style short mode. If the path
58120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58121  # take no chances and rewrite it.
58122  # Note: m4 eats our [], so we need to use [ and ] instead.
58123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58124  if test "x$has_forbidden_chars" != x; then
58125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58129      # Going to short mode and back again did indeed matter. Since short mode is
58130      # case insensitive, let's make it lowercase to improve readability.
58131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58132      # Now convert it back to Unix-style (cygpath)
58133      input_path=`$CYGPATH -u "$shortmode_path"`
58134      new_path="$input_path"
58135    fi
58136  fi
58137
58138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58139  if test "x$test_cygdrive_prefix" = x; then
58140    # As a simple fix, exclude /usr/bin since it's not a real path.
58141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58143      # a path prefixed by /cygdrive for fixpath to work.
58144      new_path="$CYGWIN_ROOT_PATH$input_path"
58145    fi
58146  fi
58147
58148
58149  if test "x$path" != "x$new_path"; then
58150    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58153  fi
58154
58155    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58156
58157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58158  has_colon=`$ECHO $path | $GREP ^.:`
58159  new_path="$path"
58160  if test "x$has_colon" = x; then
58161    # Not in mixed or Windows style, start by that.
58162    new_path=`cmd //c echo $path`
58163  fi
58164
58165
58166  input_path="$new_path"
58167  # Check if we need to convert this using DOS-style short mode. If the path
58168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58169  # take no chances and rewrite it.
58170  # Note: m4 eats our [], so we need to use [ and ] instead.
58171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58172  if test "x$has_forbidden_chars" != x; then
58173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58175  fi
58176
58177
58178  windows_path="$new_path"
58179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58180    unix_path=`$CYGPATH -u "$windows_path"`
58181    new_path="$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    new_path="$unix_path"
58185  fi
58186
58187  if test "x$path" != "x$new_path"; then
58188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58191  fi
58192
58193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58195
58196    else
58197      # We're on a unix platform. Hooray! :)
58198      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58199      has_space=`$ECHO "$path" | $GREP " "`
58200      if test "x$has_space" != x; then
58201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58202$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58203        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58204      fi
58205
58206      # Use eval to expand a potential ~
58207      eval path="$path"
58208      if test ! -f "$path" && test ! -d "$path"; then
58209        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58210      fi
58211
58212      if test -d "$path"; then
58213        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58214      else
58215        dir="`$DIRNAME "$path"`"
58216        base="`$BASENAME "$path"`"
58217        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58218      fi
58219    fi
58220  fi
58221
58222
58223  # Only process if variable expands to non-empty
58224
58225  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58227
58228  # Input might be given as Windows format, start by converting to
58229  # unix format.
58230  path="$POTENTIAL_FREETYPE_LIB_PATH"
58231  new_path=`$CYGPATH -u "$path"`
58232
58233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58236  # "foo.exe" is OK but "foo" is an error.
58237  #
58238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58239  # It is also a way to make sure we got the proper file name for the real test later on.
58240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58241  if test "x$test_shortpath" = x; then
58242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58244    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58245  fi
58246
58247  # Call helper function which possibly converts this using DOS-style short mode.
58248  # If so, the updated path is stored in $new_path.
58249
58250  input_path="$new_path"
58251  # Check if we need to convert this using DOS-style short mode. If the path
58252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58253  # take no chances and rewrite it.
58254  # Note: m4 eats our [], so we need to use [ and ] instead.
58255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58256  if test "x$has_forbidden_chars" != x; then
58257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58261      # Going to short mode and back again did indeed matter. Since short mode is
58262      # case insensitive, let's make it lowercase to improve readability.
58263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58264      # Now convert it back to Unix-style (cygpath)
58265      input_path=`$CYGPATH -u "$shortmode_path"`
58266      new_path="$input_path"
58267    fi
58268  fi
58269
58270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58271  if test "x$test_cygdrive_prefix" = x; then
58272    # As a simple fix, exclude /usr/bin since it's not a real path.
58273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58275      # a path prefixed by /cygdrive for fixpath to work.
58276      new_path="$CYGWIN_ROOT_PATH$input_path"
58277    fi
58278  fi
58279
58280
58281  if test "x$path" != "x$new_path"; then
58282    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58285  fi
58286
58287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58288
58289  path="$POTENTIAL_FREETYPE_LIB_PATH"
58290  has_colon=`$ECHO $path | $GREP ^.:`
58291  new_path="$path"
58292  if test "x$has_colon" = x; then
58293    # Not in mixed or Windows style, start by that.
58294    new_path=`cmd //c echo $path`
58295  fi
58296
58297
58298  input_path="$new_path"
58299  # Check if we need to convert this using DOS-style short mode. If the path
58300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58301  # take no chances and rewrite it.
58302  # Note: m4 eats our [], so we need to use [ and ] instead.
58303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58304  if test "x$has_forbidden_chars" != x; then
58305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58307  fi
58308
58309
58310  windows_path="$new_path"
58311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58312    unix_path=`$CYGPATH -u "$windows_path"`
58313    new_path="$unix_path"
58314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58316    new_path="$unix_path"
58317  fi
58318
58319  if test "x$path" != "x$new_path"; then
58320    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58323  fi
58324
58325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58327
58328    else
58329      # We're on a unix platform. Hooray! :)
58330      path="$POTENTIAL_FREETYPE_LIB_PATH"
58331      has_space=`$ECHO "$path" | $GREP " "`
58332      if test "x$has_space" != x; then
58333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58336      fi
58337
58338      # Use eval to expand a potential ~
58339      eval path="$path"
58340      if test ! -f "$path" && test ! -d "$path"; then
58341        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58342      fi
58343
58344      if test -d "$path"; then
58345        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58346      else
58347        dir="`$DIRNAME "$path"`"
58348        base="`$BASENAME "$path"`"
58349        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58350      fi
58351    fi
58352  fi
58353
58354
58355    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58357$as_echo_n "checking for freetype includes... " >&6; }
58358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58359$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58360    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58362$as_echo_n "checking for freetype libraries... " >&6; }
58363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58364$as_echo "$FREETYPE_LIB_PATH" >&6; }
58365  fi
58366
58367        if test "x$FOUND_FREETYPE" != xyes; then
58368          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58369        fi
58370      else
58371        # User specified only one of lib or include. This is an error.
58372        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58373          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58374$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58375          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58376        else
58377          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58378$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58379          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58380        fi
58381      fi
58382    else
58383      # User did not specify settings, but we need freetype. Try to locate it.
58384
58385      if test "x$BUNDLE_FREETYPE" = x; then
58386        # If not specified, default is to bundle freetype only on windows
58387        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58388          BUNDLE_FREETYPE=yes
58389        else
58390          BUNDLE_FREETYPE=no
58391        fi
58392      fi
58393
58394      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58395      if test "x$SYSROOT" = x; then
58396        if test "x$FOUND_FREETYPE" != xyes; then
58397          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58398          if test "x$PKG_CONFIG" != x; then
58399
58400pkg_failed=no
58401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58402$as_echo_n "checking for FREETYPE... " >&6; }
58403
58404if test -n "$FREETYPE_CFLAGS"; then
58405    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58406 elif test -n "$PKG_CONFIG"; then
58407    if test -n "$PKG_CONFIG" && \
58408    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58409  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58410  ac_status=$?
58411  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58412  test $ac_status = 0; }; then
58413  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58414else
58415  pkg_failed=yes
58416fi
58417 else
58418    pkg_failed=untried
58419fi
58420if test -n "$FREETYPE_LIBS"; then
58421    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58422 elif test -n "$PKG_CONFIG"; then
58423    if test -n "$PKG_CONFIG" && \
58424    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58425  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58426  ac_status=$?
58427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58428  test $ac_status = 0; }; then
58429  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58430else
58431  pkg_failed=yes
58432fi
58433 else
58434    pkg_failed=untried
58435fi
58436
58437
58438
58439if test $pkg_failed = yes; then
58440
58441if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58442        _pkg_short_errors_supported=yes
58443else
58444        _pkg_short_errors_supported=no
58445fi
58446        if test $_pkg_short_errors_supported = yes; then
58447	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58448        else
58449	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58450        fi
58451	# Put the nasty error message in config.log where it belongs
58452	echo "$FREETYPE_PKG_ERRORS" >&5
58453
58454	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58455$as_echo "no" >&6; }
58456                FOUND_FREETYPE=no
58457elif test $pkg_failed = untried; then
58458	FOUND_FREETYPE=no
58459else
58460	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58461	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58463$as_echo "yes" >&6; }
58464	FOUND_FREETYPE=yes
58465fi
58466            if test "x$FOUND_FREETYPE" = xyes; then
58467              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58468              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58469              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58470              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58471                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58472              fi
58473              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58474              if test "x$BUNDLE_FREETYPE" = xyes; then
58475                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58476$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58477                FOUND_FREETYPE=no
58478              else
58479                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58480$as_echo_n "checking for freetype... " >&6; }
58481                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58482$as_echo "yes (using pkg-config)" >&6; }
58483              fi
58484            fi
58485          fi
58486        fi
58487      fi
58488
58489      if test "x$FOUND_FREETYPE" != xyes; then
58490        # Check in well-known locations
58491        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58492          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58493
58494  windows_path="$FREETYPE_BASE_DIR"
58495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58496    unix_path=`$CYGPATH -u "$windows_path"`
58497    FREETYPE_BASE_DIR="$unix_path"
58498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58500    FREETYPE_BASE_DIR="$unix_path"
58501  fi
58502
58503
58504  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58505  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58506  METHOD="well-known location"
58507
58508  # Let's start with an optimistic view of the world :-)
58509  FOUND_FREETYPE=yes
58510
58511  # First look for the canonical freetype main include file ft2build.h.
58512  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58513    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58514    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58515    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58516      # Fail.
58517      FOUND_FREETYPE=no
58518    fi
58519  fi
58520
58521  if test "x$FOUND_FREETYPE" = xyes; then
58522    # Include file found, let's continue the sanity check.
58523    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58524$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58525
58526    # Reset to default value
58527    FREETYPE_BASE_NAME=freetype
58528    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58529    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58530      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58531          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58532        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58533        # for the .6 version explicitly.
58534        FREETYPE_BASE_NAME=freetype.6
58535        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58536        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58537$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58538      else
58539        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58541        FOUND_FREETYPE=no
58542      fi
58543    else
58544      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58545        # On Windows, we will need both .lib and .dll file.
58546        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58547          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58548$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58549          FOUND_FREETYPE=no
58550        fi
58551      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58553        # Found lib in isa dir, use that instead.
58554        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58555        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58556$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58557      fi
58558    fi
58559  fi
58560
58561  if test "x$FOUND_FREETYPE" = xyes; then
58562
58563  # Only process if variable expands to non-empty
58564
58565  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58567
58568  # Input might be given as Windows format, start by converting to
58569  # unix format.
58570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58571  new_path=`$CYGPATH -u "$path"`
58572
58573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58576  # "foo.exe" is OK but "foo" is an error.
58577  #
58578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58579  # It is also a way to make sure we got the proper file name for the real test later on.
58580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58581  if test "x$test_shortpath" = x; then
58582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58584    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58585  fi
58586
58587  # Call helper function which possibly converts this using DOS-style short mode.
58588  # If so, the updated path is stored in $new_path.
58589
58590  input_path="$new_path"
58591  # Check if we need to convert this using DOS-style short mode. If the path
58592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58593  # take no chances and rewrite it.
58594  # Note: m4 eats our [], so we need to use [ and ] instead.
58595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58596  if test "x$has_forbidden_chars" != x; then
58597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58601      # Going to short mode and back again did indeed matter. Since short mode is
58602      # case insensitive, let's make it lowercase to improve readability.
58603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58604      # Now convert it back to Unix-style (cygpath)
58605      input_path=`$CYGPATH -u "$shortmode_path"`
58606      new_path="$input_path"
58607    fi
58608  fi
58609
58610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58611  if test "x$test_cygdrive_prefix" = x; then
58612    # As a simple fix, exclude /usr/bin since it's not a real path.
58613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58615      # a path prefixed by /cygdrive for fixpath to work.
58616      new_path="$CYGWIN_ROOT_PATH$input_path"
58617    fi
58618  fi
58619
58620
58621  if test "x$path" != "x$new_path"; then
58622    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58625  fi
58626
58627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58628
58629  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58630  has_colon=`$ECHO $path | $GREP ^.:`
58631  new_path="$path"
58632  if test "x$has_colon" = x; then
58633    # Not in mixed or Windows style, start by that.
58634    new_path=`cmd //c echo $path`
58635  fi
58636
58637
58638  input_path="$new_path"
58639  # Check if we need to convert this using DOS-style short mode. If the path
58640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58641  # take no chances and rewrite it.
58642  # Note: m4 eats our [], so we need to use [ and ] instead.
58643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58644  if test "x$has_forbidden_chars" != x; then
58645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58647  fi
58648
58649
58650  windows_path="$new_path"
58651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58652    unix_path=`$CYGPATH -u "$windows_path"`
58653    new_path="$unix_path"
58654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58656    new_path="$unix_path"
58657  fi
58658
58659  if test "x$path" != "x$new_path"; then
58660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58663  fi
58664
58665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58667
58668    else
58669      # We're on a unix platform. Hooray! :)
58670      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58671      has_space=`$ECHO "$path" | $GREP " "`
58672      if test "x$has_space" != x; then
58673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58676      fi
58677
58678      # Use eval to expand a potential ~
58679      eval path="$path"
58680      if test ! -f "$path" && test ! -d "$path"; then
58681        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58682      fi
58683
58684      if test -d "$path"; then
58685        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58686      else
58687        dir="`$DIRNAME "$path"`"
58688        base="`$BASENAME "$path"`"
58689        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58690      fi
58691    fi
58692  fi
58693
58694
58695  # Only process if variable expands to non-empty
58696
58697  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58699
58700  # Input might be given as Windows format, start by converting to
58701  # unix format.
58702  path="$POTENTIAL_FREETYPE_LIB_PATH"
58703  new_path=`$CYGPATH -u "$path"`
58704
58705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58708  # "foo.exe" is OK but "foo" is an error.
58709  #
58710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58711  # It is also a way to make sure we got the proper file name for the real test later on.
58712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58713  if test "x$test_shortpath" = x; then
58714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58716    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58717  fi
58718
58719  # Call helper function which possibly converts this using DOS-style short mode.
58720  # If so, the updated path is stored in $new_path.
58721
58722  input_path="$new_path"
58723  # Check if we need to convert this using DOS-style short mode. If the path
58724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58725  # take no chances and rewrite it.
58726  # Note: m4 eats our [], so we need to use [ and ] instead.
58727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58728  if test "x$has_forbidden_chars" != x; then
58729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58733      # Going to short mode and back again did indeed matter. Since short mode is
58734      # case insensitive, let's make it lowercase to improve readability.
58735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58736      # Now convert it back to Unix-style (cygpath)
58737      input_path=`$CYGPATH -u "$shortmode_path"`
58738      new_path="$input_path"
58739    fi
58740  fi
58741
58742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58743  if test "x$test_cygdrive_prefix" = x; then
58744    # As a simple fix, exclude /usr/bin since it's not a real path.
58745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58747      # a path prefixed by /cygdrive for fixpath to work.
58748      new_path="$CYGWIN_ROOT_PATH$input_path"
58749    fi
58750  fi
58751
58752
58753  if test "x$path" != "x$new_path"; then
58754    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58757  fi
58758
58759    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58760
58761  path="$POTENTIAL_FREETYPE_LIB_PATH"
58762  has_colon=`$ECHO $path | $GREP ^.:`
58763  new_path="$path"
58764  if test "x$has_colon" = x; then
58765    # Not in mixed or Windows style, start by that.
58766    new_path=`cmd //c echo $path`
58767  fi
58768
58769
58770  input_path="$new_path"
58771  # Check if we need to convert this using DOS-style short mode. If the path
58772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58773  # take no chances and rewrite it.
58774  # Note: m4 eats our [], so we need to use [ and ] instead.
58775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58776  if test "x$has_forbidden_chars" != x; then
58777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58779  fi
58780
58781
58782  windows_path="$new_path"
58783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58784    unix_path=`$CYGPATH -u "$windows_path"`
58785    new_path="$unix_path"
58786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58788    new_path="$unix_path"
58789  fi
58790
58791  if test "x$path" != "x$new_path"; then
58792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58795  fi
58796
58797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58799
58800    else
58801      # We're on a unix platform. Hooray! :)
58802      path="$POTENTIAL_FREETYPE_LIB_PATH"
58803      has_space=`$ECHO "$path" | $GREP " "`
58804      if test "x$has_space" != x; then
58805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58807        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58808      fi
58809
58810      # Use eval to expand a potential ~
58811      eval path="$path"
58812      if test ! -f "$path" && test ! -d "$path"; then
58813        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58814      fi
58815
58816      if test -d "$path"; then
58817        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58818      else
58819        dir="`$DIRNAME "$path"`"
58820        base="`$BASENAME "$path"`"
58821        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58822      fi
58823    fi
58824  fi
58825
58826
58827    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58829$as_echo_n "checking for freetype includes... " >&6; }
58830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58831$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58832    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58834$as_echo_n "checking for freetype libraries... " >&6; }
58835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58836$as_echo "$FREETYPE_LIB_PATH" >&6; }
58837  fi
58838
58839          if test "x$FOUND_FREETYPE" != xyes; then
58840            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58841
58842  windows_path="$FREETYPE_BASE_DIR"
58843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58844    unix_path=`$CYGPATH -u "$windows_path"`
58845    FREETYPE_BASE_DIR="$unix_path"
58846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58848    FREETYPE_BASE_DIR="$unix_path"
58849  fi
58850
58851
58852  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58853  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58854  METHOD="well-known location"
58855
58856  # Let's start with an optimistic view of the world :-)
58857  FOUND_FREETYPE=yes
58858
58859  # First look for the canonical freetype main include file ft2build.h.
58860  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58861    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58862    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58863    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58864      # Fail.
58865      FOUND_FREETYPE=no
58866    fi
58867  fi
58868
58869  if test "x$FOUND_FREETYPE" = xyes; then
58870    # Include file found, let's continue the sanity check.
58871    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58872$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58873
58874    # Reset to default value
58875    FREETYPE_BASE_NAME=freetype
58876    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58877    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58878      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58879          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58880        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58881        # for the .6 version explicitly.
58882        FREETYPE_BASE_NAME=freetype.6
58883        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58884        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58885$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58886      else
58887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58888$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58889        FOUND_FREETYPE=no
58890      fi
58891    else
58892      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58893        # On Windows, we will need both .lib and .dll file.
58894        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58895          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58896$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58897          FOUND_FREETYPE=no
58898        fi
58899      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58900          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58901        # Found lib in isa dir, use that instead.
58902        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58903        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58904$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58905      fi
58906    fi
58907  fi
58908
58909  if test "x$FOUND_FREETYPE" = xyes; then
58910
58911  # Only process if variable expands to non-empty
58912
58913  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58915
58916  # Input might be given as Windows format, start by converting to
58917  # unix format.
58918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58919  new_path=`$CYGPATH -u "$path"`
58920
58921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58924  # "foo.exe" is OK but "foo" is an error.
58925  #
58926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58927  # It is also a way to make sure we got the proper file name for the real test later on.
58928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58929  if test "x$test_shortpath" = x; then
58930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58933  fi
58934
58935  # Call helper function which possibly converts this using DOS-style short mode.
58936  # If so, the updated path is stored in $new_path.
58937
58938  input_path="$new_path"
58939  # Check if we need to convert this using DOS-style short mode. If the path
58940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58941  # take no chances and rewrite it.
58942  # Note: m4 eats our [], so we need to use [ and ] instead.
58943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58944  if test "x$has_forbidden_chars" != x; then
58945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58949      # Going to short mode and back again did indeed matter. Since short mode is
58950      # case insensitive, let's make it lowercase to improve readability.
58951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58952      # Now convert it back to Unix-style (cygpath)
58953      input_path=`$CYGPATH -u "$shortmode_path"`
58954      new_path="$input_path"
58955    fi
58956  fi
58957
58958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58959  if test "x$test_cygdrive_prefix" = x; then
58960    # As a simple fix, exclude /usr/bin since it's not a real path.
58961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58963      # a path prefixed by /cygdrive for fixpath to work.
58964      new_path="$CYGWIN_ROOT_PATH$input_path"
58965    fi
58966  fi
58967
58968
58969  if test "x$path" != "x$new_path"; then
58970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58973  fi
58974
58975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58976
58977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58978  has_colon=`$ECHO $path | $GREP ^.:`
58979  new_path="$path"
58980  if test "x$has_colon" = x; then
58981    # Not in mixed or Windows style, start by that.
58982    new_path=`cmd //c echo $path`
58983  fi
58984
58985
58986  input_path="$new_path"
58987  # Check if we need to convert this using DOS-style short mode. If the path
58988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58989  # take no chances and rewrite it.
58990  # Note: m4 eats our [], so we need to use [ and ] instead.
58991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58992  if test "x$has_forbidden_chars" != x; then
58993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58995  fi
58996
58997
58998  windows_path="$new_path"
58999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59000    unix_path=`$CYGPATH -u "$windows_path"`
59001    new_path="$unix_path"
59002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59004    new_path="$unix_path"
59005  fi
59006
59007  if test "x$path" != "x$new_path"; then
59008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59011  fi
59012
59013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59015
59016    else
59017      # We're on a unix platform. Hooray! :)
59018      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59019      has_space=`$ECHO "$path" | $GREP " "`
59020      if test "x$has_space" != x; then
59021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59024      fi
59025
59026      # Use eval to expand a potential ~
59027      eval path="$path"
59028      if test ! -f "$path" && test ! -d "$path"; then
59029        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59030      fi
59031
59032      if test -d "$path"; then
59033        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59034      else
59035        dir="`$DIRNAME "$path"`"
59036        base="`$BASENAME "$path"`"
59037        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59038      fi
59039    fi
59040  fi
59041
59042
59043  # Only process if variable expands to non-empty
59044
59045  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59047
59048  # Input might be given as Windows format, start by converting to
59049  # unix format.
59050  path="$POTENTIAL_FREETYPE_LIB_PATH"
59051  new_path=`$CYGPATH -u "$path"`
59052
59053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59056  # "foo.exe" is OK but "foo" is an error.
59057  #
59058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59059  # It is also a way to make sure we got the proper file name for the real test later on.
59060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59061  if test "x$test_shortpath" = x; then
59062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59064    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59065  fi
59066
59067  # Call helper function which possibly converts this using DOS-style short mode.
59068  # If so, the updated path is stored in $new_path.
59069
59070  input_path="$new_path"
59071  # Check if we need to convert this using DOS-style short mode. If the path
59072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59073  # take no chances and rewrite it.
59074  # Note: m4 eats our [], so we need to use [ and ] instead.
59075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59076  if test "x$has_forbidden_chars" != x; then
59077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59081      # Going to short mode and back again did indeed matter. Since short mode is
59082      # case insensitive, let's make it lowercase to improve readability.
59083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59084      # Now convert it back to Unix-style (cygpath)
59085      input_path=`$CYGPATH -u "$shortmode_path"`
59086      new_path="$input_path"
59087    fi
59088  fi
59089
59090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59091  if test "x$test_cygdrive_prefix" = x; then
59092    # As a simple fix, exclude /usr/bin since it's not a real path.
59093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59095      # a path prefixed by /cygdrive for fixpath to work.
59096      new_path="$CYGWIN_ROOT_PATH$input_path"
59097    fi
59098  fi
59099
59100
59101  if test "x$path" != "x$new_path"; then
59102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59105  fi
59106
59107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59108
59109  path="$POTENTIAL_FREETYPE_LIB_PATH"
59110  has_colon=`$ECHO $path | $GREP ^.:`
59111  new_path="$path"
59112  if test "x$has_colon" = x; then
59113    # Not in mixed or Windows style, start by that.
59114    new_path=`cmd //c echo $path`
59115  fi
59116
59117
59118  input_path="$new_path"
59119  # Check if we need to convert this using DOS-style short mode. If the path
59120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59121  # take no chances and rewrite it.
59122  # Note: m4 eats our [], so we need to use [ and ] instead.
59123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59124  if test "x$has_forbidden_chars" != x; then
59125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59127  fi
59128
59129
59130  windows_path="$new_path"
59131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59132    unix_path=`$CYGPATH -u "$windows_path"`
59133    new_path="$unix_path"
59134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59136    new_path="$unix_path"
59137  fi
59138
59139  if test "x$path" != "x$new_path"; then
59140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59143  fi
59144
59145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59147
59148    else
59149      # We're on a unix platform. Hooray! :)
59150      path="$POTENTIAL_FREETYPE_LIB_PATH"
59151      has_space=`$ECHO "$path" | $GREP " "`
59152      if test "x$has_space" != x; then
59153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59156      fi
59157
59158      # Use eval to expand a potential ~
59159      eval path="$path"
59160      if test ! -f "$path" && test ! -d "$path"; then
59161        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59162      fi
59163
59164      if test -d "$path"; then
59165        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59166      else
59167        dir="`$DIRNAME "$path"`"
59168        base="`$BASENAME "$path"`"
59169        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59170      fi
59171    fi
59172  fi
59173
59174
59175    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59177$as_echo_n "checking for freetype includes... " >&6; }
59178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59179$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59180    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59182$as_echo_n "checking for freetype libraries... " >&6; }
59183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59184$as_echo "$FREETYPE_LIB_PATH" >&6; }
59185  fi
59186
59187          fi
59188          if test "x$FOUND_FREETYPE" != xyes; then
59189            FREETYPE_BASE_DIR="$HOME/freetype"
59190
59191  windows_path="$FREETYPE_BASE_DIR"
59192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59193    unix_path=`$CYGPATH -u "$windows_path"`
59194    FREETYPE_BASE_DIR="$unix_path"
59195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59197    FREETYPE_BASE_DIR="$unix_path"
59198  fi
59199
59200            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59201
59202  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59203  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59204  METHOD="well-known location"
59205
59206  # Let's start with an optimistic view of the world :-)
59207  FOUND_FREETYPE=yes
59208
59209  # First look for the canonical freetype main include file ft2build.h.
59210  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59211    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59212    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59213    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59214      # Fail.
59215      FOUND_FREETYPE=no
59216    fi
59217  fi
59218
59219  if test "x$FOUND_FREETYPE" = xyes; then
59220    # Include file found, let's continue the sanity check.
59221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59222$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59223
59224    # Reset to default value
59225    FREETYPE_BASE_NAME=freetype
59226    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59227    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59228      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59229          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59230        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59231        # for the .6 version explicitly.
59232        FREETYPE_BASE_NAME=freetype.6
59233        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59234        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59235$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59236      else
59237        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59238$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59239        FOUND_FREETYPE=no
59240      fi
59241    else
59242      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59243        # On Windows, we will need both .lib and .dll file.
59244        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59245          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59246$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59247          FOUND_FREETYPE=no
59248        fi
59249      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59250          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59251        # Found lib in isa dir, use that instead.
59252        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59253        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59254$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59255      fi
59256    fi
59257  fi
59258
59259  if test "x$FOUND_FREETYPE" = xyes; then
59260
59261  # Only process if variable expands to non-empty
59262
59263  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59265
59266  # Input might be given as Windows format, start by converting to
59267  # unix format.
59268  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59269  new_path=`$CYGPATH -u "$path"`
59270
59271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59274  # "foo.exe" is OK but "foo" is an error.
59275  #
59276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59277  # It is also a way to make sure we got the proper file name for the real test later on.
59278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59279  if test "x$test_shortpath" = x; then
59280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59282    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59283  fi
59284
59285  # Call helper function which possibly converts this using DOS-style short mode.
59286  # If so, the updated path is stored in $new_path.
59287
59288  input_path="$new_path"
59289  # Check if we need to convert this using DOS-style short mode. If the path
59290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59291  # take no chances and rewrite it.
59292  # Note: m4 eats our [], so we need to use [ and ] instead.
59293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59294  if test "x$has_forbidden_chars" != x; then
59295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59299      # Going to short mode and back again did indeed matter. Since short mode is
59300      # case insensitive, let's make it lowercase to improve readability.
59301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59302      # Now convert it back to Unix-style (cygpath)
59303      input_path=`$CYGPATH -u "$shortmode_path"`
59304      new_path="$input_path"
59305    fi
59306  fi
59307
59308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59309  if test "x$test_cygdrive_prefix" = x; then
59310    # As a simple fix, exclude /usr/bin since it's not a real path.
59311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59313      # a path prefixed by /cygdrive for fixpath to work.
59314      new_path="$CYGWIN_ROOT_PATH$input_path"
59315    fi
59316  fi
59317
59318
59319  if test "x$path" != "x$new_path"; then
59320    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59323  fi
59324
59325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59326
59327  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59328  has_colon=`$ECHO $path | $GREP ^.:`
59329  new_path="$path"
59330  if test "x$has_colon" = x; then
59331    # Not in mixed or Windows style, start by that.
59332    new_path=`cmd //c echo $path`
59333  fi
59334
59335
59336  input_path="$new_path"
59337  # Check if we need to convert this using DOS-style short mode. If the path
59338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59339  # take no chances and rewrite it.
59340  # Note: m4 eats our [], so we need to use [ and ] instead.
59341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59342  if test "x$has_forbidden_chars" != x; then
59343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59345  fi
59346
59347
59348  windows_path="$new_path"
59349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59350    unix_path=`$CYGPATH -u "$windows_path"`
59351    new_path="$unix_path"
59352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59354    new_path="$unix_path"
59355  fi
59356
59357  if test "x$path" != "x$new_path"; then
59358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59361  fi
59362
59363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59365
59366    else
59367      # We're on a unix platform. Hooray! :)
59368      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59369      has_space=`$ECHO "$path" | $GREP " "`
59370      if test "x$has_space" != x; then
59371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59374      fi
59375
59376      # Use eval to expand a potential ~
59377      eval path="$path"
59378      if test ! -f "$path" && test ! -d "$path"; then
59379        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59380      fi
59381
59382      if test -d "$path"; then
59383        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59384      else
59385        dir="`$DIRNAME "$path"`"
59386        base="`$BASENAME "$path"`"
59387        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59388      fi
59389    fi
59390  fi
59391
59392
59393  # Only process if variable expands to non-empty
59394
59395  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59397
59398  # Input might be given as Windows format, start by converting to
59399  # unix format.
59400  path="$POTENTIAL_FREETYPE_LIB_PATH"
59401  new_path=`$CYGPATH -u "$path"`
59402
59403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59406  # "foo.exe" is OK but "foo" is an error.
59407  #
59408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59409  # It is also a way to make sure we got the proper file name for the real test later on.
59410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59411  if test "x$test_shortpath" = x; then
59412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59414    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59415  fi
59416
59417  # Call helper function which possibly converts this using DOS-style short mode.
59418  # If so, the updated path is stored in $new_path.
59419
59420  input_path="$new_path"
59421  # Check if we need to convert this using DOS-style short mode. If the path
59422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59423  # take no chances and rewrite it.
59424  # Note: m4 eats our [], so we need to use [ and ] instead.
59425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59426  if test "x$has_forbidden_chars" != x; then
59427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59431      # Going to short mode and back again did indeed matter. Since short mode is
59432      # case insensitive, let's make it lowercase to improve readability.
59433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59434      # Now convert it back to Unix-style (cygpath)
59435      input_path=`$CYGPATH -u "$shortmode_path"`
59436      new_path="$input_path"
59437    fi
59438  fi
59439
59440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59441  if test "x$test_cygdrive_prefix" = x; then
59442    # As a simple fix, exclude /usr/bin since it's not a real path.
59443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59445      # a path prefixed by /cygdrive for fixpath to work.
59446      new_path="$CYGWIN_ROOT_PATH$input_path"
59447    fi
59448  fi
59449
59450
59451  if test "x$path" != "x$new_path"; then
59452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59455  fi
59456
59457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59458
59459  path="$POTENTIAL_FREETYPE_LIB_PATH"
59460  has_colon=`$ECHO $path | $GREP ^.:`
59461  new_path="$path"
59462  if test "x$has_colon" = x; then
59463    # Not in mixed or Windows style, start by that.
59464    new_path=`cmd //c echo $path`
59465  fi
59466
59467
59468  input_path="$new_path"
59469  # Check if we need to convert this using DOS-style short mode. If the path
59470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59471  # take no chances and rewrite it.
59472  # Note: m4 eats our [], so we need to use [ and ] instead.
59473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59474  if test "x$has_forbidden_chars" != x; then
59475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59477  fi
59478
59479
59480  windows_path="$new_path"
59481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59482    unix_path=`$CYGPATH -u "$windows_path"`
59483    new_path="$unix_path"
59484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59486    new_path="$unix_path"
59487  fi
59488
59489  if test "x$path" != "x$new_path"; then
59490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59493  fi
59494
59495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59497
59498    else
59499      # We're on a unix platform. Hooray! :)
59500      path="$POTENTIAL_FREETYPE_LIB_PATH"
59501      has_space=`$ECHO "$path" | $GREP " "`
59502      if test "x$has_space" != x; then
59503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59506      fi
59507
59508      # Use eval to expand a potential ~
59509      eval path="$path"
59510      if test ! -f "$path" && test ! -d "$path"; then
59511        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59512      fi
59513
59514      if test -d "$path"; then
59515        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59516      else
59517        dir="`$DIRNAME "$path"`"
59518        base="`$BASENAME "$path"`"
59519        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59520      fi
59521    fi
59522  fi
59523
59524
59525    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59527$as_echo_n "checking for freetype includes... " >&6; }
59528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59529$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59530    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59531    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59532$as_echo_n "checking for freetype libraries... " >&6; }
59533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59534$as_echo "$FREETYPE_LIB_PATH" >&6; }
59535  fi
59536
59537            else
59538
59539  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59540  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59541  METHOD="well-known location"
59542
59543  # Let's start with an optimistic view of the world :-)
59544  FOUND_FREETYPE=yes
59545
59546  # First look for the canonical freetype main include file ft2build.h.
59547  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59548    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59549    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59550    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59551      # Fail.
59552      FOUND_FREETYPE=no
59553    fi
59554  fi
59555
59556  if test "x$FOUND_FREETYPE" = xyes; then
59557    # Include file found, let's continue the sanity check.
59558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59559$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59560
59561    # Reset to default value
59562    FREETYPE_BASE_NAME=freetype
59563    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59564    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59565      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59566          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59567        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59568        # for the .6 version explicitly.
59569        FREETYPE_BASE_NAME=freetype.6
59570        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59571        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59572$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59573      else
59574        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59575$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59576        FOUND_FREETYPE=no
59577      fi
59578    else
59579      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59580        # On Windows, we will need both .lib and .dll file.
59581        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59582          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59583$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59584          FOUND_FREETYPE=no
59585        fi
59586      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59587          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59588        # Found lib in isa dir, use that instead.
59589        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59590        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59591$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59592      fi
59593    fi
59594  fi
59595
59596  if test "x$FOUND_FREETYPE" = xyes; then
59597
59598  # Only process if variable expands to non-empty
59599
59600  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59602
59603  # Input might be given as Windows format, start by converting to
59604  # unix format.
59605  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59606  new_path=`$CYGPATH -u "$path"`
59607
59608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59611  # "foo.exe" is OK but "foo" is an error.
59612  #
59613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59614  # It is also a way to make sure we got the proper file name for the real test later on.
59615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59616  if test "x$test_shortpath" = x; then
59617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59619    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59620  fi
59621
59622  # Call helper function which possibly converts this using DOS-style short mode.
59623  # If so, the updated path is stored in $new_path.
59624
59625  input_path="$new_path"
59626  # Check if we need to convert this using DOS-style short mode. If the path
59627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59628  # take no chances and rewrite it.
59629  # Note: m4 eats our [], so we need to use [ and ] instead.
59630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59631  if test "x$has_forbidden_chars" != x; then
59632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59636      # Going to short mode and back again did indeed matter. Since short mode is
59637      # case insensitive, let's make it lowercase to improve readability.
59638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59639      # Now convert it back to Unix-style (cygpath)
59640      input_path=`$CYGPATH -u "$shortmode_path"`
59641      new_path="$input_path"
59642    fi
59643  fi
59644
59645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59646  if test "x$test_cygdrive_prefix" = x; then
59647    # As a simple fix, exclude /usr/bin since it's not a real path.
59648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59650      # a path prefixed by /cygdrive for fixpath to work.
59651      new_path="$CYGWIN_ROOT_PATH$input_path"
59652    fi
59653  fi
59654
59655
59656  if test "x$path" != "x$new_path"; then
59657    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59660  fi
59661
59662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59663
59664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59665  has_colon=`$ECHO $path | $GREP ^.:`
59666  new_path="$path"
59667  if test "x$has_colon" = x; then
59668    # Not in mixed or Windows style, start by that.
59669    new_path=`cmd //c echo $path`
59670  fi
59671
59672
59673  input_path="$new_path"
59674  # Check if we need to convert this using DOS-style short mode. If the path
59675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59676  # take no chances and rewrite it.
59677  # Note: m4 eats our [], so we need to use [ and ] instead.
59678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59679  if test "x$has_forbidden_chars" != x; then
59680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59682  fi
59683
59684
59685  windows_path="$new_path"
59686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59687    unix_path=`$CYGPATH -u "$windows_path"`
59688    new_path="$unix_path"
59689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59691    new_path="$unix_path"
59692  fi
59693
59694  if test "x$path" != "x$new_path"; then
59695    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59697$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59698  fi
59699
59700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59702
59703    else
59704      # We're on a unix platform. Hooray! :)
59705      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59706      has_space=`$ECHO "$path" | $GREP " "`
59707      if test "x$has_space" != x; then
59708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59711      fi
59712
59713      # Use eval to expand a potential ~
59714      eval path="$path"
59715      if test ! -f "$path" && test ! -d "$path"; then
59716        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59717      fi
59718
59719      if test -d "$path"; then
59720        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59721      else
59722        dir="`$DIRNAME "$path"`"
59723        base="`$BASENAME "$path"`"
59724        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59725      fi
59726    fi
59727  fi
59728
59729
59730  # Only process if variable expands to non-empty
59731
59732  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59734
59735  # Input might be given as Windows format, start by converting to
59736  # unix format.
59737  path="$POTENTIAL_FREETYPE_LIB_PATH"
59738  new_path=`$CYGPATH -u "$path"`
59739
59740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59743  # "foo.exe" is OK but "foo" is an error.
59744  #
59745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59746  # It is also a way to make sure we got the proper file name for the real test later on.
59747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59748  if test "x$test_shortpath" = x; then
59749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59752  fi
59753
59754  # Call helper function which possibly converts this using DOS-style short mode.
59755  # If so, the updated path is stored in $new_path.
59756
59757  input_path="$new_path"
59758  # Check if we need to convert this using DOS-style short mode. If the path
59759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59760  # take no chances and rewrite it.
59761  # Note: m4 eats our [], so we need to use [ and ] instead.
59762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59763  if test "x$has_forbidden_chars" != x; then
59764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59768      # Going to short mode and back again did indeed matter. Since short mode is
59769      # case insensitive, let's make it lowercase to improve readability.
59770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59771      # Now convert it back to Unix-style (cygpath)
59772      input_path=`$CYGPATH -u "$shortmode_path"`
59773      new_path="$input_path"
59774    fi
59775  fi
59776
59777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59778  if test "x$test_cygdrive_prefix" = x; then
59779    # As a simple fix, exclude /usr/bin since it's not a real path.
59780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59782      # a path prefixed by /cygdrive for fixpath to work.
59783      new_path="$CYGWIN_ROOT_PATH$input_path"
59784    fi
59785  fi
59786
59787
59788  if test "x$path" != "x$new_path"; then
59789    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59792  fi
59793
59794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59795
59796  path="$POTENTIAL_FREETYPE_LIB_PATH"
59797  has_colon=`$ECHO $path | $GREP ^.:`
59798  new_path="$path"
59799  if test "x$has_colon" = x; then
59800    # Not in mixed or Windows style, start by that.
59801    new_path=`cmd //c echo $path`
59802  fi
59803
59804
59805  input_path="$new_path"
59806  # Check if we need to convert this using DOS-style short mode. If the path
59807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59808  # take no chances and rewrite it.
59809  # Note: m4 eats our [], so we need to use [ and ] instead.
59810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59811  if test "x$has_forbidden_chars" != x; then
59812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59814  fi
59815
59816
59817  windows_path="$new_path"
59818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59819    unix_path=`$CYGPATH -u "$windows_path"`
59820    new_path="$unix_path"
59821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59823    new_path="$unix_path"
59824  fi
59825
59826  if test "x$path" != "x$new_path"; then
59827    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59830  fi
59831
59832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59834
59835    else
59836      # We're on a unix platform. Hooray! :)
59837      path="$POTENTIAL_FREETYPE_LIB_PATH"
59838      has_space=`$ECHO "$path" | $GREP " "`
59839      if test "x$has_space" != x; then
59840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59843      fi
59844
59845      # Use eval to expand a potential ~
59846      eval path="$path"
59847      if test ! -f "$path" && test ! -d "$path"; then
59848        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59849      fi
59850
59851      if test -d "$path"; then
59852        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59853      else
59854        dir="`$DIRNAME "$path"`"
59855        base="`$BASENAME "$path"`"
59856        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59857      fi
59858    fi
59859  fi
59860
59861
59862    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59864$as_echo_n "checking for freetype includes... " >&6; }
59865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59866$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59867    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59869$as_echo_n "checking for freetype libraries... " >&6; }
59870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59871$as_echo "$FREETYPE_LIB_PATH" >&6; }
59872  fi
59873
59874            fi
59875            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59876                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59877              # Source is available, as a last resort try to build freetype in default location
59878
59879  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59880  BUILD_FREETYPE=yes
59881
59882  # Check if the freetype sources are acessible..
59883  if ! test -d $FREETYPE_SRC_PATH; then
59884    { $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
59885$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59886    BUILD_FREETYPE=no
59887  fi
59888  # ..and contain a vc2010 project file
59889  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59890  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59891    { $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
59892$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59893    BUILD_FREETYPE=no
59894  fi
59895  # Now check if configure found a version of 'msbuild.exe'
59896  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59897    { $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
59898$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;}
59899    BUILD_FREETYPE=no
59900  fi
59901
59902  # Ready to go..
59903  if test "x$BUILD_FREETYPE" = xyes; then
59904    # msbuild requires trailing slashes for output directories
59905    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59906    freetype_lib_path_unix="$freetype_lib_path"
59907    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59908
59909  unix_path="$vcxproj_path"
59910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59911    windows_path=`$CYGPATH -m "$unix_path"`
59912    vcxproj_path="$windows_path"
59913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59914    windows_path=`cmd //c echo $unix_path`
59915    vcxproj_path="$windows_path"
59916  fi
59917
59918
59919  unix_path="$freetype_lib_path"
59920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59921    windows_path=`$CYGPATH -m "$unix_path"`
59922    freetype_lib_path="$windows_path"
59923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59924    windows_path=`cmd //c echo $unix_path`
59925    freetype_lib_path="$windows_path"
59926  fi
59927
59928
59929  unix_path="$freetype_obj_path"
59930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59931    windows_path=`$CYGPATH -m "$unix_path"`
59932    freetype_obj_path="$windows_path"
59933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59934    windows_path=`cmd //c echo $unix_path`
59935    freetype_obj_path="$windows_path"
59936  fi
59937
59938    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59939      freetype_platform=x64
59940    else
59941      freetype_platform=win32
59942    fi
59943
59944    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59945    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59946    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59947    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59948    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59949$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59950
59951    # First we try to build the freetype.dll
59952    $ECHO -e "@echo off\n"\
59953        "$MSBUILD $vcxproj_path "\
59954        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59955        "/p:Configuration=\"Release Multithreaded\" "\
59956        "/p:Platform=$freetype_platform "\
59957        "/p:ConfigurationType=DynamicLibrary "\
59958        "/p:TargetName=freetype "\
59959        "/p:OutDir=\"$freetype_lib_path\" "\
59960        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59961    cmd /c freetype.bat
59962
59963    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59964      # If that succeeds we also build freetype.lib
59965      $ECHO -e "@echo off\n"\
59966          "$MSBUILD $vcxproj_path "\
59967          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59968          "/p:Configuration=\"Release Multithreaded\" "\
59969          "/p:Platform=$freetype_platform "\
59970          "/p:ConfigurationType=StaticLibrary "\
59971          "/p:TargetName=freetype "\
59972          "/p:OutDir=\"$freetype_lib_path\" "\
59973          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59974      cmd /c freetype.bat
59975
59976      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59977        # Once we build both, lib and dll, set freetype lib and include path appropriately
59978        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59979        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59980        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59981$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59982      else
59983        BUILD_FREETYPE=no
59984      fi
59985    else
59986      BUILD_FREETYPE=no
59987    fi
59988  fi
59989
59990              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59991
59992  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59993  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59994  METHOD="well-known location"
59995
59996  # Let's start with an optimistic view of the world :-)
59997  FOUND_FREETYPE=yes
59998
59999  # First look for the canonical freetype main include file ft2build.h.
60000  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60001    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60002    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60003    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60004      # Fail.
60005      FOUND_FREETYPE=no
60006    fi
60007  fi
60008
60009  if test "x$FOUND_FREETYPE" = xyes; then
60010    # Include file found, let's continue the sanity check.
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60012$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60013
60014    # Reset to default value
60015    FREETYPE_BASE_NAME=freetype
60016    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60017    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60018      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60019          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60020        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60021        # for the .6 version explicitly.
60022        FREETYPE_BASE_NAME=freetype.6
60023        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60024        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60025$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60026      else
60027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60028$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60029        FOUND_FREETYPE=no
60030      fi
60031    else
60032      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60033        # On Windows, we will need both .lib and .dll file.
60034        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60035          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60036$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60037          FOUND_FREETYPE=no
60038        fi
60039      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60040          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60041        # Found lib in isa dir, use that instead.
60042        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60043        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60044$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60045      fi
60046    fi
60047  fi
60048
60049  if test "x$FOUND_FREETYPE" = xyes; then
60050
60051  # Only process if variable expands to non-empty
60052
60053  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60055
60056  # Input might be given as Windows format, start by converting to
60057  # unix format.
60058  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60059  new_path=`$CYGPATH -u "$path"`
60060
60061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60064  # "foo.exe" is OK but "foo" is an error.
60065  #
60066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60067  # It is also a way to make sure we got the proper file name for the real test later on.
60068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60069  if test "x$test_shortpath" = x; then
60070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60072    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60073  fi
60074
60075  # Call helper function which possibly converts this using DOS-style short mode.
60076  # If so, the updated path is stored in $new_path.
60077
60078  input_path="$new_path"
60079  # Check if we need to convert this using DOS-style short mode. If the path
60080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60081  # take no chances and rewrite it.
60082  # Note: m4 eats our [], so we need to use [ and ] instead.
60083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60084  if test "x$has_forbidden_chars" != x; then
60085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60089      # Going to short mode and back again did indeed matter. Since short mode is
60090      # case insensitive, let's make it lowercase to improve readability.
60091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60092      # Now convert it back to Unix-style (cygpath)
60093      input_path=`$CYGPATH -u "$shortmode_path"`
60094      new_path="$input_path"
60095    fi
60096  fi
60097
60098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60099  if test "x$test_cygdrive_prefix" = x; then
60100    # As a simple fix, exclude /usr/bin since it's not a real path.
60101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60103      # a path prefixed by /cygdrive for fixpath to work.
60104      new_path="$CYGWIN_ROOT_PATH$input_path"
60105    fi
60106  fi
60107
60108
60109  if test "x$path" != "x$new_path"; then
60110    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60113  fi
60114
60115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60116
60117  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60118  has_colon=`$ECHO $path | $GREP ^.:`
60119  new_path="$path"
60120  if test "x$has_colon" = x; then
60121    # Not in mixed or Windows style, start by that.
60122    new_path=`cmd //c echo $path`
60123  fi
60124
60125
60126  input_path="$new_path"
60127  # Check if we need to convert this using DOS-style short mode. If the path
60128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60129  # take no chances and rewrite it.
60130  # Note: m4 eats our [], so we need to use [ and ] instead.
60131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60132  if test "x$has_forbidden_chars" != x; then
60133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60135  fi
60136
60137
60138  windows_path="$new_path"
60139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60140    unix_path=`$CYGPATH -u "$windows_path"`
60141    new_path="$unix_path"
60142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60144    new_path="$unix_path"
60145  fi
60146
60147  if test "x$path" != "x$new_path"; then
60148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60151  fi
60152
60153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60155
60156    else
60157      # We're on a unix platform. Hooray! :)
60158      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60159      has_space=`$ECHO "$path" | $GREP " "`
60160      if test "x$has_space" != x; then
60161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60164      fi
60165
60166      # Use eval to expand a potential ~
60167      eval path="$path"
60168      if test ! -f "$path" && test ! -d "$path"; then
60169        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60170      fi
60171
60172      if test -d "$path"; then
60173        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60174      else
60175        dir="`$DIRNAME "$path"`"
60176        base="`$BASENAME "$path"`"
60177        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60178      fi
60179    fi
60180  fi
60181
60182
60183  # Only process if variable expands to non-empty
60184
60185  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60187
60188  # Input might be given as Windows format, start by converting to
60189  # unix format.
60190  path="$POTENTIAL_FREETYPE_LIB_PATH"
60191  new_path=`$CYGPATH -u "$path"`
60192
60193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60196  # "foo.exe" is OK but "foo" is an error.
60197  #
60198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60199  # It is also a way to make sure we got the proper file name for the real test later on.
60200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60201  if test "x$test_shortpath" = x; then
60202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60204    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60205  fi
60206
60207  # Call helper function which possibly converts this using DOS-style short mode.
60208  # If so, the updated path is stored in $new_path.
60209
60210  input_path="$new_path"
60211  # Check if we need to convert this using DOS-style short mode. If the path
60212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60213  # take no chances and rewrite it.
60214  # Note: m4 eats our [], so we need to use [ and ] instead.
60215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60216  if test "x$has_forbidden_chars" != x; then
60217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60221      # Going to short mode and back again did indeed matter. Since short mode is
60222      # case insensitive, let's make it lowercase to improve readability.
60223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60224      # Now convert it back to Unix-style (cygpath)
60225      input_path=`$CYGPATH -u "$shortmode_path"`
60226      new_path="$input_path"
60227    fi
60228  fi
60229
60230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60231  if test "x$test_cygdrive_prefix" = x; then
60232    # As a simple fix, exclude /usr/bin since it's not a real path.
60233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60235      # a path prefixed by /cygdrive for fixpath to work.
60236      new_path="$CYGWIN_ROOT_PATH$input_path"
60237    fi
60238  fi
60239
60240
60241  if test "x$path" != "x$new_path"; then
60242    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60245  fi
60246
60247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60248
60249  path="$POTENTIAL_FREETYPE_LIB_PATH"
60250  has_colon=`$ECHO $path | $GREP ^.:`
60251  new_path="$path"
60252  if test "x$has_colon" = x; then
60253    # Not in mixed or Windows style, start by that.
60254    new_path=`cmd //c echo $path`
60255  fi
60256
60257
60258  input_path="$new_path"
60259  # Check if we need to convert this using DOS-style short mode. If the path
60260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60261  # take no chances and rewrite it.
60262  # Note: m4 eats our [], so we need to use [ and ] instead.
60263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60264  if test "x$has_forbidden_chars" != x; then
60265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60267  fi
60268
60269
60270  windows_path="$new_path"
60271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60272    unix_path=`$CYGPATH -u "$windows_path"`
60273    new_path="$unix_path"
60274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60276    new_path="$unix_path"
60277  fi
60278
60279  if test "x$path" != "x$new_path"; then
60280    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60283  fi
60284
60285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60287
60288    else
60289      # We're on a unix platform. Hooray! :)
60290      path="$POTENTIAL_FREETYPE_LIB_PATH"
60291      has_space=`$ECHO "$path" | $GREP " "`
60292      if test "x$has_space" != x; then
60293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60294$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60296      fi
60297
60298      # Use eval to expand a potential ~
60299      eval path="$path"
60300      if test ! -f "$path" && test ! -d "$path"; then
60301        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60302      fi
60303
60304      if test -d "$path"; then
60305        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60306      else
60307        dir="`$DIRNAME "$path"`"
60308        base="`$BASENAME "$path"`"
60309        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60310      fi
60311    fi
60312  fi
60313
60314
60315    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60317$as_echo_n "checking for freetype includes... " >&6; }
60318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60319$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60320    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60322$as_echo_n "checking for freetype libraries... " >&6; }
60323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60324$as_echo "$FREETYPE_LIB_PATH" >&6; }
60325  fi
60326
60327              else
60328
60329  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60330  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60331  METHOD="well-known location"
60332
60333  # Let's start with an optimistic view of the world :-)
60334  FOUND_FREETYPE=yes
60335
60336  # First look for the canonical freetype main include file ft2build.h.
60337  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60338    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60339    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60340    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60341      # Fail.
60342      FOUND_FREETYPE=no
60343    fi
60344  fi
60345
60346  if test "x$FOUND_FREETYPE" = xyes; then
60347    # Include file found, let's continue the sanity check.
60348    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60349$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60350
60351    # Reset to default value
60352    FREETYPE_BASE_NAME=freetype
60353    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60354    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60355      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60356          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60357        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60358        # for the .6 version explicitly.
60359        FREETYPE_BASE_NAME=freetype.6
60360        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60361        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60362$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60363      else
60364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60365$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60366        FOUND_FREETYPE=no
60367      fi
60368    else
60369      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60370        # On Windows, we will need both .lib and .dll file.
60371        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60372          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60373$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60374          FOUND_FREETYPE=no
60375        fi
60376      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60377          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60378        # Found lib in isa dir, use that instead.
60379        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60380        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60381$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60382      fi
60383    fi
60384  fi
60385
60386  if test "x$FOUND_FREETYPE" = xyes; then
60387
60388  # Only process if variable expands to non-empty
60389
60390  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60392
60393  # Input might be given as Windows format, start by converting to
60394  # unix format.
60395  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60396  new_path=`$CYGPATH -u "$path"`
60397
60398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60401  # "foo.exe" is OK but "foo" is an error.
60402  #
60403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60404  # It is also a way to make sure we got the proper file name for the real test later on.
60405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60406  if test "x$test_shortpath" = x; then
60407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60409    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60410  fi
60411
60412  # Call helper function which possibly converts this using DOS-style short mode.
60413  # If so, the updated path is stored in $new_path.
60414
60415  input_path="$new_path"
60416  # Check if we need to convert this using DOS-style short mode. If the path
60417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60418  # take no chances and rewrite it.
60419  # Note: m4 eats our [], so we need to use [ and ] instead.
60420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60421  if test "x$has_forbidden_chars" != x; then
60422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60426      # Going to short mode and back again did indeed matter. Since short mode is
60427      # case insensitive, let's make it lowercase to improve readability.
60428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60429      # Now convert it back to Unix-style (cygpath)
60430      input_path=`$CYGPATH -u "$shortmode_path"`
60431      new_path="$input_path"
60432    fi
60433  fi
60434
60435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60436  if test "x$test_cygdrive_prefix" = x; then
60437    # As a simple fix, exclude /usr/bin since it's not a real path.
60438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60440      # a path prefixed by /cygdrive for fixpath to work.
60441      new_path="$CYGWIN_ROOT_PATH$input_path"
60442    fi
60443  fi
60444
60445
60446  if test "x$path" != "x$new_path"; then
60447    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60450  fi
60451
60452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60453
60454  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60455  has_colon=`$ECHO $path | $GREP ^.:`
60456  new_path="$path"
60457  if test "x$has_colon" = x; then
60458    # Not in mixed or Windows style, start by that.
60459    new_path=`cmd //c echo $path`
60460  fi
60461
60462
60463  input_path="$new_path"
60464  # Check if we need to convert this using DOS-style short mode. If the path
60465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60466  # take no chances and rewrite it.
60467  # Note: m4 eats our [], so we need to use [ and ] instead.
60468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60469  if test "x$has_forbidden_chars" != x; then
60470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60472  fi
60473
60474
60475  windows_path="$new_path"
60476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60477    unix_path=`$CYGPATH -u "$windows_path"`
60478    new_path="$unix_path"
60479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60481    new_path="$unix_path"
60482  fi
60483
60484  if test "x$path" != "x$new_path"; then
60485    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60488  fi
60489
60490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60492
60493    else
60494      # We're on a unix platform. Hooray! :)
60495      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60496      has_space=`$ECHO "$path" | $GREP " "`
60497      if test "x$has_space" != x; then
60498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60501      fi
60502
60503      # Use eval to expand a potential ~
60504      eval path="$path"
60505      if test ! -f "$path" && test ! -d "$path"; then
60506        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60507      fi
60508
60509      if test -d "$path"; then
60510        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60511      else
60512        dir="`$DIRNAME "$path"`"
60513        base="`$BASENAME "$path"`"
60514        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60515      fi
60516    fi
60517  fi
60518
60519
60520  # Only process if variable expands to non-empty
60521
60522  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60524
60525  # Input might be given as Windows format, start by converting to
60526  # unix format.
60527  path="$POTENTIAL_FREETYPE_LIB_PATH"
60528  new_path=`$CYGPATH -u "$path"`
60529
60530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60533  # "foo.exe" is OK but "foo" is an error.
60534  #
60535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60536  # It is also a way to make sure we got the proper file name for the real test later on.
60537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60538  if test "x$test_shortpath" = x; then
60539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60540$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60541    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60542  fi
60543
60544  # Call helper function which possibly converts this using DOS-style short mode.
60545  # If so, the updated path is stored in $new_path.
60546
60547  input_path="$new_path"
60548  # Check if we need to convert this using DOS-style short mode. If the path
60549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60550  # take no chances and rewrite it.
60551  # Note: m4 eats our [], so we need to use [ and ] instead.
60552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60553  if test "x$has_forbidden_chars" != x; then
60554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60558      # Going to short mode and back again did indeed matter. Since short mode is
60559      # case insensitive, let's make it lowercase to improve readability.
60560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60561      # Now convert it back to Unix-style (cygpath)
60562      input_path=`$CYGPATH -u "$shortmode_path"`
60563      new_path="$input_path"
60564    fi
60565  fi
60566
60567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60568  if test "x$test_cygdrive_prefix" = x; then
60569    # As a simple fix, exclude /usr/bin since it's not a real path.
60570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60572      # a path prefixed by /cygdrive for fixpath to work.
60573      new_path="$CYGWIN_ROOT_PATH$input_path"
60574    fi
60575  fi
60576
60577
60578  if test "x$path" != "x$new_path"; then
60579    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60582  fi
60583
60584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60585
60586  path="$POTENTIAL_FREETYPE_LIB_PATH"
60587  has_colon=`$ECHO $path | $GREP ^.:`
60588  new_path="$path"
60589  if test "x$has_colon" = x; then
60590    # Not in mixed or Windows style, start by that.
60591    new_path=`cmd //c echo $path`
60592  fi
60593
60594
60595  input_path="$new_path"
60596  # Check if we need to convert this using DOS-style short mode. If the path
60597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60598  # take no chances and rewrite it.
60599  # Note: m4 eats our [], so we need to use [ and ] instead.
60600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60601  if test "x$has_forbidden_chars" != x; then
60602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60604  fi
60605
60606
60607  windows_path="$new_path"
60608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60609    unix_path=`$CYGPATH -u "$windows_path"`
60610    new_path="$unix_path"
60611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60613    new_path="$unix_path"
60614  fi
60615
60616  if test "x$path" != "x$new_path"; then
60617    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60619$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60620  fi
60621
60622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60624
60625    else
60626      # We're on a unix platform. Hooray! :)
60627      path="$POTENTIAL_FREETYPE_LIB_PATH"
60628      has_space=`$ECHO "$path" | $GREP " "`
60629      if test "x$has_space" != x; then
60630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60633      fi
60634
60635      # Use eval to expand a potential ~
60636      eval path="$path"
60637      if test ! -f "$path" && test ! -d "$path"; then
60638        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60639      fi
60640
60641      if test -d "$path"; then
60642        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60643      else
60644        dir="`$DIRNAME "$path"`"
60645        base="`$BASENAME "$path"`"
60646        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60647      fi
60648    fi
60649  fi
60650
60651
60652    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60654$as_echo_n "checking for freetype includes... " >&6; }
60655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60656$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60657    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60659$as_echo_n "checking for freetype libraries... " >&6; }
60660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60661$as_echo "$FREETYPE_LIB_PATH" >&6; }
60662  fi
60663
60664              fi
60665            fi
60666          fi
60667        else
60668          FREETYPE_BASE_DIR="$SYSROOT/usr"
60669
60670  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60671  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60672  METHOD="well-known location"
60673
60674  # Let's start with an optimistic view of the world :-)
60675  FOUND_FREETYPE=yes
60676
60677  # First look for the canonical freetype main include file ft2build.h.
60678  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60679    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60680    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60681    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60682      # Fail.
60683      FOUND_FREETYPE=no
60684    fi
60685  fi
60686
60687  if test "x$FOUND_FREETYPE" = xyes; then
60688    # Include file found, let's continue the sanity check.
60689    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60690$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60691
60692    # Reset to default value
60693    FREETYPE_BASE_NAME=freetype
60694    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60695    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60696      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60697          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60698        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60699        # for the .6 version explicitly.
60700        FREETYPE_BASE_NAME=freetype.6
60701        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60702        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60703$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60704      else
60705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60706$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60707        FOUND_FREETYPE=no
60708      fi
60709    else
60710      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60711        # On Windows, we will need both .lib and .dll file.
60712        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60713          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60715          FOUND_FREETYPE=no
60716        fi
60717      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60718          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60719        # Found lib in isa dir, use that instead.
60720        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60721        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60722$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60723      fi
60724    fi
60725  fi
60726
60727  if test "x$FOUND_FREETYPE" = xyes; then
60728
60729  # Only process if variable expands to non-empty
60730
60731  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60733
60734  # Input might be given as Windows format, start by converting to
60735  # unix format.
60736  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60737  new_path=`$CYGPATH -u "$path"`
60738
60739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60742  # "foo.exe" is OK but "foo" is an error.
60743  #
60744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60745  # It is also a way to make sure we got the proper file name for the real test later on.
60746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60747  if test "x$test_shortpath" = x; then
60748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60750    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60751  fi
60752
60753  # Call helper function which possibly converts this using DOS-style short mode.
60754  # If so, the updated path is stored in $new_path.
60755
60756  input_path="$new_path"
60757  # Check if we need to convert this using DOS-style short mode. If the path
60758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60759  # take no chances and rewrite it.
60760  # Note: m4 eats our [], so we need to use [ and ] instead.
60761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60762  if test "x$has_forbidden_chars" != x; then
60763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60767      # Going to short mode and back again did indeed matter. Since short mode is
60768      # case insensitive, let's make it lowercase to improve readability.
60769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60770      # Now convert it back to Unix-style (cygpath)
60771      input_path=`$CYGPATH -u "$shortmode_path"`
60772      new_path="$input_path"
60773    fi
60774  fi
60775
60776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60777  if test "x$test_cygdrive_prefix" = x; then
60778    # As a simple fix, exclude /usr/bin since it's not a real path.
60779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60781      # a path prefixed by /cygdrive for fixpath to work.
60782      new_path="$CYGWIN_ROOT_PATH$input_path"
60783    fi
60784  fi
60785
60786
60787  if test "x$path" != "x$new_path"; then
60788    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60791  fi
60792
60793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60794
60795  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60796  has_colon=`$ECHO $path | $GREP ^.:`
60797  new_path="$path"
60798  if test "x$has_colon" = x; then
60799    # Not in mixed or Windows style, start by that.
60800    new_path=`cmd //c echo $path`
60801  fi
60802
60803
60804  input_path="$new_path"
60805  # Check if we need to convert this using DOS-style short mode. If the path
60806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60807  # take no chances and rewrite it.
60808  # Note: m4 eats our [], so we need to use [ and ] instead.
60809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60810  if test "x$has_forbidden_chars" != x; then
60811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60813  fi
60814
60815
60816  windows_path="$new_path"
60817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60818    unix_path=`$CYGPATH -u "$windows_path"`
60819    new_path="$unix_path"
60820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60822    new_path="$unix_path"
60823  fi
60824
60825  if test "x$path" != "x$new_path"; then
60826    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60829  fi
60830
60831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60833
60834    else
60835      # We're on a unix platform. Hooray! :)
60836      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60837      has_space=`$ECHO "$path" | $GREP " "`
60838      if test "x$has_space" != x; then
60839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60842      fi
60843
60844      # Use eval to expand a potential ~
60845      eval path="$path"
60846      if test ! -f "$path" && test ! -d "$path"; then
60847        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60848      fi
60849
60850      if test -d "$path"; then
60851        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60852      else
60853        dir="`$DIRNAME "$path"`"
60854        base="`$BASENAME "$path"`"
60855        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60856      fi
60857    fi
60858  fi
60859
60860
60861  # Only process if variable expands to non-empty
60862
60863  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60865
60866  # Input might be given as Windows format, start by converting to
60867  # unix format.
60868  path="$POTENTIAL_FREETYPE_LIB_PATH"
60869  new_path=`$CYGPATH -u "$path"`
60870
60871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60874  # "foo.exe" is OK but "foo" is an error.
60875  #
60876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60877  # It is also a way to make sure we got the proper file name for the real test later on.
60878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60879  if test "x$test_shortpath" = x; then
60880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60882    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60883  fi
60884
60885  # Call helper function which possibly converts this using DOS-style short mode.
60886  # If so, the updated path is stored in $new_path.
60887
60888  input_path="$new_path"
60889  # Check if we need to convert this using DOS-style short mode. If the path
60890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60891  # take no chances and rewrite it.
60892  # Note: m4 eats our [], so we need to use [ and ] instead.
60893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60894  if test "x$has_forbidden_chars" != x; then
60895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60899      # Going to short mode and back again did indeed matter. Since short mode is
60900      # case insensitive, let's make it lowercase to improve readability.
60901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60902      # Now convert it back to Unix-style (cygpath)
60903      input_path=`$CYGPATH -u "$shortmode_path"`
60904      new_path="$input_path"
60905    fi
60906  fi
60907
60908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60909  if test "x$test_cygdrive_prefix" = x; then
60910    # As a simple fix, exclude /usr/bin since it's not a real path.
60911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60913      # a path prefixed by /cygdrive for fixpath to work.
60914      new_path="$CYGWIN_ROOT_PATH$input_path"
60915    fi
60916  fi
60917
60918
60919  if test "x$path" != "x$new_path"; then
60920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60923  fi
60924
60925    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60926
60927  path="$POTENTIAL_FREETYPE_LIB_PATH"
60928  has_colon=`$ECHO $path | $GREP ^.:`
60929  new_path="$path"
60930  if test "x$has_colon" = x; then
60931    # Not in mixed or Windows style, start by that.
60932    new_path=`cmd //c echo $path`
60933  fi
60934
60935
60936  input_path="$new_path"
60937  # Check if we need to convert this using DOS-style short mode. If the path
60938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60939  # take no chances and rewrite it.
60940  # Note: m4 eats our [], so we need to use [ and ] instead.
60941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60942  if test "x$has_forbidden_chars" != x; then
60943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60945  fi
60946
60947
60948  windows_path="$new_path"
60949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60950    unix_path=`$CYGPATH -u "$windows_path"`
60951    new_path="$unix_path"
60952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60954    new_path="$unix_path"
60955  fi
60956
60957  if test "x$path" != "x$new_path"; then
60958    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60960$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60961  fi
60962
60963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60965
60966    else
60967      # We're on a unix platform. Hooray! :)
60968      path="$POTENTIAL_FREETYPE_LIB_PATH"
60969      has_space=`$ECHO "$path" | $GREP " "`
60970      if test "x$has_space" != x; then
60971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60973        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60974      fi
60975
60976      # Use eval to expand a potential ~
60977      eval path="$path"
60978      if test ! -f "$path" && test ! -d "$path"; then
60979        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60980      fi
60981
60982      if test -d "$path"; then
60983        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60984      else
60985        dir="`$DIRNAME "$path"`"
60986        base="`$BASENAME "$path"`"
60987        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60988      fi
60989    fi
60990  fi
60991
60992
60993    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60995$as_echo_n "checking for freetype includes... " >&6; }
60996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60997$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60998    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61000$as_echo_n "checking for freetype libraries... " >&6; }
61001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61002$as_echo "$FREETYPE_LIB_PATH" >&6; }
61003  fi
61004
61005
61006          if test "x$FOUND_FREETYPE" != xyes; then
61007            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61008
61009  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61010  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61011  METHOD="well-known location"
61012
61013  # Let's start with an optimistic view of the world :-)
61014  FOUND_FREETYPE=yes
61015
61016  # First look for the canonical freetype main include file ft2build.h.
61017  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61018    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61019    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61020    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61021      # Fail.
61022      FOUND_FREETYPE=no
61023    fi
61024  fi
61025
61026  if test "x$FOUND_FREETYPE" = xyes; then
61027    # Include file found, let's continue the sanity check.
61028    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61029$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61030
61031    # Reset to default value
61032    FREETYPE_BASE_NAME=freetype
61033    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61034    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61035      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61036          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61037        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61038        # for the .6 version explicitly.
61039        FREETYPE_BASE_NAME=freetype.6
61040        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61041        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61042$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61043      else
61044        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61045$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61046        FOUND_FREETYPE=no
61047      fi
61048    else
61049      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61050        # On Windows, we will need both .lib and .dll file.
61051        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61052          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61053$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61054          FOUND_FREETYPE=no
61055        fi
61056      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61057          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61058        # Found lib in isa dir, use that instead.
61059        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61060        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61061$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61062      fi
61063    fi
61064  fi
61065
61066  if test "x$FOUND_FREETYPE" = xyes; then
61067
61068  # Only process if variable expands to non-empty
61069
61070  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61072
61073  # Input might be given as Windows format, start by converting to
61074  # unix format.
61075  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61076  new_path=`$CYGPATH -u "$path"`
61077
61078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61081  # "foo.exe" is OK but "foo" is an error.
61082  #
61083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61084  # It is also a way to make sure we got the proper file name for the real test later on.
61085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61086  if test "x$test_shortpath" = x; then
61087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61089    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61090  fi
61091
61092  # Call helper function which possibly converts this using DOS-style short mode.
61093  # If so, the updated path is stored in $new_path.
61094
61095  input_path="$new_path"
61096  # Check if we need to convert this using DOS-style short mode. If the path
61097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61098  # take no chances and rewrite it.
61099  # Note: m4 eats our [], so we need to use [ and ] instead.
61100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61101  if test "x$has_forbidden_chars" != x; then
61102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61106      # Going to short mode and back again did indeed matter. Since short mode is
61107      # case insensitive, let's make it lowercase to improve readability.
61108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61109      # Now convert it back to Unix-style (cygpath)
61110      input_path=`$CYGPATH -u "$shortmode_path"`
61111      new_path="$input_path"
61112    fi
61113  fi
61114
61115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61116  if test "x$test_cygdrive_prefix" = x; then
61117    # As a simple fix, exclude /usr/bin since it's not a real path.
61118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61120      # a path prefixed by /cygdrive for fixpath to work.
61121      new_path="$CYGWIN_ROOT_PATH$input_path"
61122    fi
61123  fi
61124
61125
61126  if test "x$path" != "x$new_path"; then
61127    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61130  fi
61131
61132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61133
61134  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61135  has_colon=`$ECHO $path | $GREP ^.:`
61136  new_path="$path"
61137  if test "x$has_colon" = x; then
61138    # Not in mixed or Windows style, start by that.
61139    new_path=`cmd //c echo $path`
61140  fi
61141
61142
61143  input_path="$new_path"
61144  # Check if we need to convert this using DOS-style short mode. If the path
61145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61146  # take no chances and rewrite it.
61147  # Note: m4 eats our [], so we need to use [ and ] instead.
61148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61149  if test "x$has_forbidden_chars" != x; then
61150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61152  fi
61153
61154
61155  windows_path="$new_path"
61156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61157    unix_path=`$CYGPATH -u "$windows_path"`
61158    new_path="$unix_path"
61159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61161    new_path="$unix_path"
61162  fi
61163
61164  if test "x$path" != "x$new_path"; then
61165    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61168  fi
61169
61170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61172
61173    else
61174      # We're on a unix platform. Hooray! :)
61175      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61176      has_space=`$ECHO "$path" | $GREP " "`
61177      if test "x$has_space" != x; then
61178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61181      fi
61182
61183      # Use eval to expand a potential ~
61184      eval path="$path"
61185      if test ! -f "$path" && test ! -d "$path"; then
61186        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61187      fi
61188
61189      if test -d "$path"; then
61190        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61191      else
61192        dir="`$DIRNAME "$path"`"
61193        base="`$BASENAME "$path"`"
61194        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61195      fi
61196    fi
61197  fi
61198
61199
61200  # Only process if variable expands to non-empty
61201
61202  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61204
61205  # Input might be given as Windows format, start by converting to
61206  # unix format.
61207  path="$POTENTIAL_FREETYPE_LIB_PATH"
61208  new_path=`$CYGPATH -u "$path"`
61209
61210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61213  # "foo.exe" is OK but "foo" is an error.
61214  #
61215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61216  # It is also a way to make sure we got the proper file name for the real test later on.
61217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61218  if test "x$test_shortpath" = x; then
61219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61220$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61221    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61222  fi
61223
61224  # Call helper function which possibly converts this using DOS-style short mode.
61225  # If so, the updated path is stored in $new_path.
61226
61227  input_path="$new_path"
61228  # Check if we need to convert this using DOS-style short mode. If the path
61229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61230  # take no chances and rewrite it.
61231  # Note: m4 eats our [], so we need to use [ and ] instead.
61232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61233  if test "x$has_forbidden_chars" != x; then
61234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61238      # Going to short mode and back again did indeed matter. Since short mode is
61239      # case insensitive, let's make it lowercase to improve readability.
61240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61241      # Now convert it back to Unix-style (cygpath)
61242      input_path=`$CYGPATH -u "$shortmode_path"`
61243      new_path="$input_path"
61244    fi
61245  fi
61246
61247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61248  if test "x$test_cygdrive_prefix" = x; then
61249    # As a simple fix, exclude /usr/bin since it's not a real path.
61250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61252      # a path prefixed by /cygdrive for fixpath to work.
61253      new_path="$CYGWIN_ROOT_PATH$input_path"
61254    fi
61255  fi
61256
61257
61258  if test "x$path" != "x$new_path"; then
61259    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61262  fi
61263
61264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61265
61266  path="$POTENTIAL_FREETYPE_LIB_PATH"
61267  has_colon=`$ECHO $path | $GREP ^.:`
61268  new_path="$path"
61269  if test "x$has_colon" = x; then
61270    # Not in mixed or Windows style, start by that.
61271    new_path=`cmd //c echo $path`
61272  fi
61273
61274
61275  input_path="$new_path"
61276  # Check if we need to convert this using DOS-style short mode. If the path
61277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61278  # take no chances and rewrite it.
61279  # Note: m4 eats our [], so we need to use [ and ] instead.
61280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61281  if test "x$has_forbidden_chars" != x; then
61282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61284  fi
61285
61286
61287  windows_path="$new_path"
61288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61289    unix_path=`$CYGPATH -u "$windows_path"`
61290    new_path="$unix_path"
61291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61293    new_path="$unix_path"
61294  fi
61295
61296  if test "x$path" != "x$new_path"; then
61297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61300  fi
61301
61302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61304
61305    else
61306      # We're on a unix platform. Hooray! :)
61307      path="$POTENTIAL_FREETYPE_LIB_PATH"
61308      has_space=`$ECHO "$path" | $GREP " "`
61309      if test "x$has_space" != x; then
61310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61311$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61313      fi
61314
61315      # Use eval to expand a potential ~
61316      eval path="$path"
61317      if test ! -f "$path" && test ! -d "$path"; then
61318        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61319      fi
61320
61321      if test -d "$path"; then
61322        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61323      else
61324        dir="`$DIRNAME "$path"`"
61325        base="`$BASENAME "$path"`"
61326        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61327      fi
61328    fi
61329  fi
61330
61331
61332    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61334$as_echo_n "checking for freetype includes... " >&6; }
61335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61336$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61337    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61339$as_echo_n "checking for freetype libraries... " >&6; }
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61341$as_echo "$FREETYPE_LIB_PATH" >&6; }
61342  fi
61343
61344          fi
61345
61346          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61347            if test "x$FOUND_FREETYPE" != xyes; then
61348              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61349              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61350
61351  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61352  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61353  METHOD="well-known location"
61354
61355  # Let's start with an optimistic view of the world :-)
61356  FOUND_FREETYPE=yes
61357
61358  # First look for the canonical freetype main include file ft2build.h.
61359  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61360    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61361    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61362    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61363      # Fail.
61364      FOUND_FREETYPE=no
61365    fi
61366  fi
61367
61368  if test "x$FOUND_FREETYPE" = xyes; then
61369    # Include file found, let's continue the sanity check.
61370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61371$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61372
61373    # Reset to default value
61374    FREETYPE_BASE_NAME=freetype
61375    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61376    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61377      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61378          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61379        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61380        # for the .6 version explicitly.
61381        FREETYPE_BASE_NAME=freetype.6
61382        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61383        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61384$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61385      else
61386        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61387$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61388        FOUND_FREETYPE=no
61389      fi
61390    else
61391      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61392        # On Windows, we will need both .lib and .dll file.
61393        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61394          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61395$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61396          FOUND_FREETYPE=no
61397        fi
61398      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61399          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61400        # Found lib in isa dir, use that instead.
61401        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61402        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61403$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61404      fi
61405    fi
61406  fi
61407
61408  if test "x$FOUND_FREETYPE" = xyes; then
61409
61410  # Only process if variable expands to non-empty
61411
61412  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61414
61415  # Input might be given as Windows format, start by converting to
61416  # unix format.
61417  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61418  new_path=`$CYGPATH -u "$path"`
61419
61420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61423  # "foo.exe" is OK but "foo" is an error.
61424  #
61425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61426  # It is also a way to make sure we got the proper file name for the real test later on.
61427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61428  if test "x$test_shortpath" = x; then
61429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61431    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61432  fi
61433
61434  # Call helper function which possibly converts this using DOS-style short mode.
61435  # If so, the updated path is stored in $new_path.
61436
61437  input_path="$new_path"
61438  # Check if we need to convert this using DOS-style short mode. If the path
61439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61440  # take no chances and rewrite it.
61441  # Note: m4 eats our [], so we need to use [ and ] instead.
61442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61443  if test "x$has_forbidden_chars" != x; then
61444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61448      # Going to short mode and back again did indeed matter. Since short mode is
61449      # case insensitive, let's make it lowercase to improve readability.
61450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61451      # Now convert it back to Unix-style (cygpath)
61452      input_path=`$CYGPATH -u "$shortmode_path"`
61453      new_path="$input_path"
61454    fi
61455  fi
61456
61457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61458  if test "x$test_cygdrive_prefix" = x; then
61459    # As a simple fix, exclude /usr/bin since it's not a real path.
61460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61462      # a path prefixed by /cygdrive for fixpath to work.
61463      new_path="$CYGWIN_ROOT_PATH$input_path"
61464    fi
61465  fi
61466
61467
61468  if test "x$path" != "x$new_path"; then
61469    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61471$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61472  fi
61473
61474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61475
61476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61477  has_colon=`$ECHO $path | $GREP ^.:`
61478  new_path="$path"
61479  if test "x$has_colon" = x; then
61480    # Not in mixed or Windows style, start by that.
61481    new_path=`cmd //c echo $path`
61482  fi
61483
61484
61485  input_path="$new_path"
61486  # Check if we need to convert this using DOS-style short mode. If the path
61487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61488  # take no chances and rewrite it.
61489  # Note: m4 eats our [], so we need to use [ and ] instead.
61490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61491  if test "x$has_forbidden_chars" != x; then
61492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61494  fi
61495
61496
61497  windows_path="$new_path"
61498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61499    unix_path=`$CYGPATH -u "$windows_path"`
61500    new_path="$unix_path"
61501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61503    new_path="$unix_path"
61504  fi
61505
61506  if test "x$path" != "x$new_path"; then
61507    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61510  fi
61511
61512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61514
61515    else
61516      # We're on a unix platform. Hooray! :)
61517      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61518      has_space=`$ECHO "$path" | $GREP " "`
61519      if test "x$has_space" != x; then
61520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61521$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61523      fi
61524
61525      # Use eval to expand a potential ~
61526      eval path="$path"
61527      if test ! -f "$path" && test ! -d "$path"; then
61528        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61529      fi
61530
61531      if test -d "$path"; then
61532        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61533      else
61534        dir="`$DIRNAME "$path"`"
61535        base="`$BASENAME "$path"`"
61536        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61537      fi
61538    fi
61539  fi
61540
61541
61542  # Only process if variable expands to non-empty
61543
61544  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61546
61547  # Input might be given as Windows format, start by converting to
61548  # unix format.
61549  path="$POTENTIAL_FREETYPE_LIB_PATH"
61550  new_path=`$CYGPATH -u "$path"`
61551
61552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61555  # "foo.exe" is OK but "foo" is an error.
61556  #
61557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61558  # It is also a way to make sure we got the proper file name for the real test later on.
61559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61560  if test "x$test_shortpath" = x; then
61561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61563    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61564  fi
61565
61566  # Call helper function which possibly converts this using DOS-style short mode.
61567  # If so, the updated path is stored in $new_path.
61568
61569  input_path="$new_path"
61570  # Check if we need to convert this using DOS-style short mode. If the path
61571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61572  # take no chances and rewrite it.
61573  # Note: m4 eats our [], so we need to use [ and ] instead.
61574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61575  if test "x$has_forbidden_chars" != x; then
61576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61580      # Going to short mode and back again did indeed matter. Since short mode is
61581      # case insensitive, let's make it lowercase to improve readability.
61582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61583      # Now convert it back to Unix-style (cygpath)
61584      input_path=`$CYGPATH -u "$shortmode_path"`
61585      new_path="$input_path"
61586    fi
61587  fi
61588
61589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61590  if test "x$test_cygdrive_prefix" = x; then
61591    # As a simple fix, exclude /usr/bin since it's not a real path.
61592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61594      # a path prefixed by /cygdrive for fixpath to work.
61595      new_path="$CYGWIN_ROOT_PATH$input_path"
61596    fi
61597  fi
61598
61599
61600  if test "x$path" != "x$new_path"; then
61601    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61604  fi
61605
61606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61607
61608  path="$POTENTIAL_FREETYPE_LIB_PATH"
61609  has_colon=`$ECHO $path | $GREP ^.:`
61610  new_path="$path"
61611  if test "x$has_colon" = x; then
61612    # Not in mixed or Windows style, start by that.
61613    new_path=`cmd //c echo $path`
61614  fi
61615
61616
61617  input_path="$new_path"
61618  # Check if we need to convert this using DOS-style short mode. If the path
61619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61620  # take no chances and rewrite it.
61621  # Note: m4 eats our [], so we need to use [ and ] instead.
61622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61623  if test "x$has_forbidden_chars" != x; then
61624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61626  fi
61627
61628
61629  windows_path="$new_path"
61630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61631    unix_path=`$CYGPATH -u "$windows_path"`
61632    new_path="$unix_path"
61633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61635    new_path="$unix_path"
61636  fi
61637
61638  if test "x$path" != "x$new_path"; then
61639    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61642  fi
61643
61644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61646
61647    else
61648      # We're on a unix platform. Hooray! :)
61649      path="$POTENTIAL_FREETYPE_LIB_PATH"
61650      has_space=`$ECHO "$path" | $GREP " "`
61651      if test "x$has_space" != x; then
61652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61655      fi
61656
61657      # Use eval to expand a potential ~
61658      eval path="$path"
61659      if test ! -f "$path" && test ! -d "$path"; then
61660        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61661      fi
61662
61663      if test -d "$path"; then
61664        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61665      else
61666        dir="`$DIRNAME "$path"`"
61667        base="`$BASENAME "$path"`"
61668        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61669      fi
61670    fi
61671  fi
61672
61673
61674    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61676$as_echo_n "checking for freetype includes... " >&6; }
61677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61678$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61679    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61681$as_echo_n "checking for freetype libraries... " >&6; }
61682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61683$as_echo "$FREETYPE_LIB_PATH" >&6; }
61684  fi
61685
61686            fi
61687          fi
61688
61689          if test "x$FOUND_FREETYPE" != xyes; then
61690            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61691
61692  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61693  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61694  METHOD="well-known location"
61695
61696  # Let's start with an optimistic view of the world :-)
61697  FOUND_FREETYPE=yes
61698
61699  # First look for the canonical freetype main include file ft2build.h.
61700  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61701    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61702    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61703    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61704      # Fail.
61705      FOUND_FREETYPE=no
61706    fi
61707  fi
61708
61709  if test "x$FOUND_FREETYPE" = xyes; then
61710    # Include file found, let's continue the sanity check.
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61712$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61713
61714    # Reset to default value
61715    FREETYPE_BASE_NAME=freetype
61716    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61717    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61718      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61719          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61720        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61721        # for the .6 version explicitly.
61722        FREETYPE_BASE_NAME=freetype.6
61723        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61724        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61725$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61726      else
61727        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61728$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61729        FOUND_FREETYPE=no
61730      fi
61731    else
61732      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61733        # On Windows, we will need both .lib and .dll file.
61734        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61735          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61737          FOUND_FREETYPE=no
61738        fi
61739      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61740          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61741        # Found lib in isa dir, use that instead.
61742        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61743        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61744$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61745      fi
61746    fi
61747  fi
61748
61749  if test "x$FOUND_FREETYPE" = xyes; then
61750
61751  # Only process if variable expands to non-empty
61752
61753  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61755
61756  # Input might be given as Windows format, start by converting to
61757  # unix format.
61758  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61759  new_path=`$CYGPATH -u "$path"`
61760
61761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61764  # "foo.exe" is OK but "foo" is an error.
61765  #
61766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61767  # It is also a way to make sure we got the proper file name for the real test later on.
61768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61769  if test "x$test_shortpath" = x; then
61770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61772    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61773  fi
61774
61775  # Call helper function which possibly converts this using DOS-style short mode.
61776  # If so, the updated path is stored in $new_path.
61777
61778  input_path="$new_path"
61779  # Check if we need to convert this using DOS-style short mode. If the path
61780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61781  # take no chances and rewrite it.
61782  # Note: m4 eats our [], so we need to use [ and ] instead.
61783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61784  if test "x$has_forbidden_chars" != x; then
61785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61789      # Going to short mode and back again did indeed matter. Since short mode is
61790      # case insensitive, let's make it lowercase to improve readability.
61791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61792      # Now convert it back to Unix-style (cygpath)
61793      input_path=`$CYGPATH -u "$shortmode_path"`
61794      new_path="$input_path"
61795    fi
61796  fi
61797
61798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61799  if test "x$test_cygdrive_prefix" = x; then
61800    # As a simple fix, exclude /usr/bin since it's not a real path.
61801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61803      # a path prefixed by /cygdrive for fixpath to work.
61804      new_path="$CYGWIN_ROOT_PATH$input_path"
61805    fi
61806  fi
61807
61808
61809  if test "x$path" != "x$new_path"; then
61810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61813  fi
61814
61815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61816
61817  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61818  has_colon=`$ECHO $path | $GREP ^.:`
61819  new_path="$path"
61820  if test "x$has_colon" = x; then
61821    # Not in mixed or Windows style, start by that.
61822    new_path=`cmd //c echo $path`
61823  fi
61824
61825
61826  input_path="$new_path"
61827  # Check if we need to convert this using DOS-style short mode. If the path
61828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61829  # take no chances and rewrite it.
61830  # Note: m4 eats our [], so we need to use [ and ] instead.
61831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61832  if test "x$has_forbidden_chars" != x; then
61833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61835  fi
61836
61837
61838  windows_path="$new_path"
61839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61840    unix_path=`$CYGPATH -u "$windows_path"`
61841    new_path="$unix_path"
61842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61844    new_path="$unix_path"
61845  fi
61846
61847  if test "x$path" != "x$new_path"; then
61848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61851  fi
61852
61853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61855
61856    else
61857      # We're on a unix platform. Hooray! :)
61858      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61859      has_space=`$ECHO "$path" | $GREP " "`
61860      if test "x$has_space" != x; then
61861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61864      fi
61865
61866      # Use eval to expand a potential ~
61867      eval path="$path"
61868      if test ! -f "$path" && test ! -d "$path"; then
61869        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61870      fi
61871
61872      if test -d "$path"; then
61873        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61874      else
61875        dir="`$DIRNAME "$path"`"
61876        base="`$BASENAME "$path"`"
61877        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61878      fi
61879    fi
61880  fi
61881
61882
61883  # Only process if variable expands to non-empty
61884
61885  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61887
61888  # Input might be given as Windows format, start by converting to
61889  # unix format.
61890  path="$POTENTIAL_FREETYPE_LIB_PATH"
61891  new_path=`$CYGPATH -u "$path"`
61892
61893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61896  # "foo.exe" is OK but "foo" is an error.
61897  #
61898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61899  # It is also a way to make sure we got the proper file name for the real test later on.
61900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61901  if test "x$test_shortpath" = x; then
61902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61904    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61905  fi
61906
61907  # Call helper function which possibly converts this using DOS-style short mode.
61908  # If so, the updated path is stored in $new_path.
61909
61910  input_path="$new_path"
61911  # Check if we need to convert this using DOS-style short mode. If the path
61912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61913  # take no chances and rewrite it.
61914  # Note: m4 eats our [], so we need to use [ and ] instead.
61915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61916  if test "x$has_forbidden_chars" != x; then
61917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61921      # Going to short mode and back again did indeed matter. Since short mode is
61922      # case insensitive, let's make it lowercase to improve readability.
61923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61924      # Now convert it back to Unix-style (cygpath)
61925      input_path=`$CYGPATH -u "$shortmode_path"`
61926      new_path="$input_path"
61927    fi
61928  fi
61929
61930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61931  if test "x$test_cygdrive_prefix" = x; then
61932    # As a simple fix, exclude /usr/bin since it's not a real path.
61933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61935      # a path prefixed by /cygdrive for fixpath to work.
61936      new_path="$CYGWIN_ROOT_PATH$input_path"
61937    fi
61938  fi
61939
61940
61941  if test "x$path" != "x$new_path"; then
61942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61945  fi
61946
61947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61948
61949  path="$POTENTIAL_FREETYPE_LIB_PATH"
61950  has_colon=`$ECHO $path | $GREP ^.:`
61951  new_path="$path"
61952  if test "x$has_colon" = x; then
61953    # Not in mixed or Windows style, start by that.
61954    new_path=`cmd //c echo $path`
61955  fi
61956
61957
61958  input_path="$new_path"
61959  # Check if we need to convert this using DOS-style short mode. If the path
61960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61961  # take no chances and rewrite it.
61962  # Note: m4 eats our [], so we need to use [ and ] instead.
61963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61964  if test "x$has_forbidden_chars" != x; then
61965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61967  fi
61968
61969
61970  windows_path="$new_path"
61971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61972    unix_path=`$CYGPATH -u "$windows_path"`
61973    new_path="$unix_path"
61974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61976    new_path="$unix_path"
61977  fi
61978
61979  if test "x$path" != "x$new_path"; then
61980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61983  fi
61984
61985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61987
61988    else
61989      # We're on a unix platform. Hooray! :)
61990      path="$POTENTIAL_FREETYPE_LIB_PATH"
61991      has_space=`$ECHO "$path" | $GREP " "`
61992      if test "x$has_space" != x; then
61993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61996      fi
61997
61998      # Use eval to expand a potential ~
61999      eval path="$path"
62000      if test ! -f "$path" && test ! -d "$path"; then
62001        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62002      fi
62003
62004      if test -d "$path"; then
62005        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62006      else
62007        dir="`$DIRNAME "$path"`"
62008        base="`$BASENAME "$path"`"
62009        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62010      fi
62011    fi
62012  fi
62013
62014
62015    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62017$as_echo_n "checking for freetype includes... " >&6; }
62018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62019$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62020    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62022$as_echo_n "checking for freetype libraries... " >&6; }
62023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62024$as_echo "$FREETYPE_LIB_PATH" >&6; }
62025  fi
62026
62027          fi
62028
62029          if test "x$FOUND_FREETYPE" != xyes; then
62030            FREETYPE_BASE_DIR="$SYSROOT/usr"
62031            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62032
62033  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62034  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62035  METHOD="well-known location"
62036
62037  # Let's start with an optimistic view of the world :-)
62038  FOUND_FREETYPE=yes
62039
62040  # First look for the canonical freetype main include file ft2build.h.
62041  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62042    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62043    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62044    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62045      # Fail.
62046      FOUND_FREETYPE=no
62047    fi
62048  fi
62049
62050  if test "x$FOUND_FREETYPE" = xyes; then
62051    # Include file found, let's continue the sanity check.
62052    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62053$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62054
62055    # Reset to default value
62056    FREETYPE_BASE_NAME=freetype
62057    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62058    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62059      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62060          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62061        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62062        # for the .6 version explicitly.
62063        FREETYPE_BASE_NAME=freetype.6
62064        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62065        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62066$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62067      else
62068        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62069$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62070        FOUND_FREETYPE=no
62071      fi
62072    else
62073      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62074        # On Windows, we will need both .lib and .dll file.
62075        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62076          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62078          FOUND_FREETYPE=no
62079        fi
62080      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62081          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62082        # Found lib in isa dir, use that instead.
62083        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62084        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62085$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62086      fi
62087    fi
62088  fi
62089
62090  if test "x$FOUND_FREETYPE" = xyes; then
62091
62092  # Only process if variable expands to non-empty
62093
62094  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62096
62097  # Input might be given as Windows format, start by converting to
62098  # unix format.
62099  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62100  new_path=`$CYGPATH -u "$path"`
62101
62102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62105  # "foo.exe" is OK but "foo" is an error.
62106  #
62107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62108  # It is also a way to make sure we got the proper file name for the real test later on.
62109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62110  if test "x$test_shortpath" = x; then
62111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62113    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62114  fi
62115
62116  # Call helper function which possibly converts this using DOS-style short mode.
62117  # If so, the updated path is stored in $new_path.
62118
62119  input_path="$new_path"
62120  # Check if we need to convert this using DOS-style short mode. If the path
62121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62122  # take no chances and rewrite it.
62123  # Note: m4 eats our [], so we need to use [ and ] instead.
62124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62125  if test "x$has_forbidden_chars" != x; then
62126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62130      # Going to short mode and back again did indeed matter. Since short mode is
62131      # case insensitive, let's make it lowercase to improve readability.
62132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62133      # Now convert it back to Unix-style (cygpath)
62134      input_path=`$CYGPATH -u "$shortmode_path"`
62135      new_path="$input_path"
62136    fi
62137  fi
62138
62139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62140  if test "x$test_cygdrive_prefix" = x; then
62141    # As a simple fix, exclude /usr/bin since it's not a real path.
62142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62144      # a path prefixed by /cygdrive for fixpath to work.
62145      new_path="$CYGWIN_ROOT_PATH$input_path"
62146    fi
62147  fi
62148
62149
62150  if test "x$path" != "x$new_path"; then
62151    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62154  fi
62155
62156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62157
62158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62159  has_colon=`$ECHO $path | $GREP ^.:`
62160  new_path="$path"
62161  if test "x$has_colon" = x; then
62162    # Not in mixed or Windows style, start by that.
62163    new_path=`cmd //c echo $path`
62164  fi
62165
62166
62167  input_path="$new_path"
62168  # Check if we need to convert this using DOS-style short mode. If the path
62169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62170  # take no chances and rewrite it.
62171  # Note: m4 eats our [], so we need to use [ and ] instead.
62172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62173  if test "x$has_forbidden_chars" != x; then
62174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62176  fi
62177
62178
62179  windows_path="$new_path"
62180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62181    unix_path=`$CYGPATH -u "$windows_path"`
62182    new_path="$unix_path"
62183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62185    new_path="$unix_path"
62186  fi
62187
62188  if test "x$path" != "x$new_path"; then
62189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62192  fi
62193
62194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62196
62197    else
62198      # We're on a unix platform. Hooray! :)
62199      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62200      has_space=`$ECHO "$path" | $GREP " "`
62201      if test "x$has_space" != x; then
62202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62205      fi
62206
62207      # Use eval to expand a potential ~
62208      eval path="$path"
62209      if test ! -f "$path" && test ! -d "$path"; then
62210        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62211      fi
62212
62213      if test -d "$path"; then
62214        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62215      else
62216        dir="`$DIRNAME "$path"`"
62217        base="`$BASENAME "$path"`"
62218        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62219      fi
62220    fi
62221  fi
62222
62223
62224  # Only process if variable expands to non-empty
62225
62226  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62228
62229  # Input might be given as Windows format, start by converting to
62230  # unix format.
62231  path="$POTENTIAL_FREETYPE_LIB_PATH"
62232  new_path=`$CYGPATH -u "$path"`
62233
62234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62237  # "foo.exe" is OK but "foo" is an error.
62238  #
62239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62240  # It is also a way to make sure we got the proper file name for the real test later on.
62241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62242  if test "x$test_shortpath" = x; then
62243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62245    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62246  fi
62247
62248  # Call helper function which possibly converts this using DOS-style short mode.
62249  # If so, the updated path is stored in $new_path.
62250
62251  input_path="$new_path"
62252  # Check if we need to convert this using DOS-style short mode. If the path
62253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62254  # take no chances and rewrite it.
62255  # Note: m4 eats our [], so we need to use [ and ] instead.
62256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62257  if test "x$has_forbidden_chars" != x; then
62258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62262      # Going to short mode and back again did indeed matter. Since short mode is
62263      # case insensitive, let's make it lowercase to improve readability.
62264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62265      # Now convert it back to Unix-style (cygpath)
62266      input_path=`$CYGPATH -u "$shortmode_path"`
62267      new_path="$input_path"
62268    fi
62269  fi
62270
62271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62272  if test "x$test_cygdrive_prefix" = x; then
62273    # As a simple fix, exclude /usr/bin since it's not a real path.
62274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62276      # a path prefixed by /cygdrive for fixpath to work.
62277      new_path="$CYGWIN_ROOT_PATH$input_path"
62278    fi
62279  fi
62280
62281
62282  if test "x$path" != "x$new_path"; then
62283    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62286  fi
62287
62288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62289
62290  path="$POTENTIAL_FREETYPE_LIB_PATH"
62291  has_colon=`$ECHO $path | $GREP ^.:`
62292  new_path="$path"
62293  if test "x$has_colon" = x; then
62294    # Not in mixed or Windows style, start by that.
62295    new_path=`cmd //c echo $path`
62296  fi
62297
62298
62299  input_path="$new_path"
62300  # Check if we need to convert this using DOS-style short mode. If the path
62301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62302  # take no chances and rewrite it.
62303  # Note: m4 eats our [], so we need to use [ and ] instead.
62304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62305  if test "x$has_forbidden_chars" != x; then
62306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62308  fi
62309
62310
62311  windows_path="$new_path"
62312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62313    unix_path=`$CYGPATH -u "$windows_path"`
62314    new_path="$unix_path"
62315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62317    new_path="$unix_path"
62318  fi
62319
62320  if test "x$path" != "x$new_path"; then
62321    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62324  fi
62325
62326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62328
62329    else
62330      # We're on a unix platform. Hooray! :)
62331      path="$POTENTIAL_FREETYPE_LIB_PATH"
62332      has_space=`$ECHO "$path" | $GREP " "`
62333      if test "x$has_space" != x; then
62334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62337      fi
62338
62339      # Use eval to expand a potential ~
62340      eval path="$path"
62341      if test ! -f "$path" && test ! -d "$path"; then
62342        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62343      fi
62344
62345      if test -d "$path"; then
62346        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62347      else
62348        dir="`$DIRNAME "$path"`"
62349        base="`$BASENAME "$path"`"
62350        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62351      fi
62352    fi
62353  fi
62354
62355
62356    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62358$as_echo_n "checking for freetype includes... " >&6; }
62359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62360$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62361    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62363$as_echo_n "checking for freetype libraries... " >&6; }
62364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62365$as_echo "$FREETYPE_LIB_PATH" >&6; }
62366  fi
62367
62368            else
62369
62370  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62371  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62372  METHOD="well-known location"
62373
62374  # Let's start with an optimistic view of the world :-)
62375  FOUND_FREETYPE=yes
62376
62377  # First look for the canonical freetype main include file ft2build.h.
62378  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62379    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62380    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62381    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62382      # Fail.
62383      FOUND_FREETYPE=no
62384    fi
62385  fi
62386
62387  if test "x$FOUND_FREETYPE" = xyes; then
62388    # Include file found, let's continue the sanity check.
62389    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62390$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62391
62392    # Reset to default value
62393    FREETYPE_BASE_NAME=freetype
62394    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62395    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62396      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62397          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62398        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62399        # for the .6 version explicitly.
62400        FREETYPE_BASE_NAME=freetype.6
62401        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62402        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62403$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62404      else
62405        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62406$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62407        FOUND_FREETYPE=no
62408      fi
62409    else
62410      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62411        # On Windows, we will need both .lib and .dll file.
62412        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62413          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62414$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62415          FOUND_FREETYPE=no
62416        fi
62417      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62418          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62419        # Found lib in isa dir, use that instead.
62420        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62421        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62422$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62423      fi
62424    fi
62425  fi
62426
62427  if test "x$FOUND_FREETYPE" = xyes; then
62428
62429  # Only process if variable expands to non-empty
62430
62431  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62433
62434  # Input might be given as Windows format, start by converting to
62435  # unix format.
62436  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62437  new_path=`$CYGPATH -u "$path"`
62438
62439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62442  # "foo.exe" is OK but "foo" is an error.
62443  #
62444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62445  # It is also a way to make sure we got the proper file name for the real test later on.
62446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62447  if test "x$test_shortpath" = x; then
62448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62449$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62450    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62451  fi
62452
62453  # Call helper function which possibly converts this using DOS-style short mode.
62454  # If so, the updated path is stored in $new_path.
62455
62456  input_path="$new_path"
62457  # Check if we need to convert this using DOS-style short mode. If the path
62458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62459  # take no chances and rewrite it.
62460  # Note: m4 eats our [], so we need to use [ and ] instead.
62461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62462  if test "x$has_forbidden_chars" != x; then
62463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62467      # Going to short mode and back again did indeed matter. Since short mode is
62468      # case insensitive, let's make it lowercase to improve readability.
62469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62470      # Now convert it back to Unix-style (cygpath)
62471      input_path=`$CYGPATH -u "$shortmode_path"`
62472      new_path="$input_path"
62473    fi
62474  fi
62475
62476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62477  if test "x$test_cygdrive_prefix" = x; then
62478    # As a simple fix, exclude /usr/bin since it's not a real path.
62479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62481      # a path prefixed by /cygdrive for fixpath to work.
62482      new_path="$CYGWIN_ROOT_PATH$input_path"
62483    fi
62484  fi
62485
62486
62487  if test "x$path" != "x$new_path"; then
62488    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62490$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62491  fi
62492
62493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62494
62495  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62496  has_colon=`$ECHO $path | $GREP ^.:`
62497  new_path="$path"
62498  if test "x$has_colon" = x; then
62499    # Not in mixed or Windows style, start by that.
62500    new_path=`cmd //c echo $path`
62501  fi
62502
62503
62504  input_path="$new_path"
62505  # Check if we need to convert this using DOS-style short mode. If the path
62506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62507  # take no chances and rewrite it.
62508  # Note: m4 eats our [], so we need to use [ and ] instead.
62509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62510  if test "x$has_forbidden_chars" != x; then
62511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62513  fi
62514
62515
62516  windows_path="$new_path"
62517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62518    unix_path=`$CYGPATH -u "$windows_path"`
62519    new_path="$unix_path"
62520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62522    new_path="$unix_path"
62523  fi
62524
62525  if test "x$path" != "x$new_path"; then
62526    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62529  fi
62530
62531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62533
62534    else
62535      # We're on a unix platform. Hooray! :)
62536      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62537      has_space=`$ECHO "$path" | $GREP " "`
62538      if test "x$has_space" != x; then
62539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62540$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62542      fi
62543
62544      # Use eval to expand a potential ~
62545      eval path="$path"
62546      if test ! -f "$path" && test ! -d "$path"; then
62547        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62548      fi
62549
62550      if test -d "$path"; then
62551        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62552      else
62553        dir="`$DIRNAME "$path"`"
62554        base="`$BASENAME "$path"`"
62555        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62556      fi
62557    fi
62558  fi
62559
62560
62561  # Only process if variable expands to non-empty
62562
62563  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62565
62566  # Input might be given as Windows format, start by converting to
62567  # unix format.
62568  path="$POTENTIAL_FREETYPE_LIB_PATH"
62569  new_path=`$CYGPATH -u "$path"`
62570
62571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62574  # "foo.exe" is OK but "foo" is an error.
62575  #
62576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62577  # It is also a way to make sure we got the proper file name for the real test later on.
62578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62579  if test "x$test_shortpath" = x; then
62580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62581$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62582    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62583  fi
62584
62585  # Call helper function which possibly converts this using DOS-style short mode.
62586  # If so, the updated path is stored in $new_path.
62587
62588  input_path="$new_path"
62589  # Check if we need to convert this using DOS-style short mode. If the path
62590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62591  # take no chances and rewrite it.
62592  # Note: m4 eats our [], so we need to use [ and ] instead.
62593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62594  if test "x$has_forbidden_chars" != x; then
62595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62599      # Going to short mode and back again did indeed matter. Since short mode is
62600      # case insensitive, let's make it lowercase to improve readability.
62601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62602      # Now convert it back to Unix-style (cygpath)
62603      input_path=`$CYGPATH -u "$shortmode_path"`
62604      new_path="$input_path"
62605    fi
62606  fi
62607
62608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62609  if test "x$test_cygdrive_prefix" = x; then
62610    # As a simple fix, exclude /usr/bin since it's not a real path.
62611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62613      # a path prefixed by /cygdrive for fixpath to work.
62614      new_path="$CYGWIN_ROOT_PATH$input_path"
62615    fi
62616  fi
62617
62618
62619  if test "x$path" != "x$new_path"; then
62620    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62623  fi
62624
62625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62626
62627  path="$POTENTIAL_FREETYPE_LIB_PATH"
62628  has_colon=`$ECHO $path | $GREP ^.:`
62629  new_path="$path"
62630  if test "x$has_colon" = x; then
62631    # Not in mixed or Windows style, start by that.
62632    new_path=`cmd //c echo $path`
62633  fi
62634
62635
62636  input_path="$new_path"
62637  # Check if we need to convert this using DOS-style short mode. If the path
62638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62639  # take no chances and rewrite it.
62640  # Note: m4 eats our [], so we need to use [ and ] instead.
62641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62642  if test "x$has_forbidden_chars" != x; then
62643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62645  fi
62646
62647
62648  windows_path="$new_path"
62649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62650    unix_path=`$CYGPATH -u "$windows_path"`
62651    new_path="$unix_path"
62652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62654    new_path="$unix_path"
62655  fi
62656
62657  if test "x$path" != "x$new_path"; then
62658    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62661  fi
62662
62663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62665
62666    else
62667      # We're on a unix platform. Hooray! :)
62668      path="$POTENTIAL_FREETYPE_LIB_PATH"
62669      has_space=`$ECHO "$path" | $GREP " "`
62670      if test "x$has_space" != x; then
62671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62672$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62674      fi
62675
62676      # Use eval to expand a potential ~
62677      eval path="$path"
62678      if test ! -f "$path" && test ! -d "$path"; then
62679        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62680      fi
62681
62682      if test -d "$path"; then
62683        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62684      else
62685        dir="`$DIRNAME "$path"`"
62686        base="`$BASENAME "$path"`"
62687        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62688      fi
62689    fi
62690  fi
62691
62692
62693    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62695$as_echo_n "checking for freetype includes... " >&6; }
62696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62697$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62698    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62700$as_echo_n "checking for freetype libraries... " >&6; }
62701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62702$as_echo "$FREETYPE_LIB_PATH" >&6; }
62703  fi
62704
62705              if test "x$FOUND_FREETYPE" != xyes; then
62706
62707  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62708  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62709  METHOD="well-known location"
62710
62711  # Let's start with an optimistic view of the world :-)
62712  FOUND_FREETYPE=yes
62713
62714  # First look for the canonical freetype main include file ft2build.h.
62715  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62716    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62717    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62718    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62719      # Fail.
62720      FOUND_FREETYPE=no
62721    fi
62722  fi
62723
62724  if test "x$FOUND_FREETYPE" = xyes; then
62725    # Include file found, let's continue the sanity check.
62726    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62727$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62728
62729    # Reset to default value
62730    FREETYPE_BASE_NAME=freetype
62731    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62732    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62733      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62734          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62735        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62736        # for the .6 version explicitly.
62737        FREETYPE_BASE_NAME=freetype.6
62738        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62739        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62740$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62741      else
62742        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62743$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62744        FOUND_FREETYPE=no
62745      fi
62746    else
62747      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62748        # On Windows, we will need both .lib and .dll file.
62749        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62750          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62751$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62752          FOUND_FREETYPE=no
62753        fi
62754      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62755          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62756        # Found lib in isa dir, use that instead.
62757        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62758        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62759$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62760      fi
62761    fi
62762  fi
62763
62764  if test "x$FOUND_FREETYPE" = xyes; then
62765
62766  # Only process if variable expands to non-empty
62767
62768  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62770
62771  # Input might be given as Windows format, start by converting to
62772  # unix format.
62773  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62774  new_path=`$CYGPATH -u "$path"`
62775
62776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62779  # "foo.exe" is OK but "foo" is an error.
62780  #
62781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62782  # It is also a way to make sure we got the proper file name for the real test later on.
62783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62784  if test "x$test_shortpath" = x; then
62785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62787    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62788  fi
62789
62790  # Call helper function which possibly converts this using DOS-style short mode.
62791  # If so, the updated path is stored in $new_path.
62792
62793  input_path="$new_path"
62794  # Check if we need to convert this using DOS-style short mode. If the path
62795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62796  # take no chances and rewrite it.
62797  # Note: m4 eats our [], so we need to use [ and ] instead.
62798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62799  if test "x$has_forbidden_chars" != x; then
62800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62804      # Going to short mode and back again did indeed matter. Since short mode is
62805      # case insensitive, let's make it lowercase to improve readability.
62806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62807      # Now convert it back to Unix-style (cygpath)
62808      input_path=`$CYGPATH -u "$shortmode_path"`
62809      new_path="$input_path"
62810    fi
62811  fi
62812
62813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62814  if test "x$test_cygdrive_prefix" = x; then
62815    # As a simple fix, exclude /usr/bin since it's not a real path.
62816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62818      # a path prefixed by /cygdrive for fixpath to work.
62819      new_path="$CYGWIN_ROOT_PATH$input_path"
62820    fi
62821  fi
62822
62823
62824  if test "x$path" != "x$new_path"; then
62825    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62828  fi
62829
62830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62831
62832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62833  has_colon=`$ECHO $path | $GREP ^.:`
62834  new_path="$path"
62835  if test "x$has_colon" = x; then
62836    # Not in mixed or Windows style, start by that.
62837    new_path=`cmd //c echo $path`
62838  fi
62839
62840
62841  input_path="$new_path"
62842  # Check if we need to convert this using DOS-style short mode. If the path
62843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62844  # take no chances and rewrite it.
62845  # Note: m4 eats our [], so we need to use [ and ] instead.
62846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62847  if test "x$has_forbidden_chars" != x; then
62848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62850  fi
62851
62852
62853  windows_path="$new_path"
62854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62855    unix_path=`$CYGPATH -u "$windows_path"`
62856    new_path="$unix_path"
62857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62859    new_path="$unix_path"
62860  fi
62861
62862  if test "x$path" != "x$new_path"; then
62863    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62866  fi
62867
62868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62870
62871    else
62872      # We're on a unix platform. Hooray! :)
62873      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62874      has_space=`$ECHO "$path" | $GREP " "`
62875      if test "x$has_space" != x; then
62876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62879      fi
62880
62881      # Use eval to expand a potential ~
62882      eval path="$path"
62883      if test ! -f "$path" && test ! -d "$path"; then
62884        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62885      fi
62886
62887      if test -d "$path"; then
62888        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62889      else
62890        dir="`$DIRNAME "$path"`"
62891        base="`$BASENAME "$path"`"
62892        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62893      fi
62894    fi
62895  fi
62896
62897
62898  # Only process if variable expands to non-empty
62899
62900  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62902
62903  # Input might be given as Windows format, start by converting to
62904  # unix format.
62905  path="$POTENTIAL_FREETYPE_LIB_PATH"
62906  new_path=`$CYGPATH -u "$path"`
62907
62908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62911  # "foo.exe" is OK but "foo" is an error.
62912  #
62913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62914  # It is also a way to make sure we got the proper file name for the real test later on.
62915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62916  if test "x$test_shortpath" = x; then
62917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62918$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62919    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62920  fi
62921
62922  # Call helper function which possibly converts this using DOS-style short mode.
62923  # If so, the updated path is stored in $new_path.
62924
62925  input_path="$new_path"
62926  # Check if we need to convert this using DOS-style short mode. If the path
62927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62928  # take no chances and rewrite it.
62929  # Note: m4 eats our [], so we need to use [ and ] instead.
62930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62931  if test "x$has_forbidden_chars" != x; then
62932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62936      # Going to short mode and back again did indeed matter. Since short mode is
62937      # case insensitive, let's make it lowercase to improve readability.
62938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62939      # Now convert it back to Unix-style (cygpath)
62940      input_path=`$CYGPATH -u "$shortmode_path"`
62941      new_path="$input_path"
62942    fi
62943  fi
62944
62945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62946  if test "x$test_cygdrive_prefix" = x; then
62947    # As a simple fix, exclude /usr/bin since it's not a real path.
62948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62950      # a path prefixed by /cygdrive for fixpath to work.
62951      new_path="$CYGWIN_ROOT_PATH$input_path"
62952    fi
62953  fi
62954
62955
62956  if test "x$path" != "x$new_path"; then
62957    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62960  fi
62961
62962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62963
62964  path="$POTENTIAL_FREETYPE_LIB_PATH"
62965  has_colon=`$ECHO $path | $GREP ^.:`
62966  new_path="$path"
62967  if test "x$has_colon" = x; then
62968    # Not in mixed or Windows style, start by that.
62969    new_path=`cmd //c echo $path`
62970  fi
62971
62972
62973  input_path="$new_path"
62974  # Check if we need to convert this using DOS-style short mode. If the path
62975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62976  # take no chances and rewrite it.
62977  # Note: m4 eats our [], so we need to use [ and ] instead.
62978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62979  if test "x$has_forbidden_chars" != x; then
62980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62982  fi
62983
62984
62985  windows_path="$new_path"
62986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62987    unix_path=`$CYGPATH -u "$windows_path"`
62988    new_path="$unix_path"
62989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62991    new_path="$unix_path"
62992  fi
62993
62994  if test "x$path" != "x$new_path"; then
62995    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62998  fi
62999
63000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63002
63003    else
63004      # We're on a unix platform. Hooray! :)
63005      path="$POTENTIAL_FREETYPE_LIB_PATH"
63006      has_space=`$ECHO "$path" | $GREP " "`
63007      if test "x$has_space" != x; then
63008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63011      fi
63012
63013      # Use eval to expand a potential ~
63014      eval path="$path"
63015      if test ! -f "$path" && test ! -d "$path"; then
63016        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63017      fi
63018
63019      if test -d "$path"; then
63020        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63021      else
63022        dir="`$DIRNAME "$path"`"
63023        base="`$BASENAME "$path"`"
63024        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63025      fi
63026    fi
63027  fi
63028
63029
63030    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63032$as_echo_n "checking for freetype includes... " >&6; }
63033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63034$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63035    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63037$as_echo_n "checking for freetype libraries... " >&6; }
63038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63039$as_echo "$FREETYPE_LIB_PATH" >&6; }
63040  fi
63041
63042              fi
63043            fi
63044          fi
63045        fi
63046      fi # end check in well-known locations
63047
63048      if test "x$FOUND_FREETYPE" != xyes; then
63049
63050  # Print a helpful message on how to acquire the necessary build dependency.
63051  # freetype is the help tag: freetype, cups, alsa etc
63052  MISSING_DEPENDENCY=freetype
63053
63054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63055    cygwin_help $MISSING_DEPENDENCY
63056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63057    msys_help $MISSING_DEPENDENCY
63058  else
63059    PKGHANDLER_COMMAND=
63060
63061    case $PKGHANDLER in
63062      apt-get)
63063        apt_help     $MISSING_DEPENDENCY ;;
63064      yum)
63065        yum_help     $MISSING_DEPENDENCY ;;
63066      port)
63067        port_help    $MISSING_DEPENDENCY ;;
63068      pkgutil)
63069        pkgutil_help $MISSING_DEPENDENCY ;;
63070      pkgadd)
63071        pkgadd_help  $MISSING_DEPENDENCY ;;
63072    esac
63073
63074    if test "x$PKGHANDLER_COMMAND" != x; then
63075      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63076    fi
63077  fi
63078
63079        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63080      fi
63081    fi # end user specified settings
63082
63083    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63084    if test "x$FREETYPE_CFLAGS" = x; then
63085
63086  # Only process if variable expands to non-empty
63087
63088  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63090
63091  # Input might be given as Windows format, start by converting to
63092  # unix format.
63093  path="$FREETYPE_INCLUDE_PATH"
63094  new_path=`$CYGPATH -u "$path"`
63095
63096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63099  # "foo.exe" is OK but "foo" is an error.
63100  #
63101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63102  # It is also a way to make sure we got the proper file name for the real test later on.
63103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63104  if test "x$test_shortpath" = x; then
63105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63106$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63107    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63108  fi
63109
63110  # Call helper function which possibly converts this using DOS-style short mode.
63111  # If so, the updated path is stored in $new_path.
63112
63113  input_path="$new_path"
63114  # Check if we need to convert this using DOS-style short mode. If the path
63115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63116  # take no chances and rewrite it.
63117  # Note: m4 eats our [], so we need to use [ and ] instead.
63118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63119  if test "x$has_forbidden_chars" != x; then
63120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63124      # Going to short mode and back again did indeed matter. Since short mode is
63125      # case insensitive, let's make it lowercase to improve readability.
63126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63127      # Now convert it back to Unix-style (cygpath)
63128      input_path=`$CYGPATH -u "$shortmode_path"`
63129      new_path="$input_path"
63130    fi
63131  fi
63132
63133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63134  if test "x$test_cygdrive_prefix" = x; then
63135    # As a simple fix, exclude /usr/bin since it's not a real path.
63136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63138      # a path prefixed by /cygdrive for fixpath to work.
63139      new_path="$CYGWIN_ROOT_PATH$input_path"
63140    fi
63141  fi
63142
63143
63144  if test "x$path" != "x$new_path"; then
63145    FREETYPE_INCLUDE_PATH="$new_path"
63146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63147$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63148  fi
63149
63150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63151
63152  path="$FREETYPE_INCLUDE_PATH"
63153  has_colon=`$ECHO $path | $GREP ^.:`
63154  new_path="$path"
63155  if test "x$has_colon" = x; then
63156    # Not in mixed or Windows style, start by that.
63157    new_path=`cmd //c echo $path`
63158  fi
63159
63160
63161  input_path="$new_path"
63162  # Check if we need to convert this using DOS-style short mode. If the path
63163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63164  # take no chances and rewrite it.
63165  # Note: m4 eats our [], so we need to use [ and ] instead.
63166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63167  if test "x$has_forbidden_chars" != x; then
63168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63170  fi
63171
63172
63173  windows_path="$new_path"
63174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63175    unix_path=`$CYGPATH -u "$windows_path"`
63176    new_path="$unix_path"
63177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63179    new_path="$unix_path"
63180  fi
63181
63182  if test "x$path" != "x$new_path"; then
63183    FREETYPE_INCLUDE_PATH="$new_path"
63184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63185$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63186  fi
63187
63188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63190
63191    else
63192      # We're on a unix platform. Hooray! :)
63193      path="$FREETYPE_INCLUDE_PATH"
63194      has_space=`$ECHO "$path" | $GREP " "`
63195      if test "x$has_space" != x; then
63196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63197$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63199      fi
63200
63201      # Use eval to expand a potential ~
63202      eval path="$path"
63203      if test ! -f "$path" && test ! -d "$path"; then
63204        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63205      fi
63206
63207      if test -d "$path"; then
63208        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63209      else
63210        dir="`$DIRNAME "$path"`"
63211        base="`$BASENAME "$path"`"
63212        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63213      fi
63214    fi
63215  fi
63216
63217      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63218        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63219      else
63220        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63221      fi
63222    fi
63223
63224    if test "x$FREETYPE_LIBS" = x; then
63225
63226  # Only process if variable expands to non-empty
63227
63228  if test "x$FREETYPE_LIB_PATH" != x; then
63229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63230
63231  # Input might be given as Windows format, start by converting to
63232  # unix format.
63233  path="$FREETYPE_LIB_PATH"
63234  new_path=`$CYGPATH -u "$path"`
63235
63236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63239  # "foo.exe" is OK but "foo" is an error.
63240  #
63241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63242  # It is also a way to make sure we got the proper file name for the real test later on.
63243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63244  if test "x$test_shortpath" = x; then
63245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63246$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63247    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63248  fi
63249
63250  # Call helper function which possibly converts this using DOS-style short mode.
63251  # If so, the updated path is stored in $new_path.
63252
63253  input_path="$new_path"
63254  # Check if we need to convert this using DOS-style short mode. If the path
63255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63256  # take no chances and rewrite it.
63257  # Note: m4 eats our [], so we need to use [ and ] instead.
63258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63259  if test "x$has_forbidden_chars" != x; then
63260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63264      # Going to short mode and back again did indeed matter. Since short mode is
63265      # case insensitive, let's make it lowercase to improve readability.
63266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63267      # Now convert it back to Unix-style (cygpath)
63268      input_path=`$CYGPATH -u "$shortmode_path"`
63269      new_path="$input_path"
63270    fi
63271  fi
63272
63273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63274  if test "x$test_cygdrive_prefix" = x; then
63275    # As a simple fix, exclude /usr/bin since it's not a real path.
63276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63278      # a path prefixed by /cygdrive for fixpath to work.
63279      new_path="$CYGWIN_ROOT_PATH$input_path"
63280    fi
63281  fi
63282
63283
63284  if test "x$path" != "x$new_path"; then
63285    FREETYPE_LIB_PATH="$new_path"
63286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63287$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63288  fi
63289
63290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63291
63292  path="$FREETYPE_LIB_PATH"
63293  has_colon=`$ECHO $path | $GREP ^.:`
63294  new_path="$path"
63295  if test "x$has_colon" = x; then
63296    # Not in mixed or Windows style, start by that.
63297    new_path=`cmd //c echo $path`
63298  fi
63299
63300
63301  input_path="$new_path"
63302  # Check if we need to convert this using DOS-style short mode. If the path
63303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63304  # take no chances and rewrite it.
63305  # Note: m4 eats our [], so we need to use [ and ] instead.
63306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63307  if test "x$has_forbidden_chars" != x; then
63308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63310  fi
63311
63312
63313  windows_path="$new_path"
63314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63315    unix_path=`$CYGPATH -u "$windows_path"`
63316    new_path="$unix_path"
63317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63319    new_path="$unix_path"
63320  fi
63321
63322  if test "x$path" != "x$new_path"; then
63323    FREETYPE_LIB_PATH="$new_path"
63324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63325$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63326  fi
63327
63328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63330
63331    else
63332      # We're on a unix platform. Hooray! :)
63333      path="$FREETYPE_LIB_PATH"
63334      has_space=`$ECHO "$path" | $GREP " "`
63335      if test "x$has_space" != x; then
63336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63337$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63339      fi
63340
63341      # Use eval to expand a potential ~
63342      eval path="$path"
63343      if test ! -f "$path" && test ! -d "$path"; then
63344        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63345      fi
63346
63347      if test -d "$path"; then
63348        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63349      else
63350        dir="`$DIRNAME "$path"`"
63351        base="`$BASENAME "$path"`"
63352        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63353      fi
63354    fi
63355  fi
63356
63357      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63358        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63359      else
63360        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63361      fi
63362    fi
63363
63364    # Try to compile it
63365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63366$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63367    ac_ext=cpp
63368ac_cpp='$CXXCPP $CPPFLAGS'
63369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63372
63373    PREV_CXXCFLAGS="$CXXFLAGS"
63374    PREV_LIBS="$LIBS"
63375    PREV_CXX="$CXX"
63376    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63377    LIBS="$LIBS $FREETYPE_LIBS"
63378    CXX="$FIXPATH $CXX"
63379    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63380/* end confdefs.h.  */
63381
63382          #include<ft2build.h>
63383          #include FT_FREETYPE_H
63384          int main () {
63385            FT_Init_FreeType(NULL);
63386            return 0;
63387          }
63388
63389_ACEOF
63390if ac_fn_cxx_try_link "$LINENO"; then :
63391
63392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63393$as_echo "yes" >&6; }
63394
63395else
63396
63397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63398$as_echo "no" >&6; }
63399          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63400$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63401          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63402$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63403
63404
63405  # Print a helpful message on how to acquire the necessary build dependency.
63406  # freetype is the help tag: freetype, cups, alsa etc
63407  MISSING_DEPENDENCY=freetype
63408
63409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63410    cygwin_help $MISSING_DEPENDENCY
63411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63412    msys_help $MISSING_DEPENDENCY
63413  else
63414    PKGHANDLER_COMMAND=
63415
63416    case $PKGHANDLER in
63417      apt-get)
63418        apt_help     $MISSING_DEPENDENCY ;;
63419      yum)
63420        yum_help     $MISSING_DEPENDENCY ;;
63421      port)
63422        port_help    $MISSING_DEPENDENCY ;;
63423      pkgutil)
63424        pkgutil_help $MISSING_DEPENDENCY ;;
63425      pkgadd)
63426        pkgadd_help  $MISSING_DEPENDENCY ;;
63427    esac
63428
63429    if test "x$PKGHANDLER_COMMAND" != x; then
63430      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63431    fi
63432  fi
63433
63434
63435          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63436
63437
63438fi
63439rm -f core conftest.err conftest.$ac_objext \
63440    conftest$ac_exeext conftest.$ac_ext
63441    CXXCFLAGS="$PREV_CXXFLAGS"
63442    LIBS="$PREV_LIBS"
63443    CXX="$PREV_CXX"
63444    ac_ext=cpp
63445ac_cpp='$CXXCPP $CPPFLAGS'
63446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63449
63450
63451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63452$as_echo_n "checking if we should bundle freetype... " >&6; }
63453    if test "x$BUNDLE_FREETYPE" = xyes; then
63454      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63455    fi
63456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63457$as_echo "$BUNDLE_FREETYPE" >&6; }
63458
63459  fi # end freetype needed
63460
63461
63462
63463
63464
63465
63466
63467# Check whether --with-alsa was given.
63468if test "${with_alsa+set}" = set; then :
63469  withval=$with_alsa;
63470fi
63471
63472
63473# Check whether --with-alsa-include was given.
63474if test "${with_alsa_include+set}" = set; then :
63475  withval=$with_alsa_include;
63476fi
63477
63478
63479# Check whether --with-alsa-lib was given.
63480if test "${with_alsa_lib+set}" = set; then :
63481  withval=$with_alsa_lib;
63482fi
63483
63484
63485  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63486    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63487        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63488        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63489      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63490$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63491    fi
63492    ALSA_CFLAGS=
63493    ALSA_LIBS=
63494  else
63495    ALSA_FOUND=no
63496
63497    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63498      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63499    fi
63500
63501    if test "x${with_alsa}" != x; then
63502      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63503      ALSA_CFLAGS="-I${with_alsa}/include"
63504      ALSA_FOUND=yes
63505    fi
63506    if test "x${with_alsa_include}" != x; then
63507      ALSA_CFLAGS="-I${with_alsa_include}"
63508      ALSA_FOUND=yes
63509    fi
63510    if test "x${with_alsa_lib}" != x; then
63511      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63512      ALSA_FOUND=yes
63513    fi
63514    # Do not try pkg-config if we have a sysroot set.
63515    if test "x$SYSROOT" = x; then
63516      if test "x$ALSA_FOUND" = xno; then
63517
63518pkg_failed=no
63519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63520$as_echo_n "checking for ALSA... " >&6; }
63521
63522if test -n "$ALSA_CFLAGS"; then
63523    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63524 elif test -n "$PKG_CONFIG"; then
63525    if test -n "$PKG_CONFIG" && \
63526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63527  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63528  ac_status=$?
63529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63530  test $ac_status = 0; }; then
63531  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63532else
63533  pkg_failed=yes
63534fi
63535 else
63536    pkg_failed=untried
63537fi
63538if test -n "$ALSA_LIBS"; then
63539    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63540 elif test -n "$PKG_CONFIG"; then
63541    if test -n "$PKG_CONFIG" && \
63542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63543  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63544  ac_status=$?
63545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63546  test $ac_status = 0; }; then
63547  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63548else
63549  pkg_failed=yes
63550fi
63551 else
63552    pkg_failed=untried
63553fi
63554
63555
63556
63557if test $pkg_failed = yes; then
63558
63559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63560        _pkg_short_errors_supported=yes
63561else
63562        _pkg_short_errors_supported=no
63563fi
63564        if test $_pkg_short_errors_supported = yes; then
63565	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63566        else
63567	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63568        fi
63569	# Put the nasty error message in config.log where it belongs
63570	echo "$ALSA_PKG_ERRORS" >&5
63571
63572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63573$as_echo "no" >&6; }
63574                ALSA_FOUND=no
63575elif test $pkg_failed = untried; then
63576	ALSA_FOUND=no
63577else
63578	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63579	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63581$as_echo "yes" >&6; }
63582	ALSA_FOUND=yes
63583fi
63584      fi
63585    fi
63586    if test "x$ALSA_FOUND" = xno; then
63587      for ac_header in alsa/asoundlib.h
63588do :
63589  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63590if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63591  cat >>confdefs.h <<_ACEOF
63592#define HAVE_ALSA_ASOUNDLIB_H 1
63593_ACEOF
63594
63595            ALSA_FOUND=yes
63596            ALSA_CFLAGS=-Iignoreme
63597            ALSA_LIBS=-lasound
63598            DEFAULT_ALSA=yes
63599
63600else
63601  ALSA_FOUND=no
63602
63603fi
63604
63605done
63606
63607    fi
63608    if test "x$ALSA_FOUND" = xno; then
63609
63610  # Print a helpful message on how to acquire the necessary build dependency.
63611  # alsa is the help tag: freetype, cups, alsa etc
63612  MISSING_DEPENDENCY=alsa
63613
63614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63615    cygwin_help $MISSING_DEPENDENCY
63616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63617    msys_help $MISSING_DEPENDENCY
63618  else
63619    PKGHANDLER_COMMAND=
63620
63621    case $PKGHANDLER in
63622      apt-get)
63623        apt_help     $MISSING_DEPENDENCY ;;
63624      yum)
63625        yum_help     $MISSING_DEPENDENCY ;;
63626      port)
63627        port_help    $MISSING_DEPENDENCY ;;
63628      pkgutil)
63629        pkgutil_help $MISSING_DEPENDENCY ;;
63630      pkgadd)
63631        pkgadd_help  $MISSING_DEPENDENCY ;;
63632    esac
63633
63634    if test "x$PKGHANDLER_COMMAND" != x; then
63635      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63636    fi
63637  fi
63638
63639      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63640    fi
63641  fi
63642
63643
63644
63645
63646
63647
63648# Check whether --with-libffi was given.
63649if test "${with_libffi+set}" = set; then :
63650  withval=$with_libffi;
63651fi
63652
63653
63654# Check whether --with-libffi-include was given.
63655if test "${with_libffi_include+set}" = set; then :
63656  withval=$with_libffi_include;
63657fi
63658
63659
63660# Check whether --with-libffi-lib was given.
63661if test "${with_libffi_lib+set}" = set; then :
63662  withval=$with_libffi_lib;
63663fi
63664
63665
63666  if test "x$NEEDS_LIB_FFI" = xfalse; then
63667    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63668        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63669        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63670      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63671$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63672    fi
63673    LIBFFI_CFLAGS=
63674    LIBFFI_LIBS=
63675  else
63676    LIBFFI_FOUND=no
63677
63678    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63679      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63680    fi
63681
63682    if test "x${with_libffi}" != x; then
63683      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63684      LIBFFI_CFLAGS="-I${with_libffi}/include"
63685      LIBFFI_FOUND=yes
63686    fi
63687    if test "x${with_libffi_include}" != x; then
63688      LIBFFI_CFLAGS="-I${with_libffi_include}"
63689      LIBFFI_FOUND=yes
63690    fi
63691    if test "x${with_libffi_lib}" != x; then
63692      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63693      LIBFFI_FOUND=yes
63694    fi
63695    # Do not try pkg-config if we have a sysroot set.
63696    if test "x$SYSROOT" = x; then
63697      if test "x$LIBFFI_FOUND" = xno; then
63698        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63699
63700pkg_failed=no
63701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63702$as_echo_n "checking for LIBFFI... " >&6; }
63703
63704if test -n "$LIBFFI_CFLAGS"; then
63705    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63706 elif test -n "$PKG_CONFIG"; then
63707    if test -n "$PKG_CONFIG" && \
63708    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63709  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63710  ac_status=$?
63711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63712  test $ac_status = 0; }; then
63713  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63714else
63715  pkg_failed=yes
63716fi
63717 else
63718    pkg_failed=untried
63719fi
63720if test -n "$LIBFFI_LIBS"; then
63721    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63722 elif test -n "$PKG_CONFIG"; then
63723    if test -n "$PKG_CONFIG" && \
63724    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63725  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63726  ac_status=$?
63727  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63728  test $ac_status = 0; }; then
63729  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63730else
63731  pkg_failed=yes
63732fi
63733 else
63734    pkg_failed=untried
63735fi
63736
63737
63738
63739if test $pkg_failed = yes; then
63740
63741if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63742        _pkg_short_errors_supported=yes
63743else
63744        _pkg_short_errors_supported=no
63745fi
63746        if test $_pkg_short_errors_supported = yes; then
63747	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63748        else
63749	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63750        fi
63751	# Put the nasty error message in config.log where it belongs
63752	echo "$LIBFFI_PKG_ERRORS" >&5
63753
63754	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63755$as_echo "no" >&6; }
63756                LIBFFI_FOUND=no
63757elif test $pkg_failed = untried; then
63758	LIBFFI_FOUND=no
63759else
63760	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63761	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63763$as_echo "yes" >&6; }
63764	LIBFFI_FOUND=yes
63765fi
63766      fi
63767    fi
63768    if test "x$LIBFFI_FOUND" = xno; then
63769      for ac_header in ffi.h
63770do :
63771  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63772if test "x$ac_cv_header_ffi_h" = xyes; then :
63773  cat >>confdefs.h <<_ACEOF
63774#define HAVE_FFI_H 1
63775_ACEOF
63776
63777            LIBFFI_FOUND=yes
63778            LIBFFI_CFLAGS=
63779            LIBFFI_LIBS=-lffi
63780
63781else
63782  LIBFFI_FOUND=no
63783
63784fi
63785
63786done
63787
63788    fi
63789    if test "x$LIBFFI_FOUND" = xno; then
63790
63791  # Print a helpful message on how to acquire the necessary build dependency.
63792  # ffi is the help tag: freetype, cups, alsa etc
63793  MISSING_DEPENDENCY=ffi
63794
63795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63796    cygwin_help $MISSING_DEPENDENCY
63797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63798    msys_help $MISSING_DEPENDENCY
63799  else
63800    PKGHANDLER_COMMAND=
63801
63802    case $PKGHANDLER in
63803      apt-get)
63804        apt_help     $MISSING_DEPENDENCY ;;
63805      yum)
63806        yum_help     $MISSING_DEPENDENCY ;;
63807      port)
63808        port_help    $MISSING_DEPENDENCY ;;
63809      pkgutil)
63810        pkgutil_help $MISSING_DEPENDENCY ;;
63811      pkgadd)
63812        pkgadd_help  $MISSING_DEPENDENCY ;;
63813    esac
63814
63815    if test "x$PKGHANDLER_COMMAND" != x; then
63816      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63817    fi
63818  fi
63819
63820      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63821    fi
63822
63823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63824$as_echo_n "checking if libffi works... " >&6; }
63825    ac_ext=c
63826ac_cpp='$CPP $CPPFLAGS'
63827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63829ac_compiler_gnu=$ac_cv_c_compiler_gnu
63830
63831    OLD_CFLAGS="$CFLAGS"
63832    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63833    OLD_LIBS="$LIBS"
63834    LIBS="$LIBS $LIBFFI_LIBS"
63835    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63836/* end confdefs.h.  */
63837#include <ffi.h>
63838int
63839main ()
63840{
63841
63842          ffi_call(NULL, NULL, NULL, NULL);
63843          return 0;
63844
63845  ;
63846  return 0;
63847}
63848_ACEOF
63849if ac_fn_c_try_link "$LINENO"; then :
63850  LIBFFI_WORKS=yes
63851else
63852  LIBFFI_WORKS=no
63853
63854fi
63855rm -f core conftest.err conftest.$ac_objext \
63856    conftest$ac_exeext conftest.$ac_ext
63857    CFLAGS="$OLD_CFLAGS"
63858    LIBS="$OLD_LIBS"
63859    ac_ext=cpp
63860ac_cpp='$CXXCPP $CPPFLAGS'
63861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63864
63865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63866$as_echo "$LIBFFI_WORKS" >&6; }
63867
63868    if test "x$LIBFFI_WORKS" = xno; then
63869
63870  # Print a helpful message on how to acquire the necessary build dependency.
63871  # ffi is the help tag: freetype, cups, alsa etc
63872  MISSING_DEPENDENCY=ffi
63873
63874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63875    cygwin_help $MISSING_DEPENDENCY
63876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63877    msys_help $MISSING_DEPENDENCY
63878  else
63879    PKGHANDLER_COMMAND=
63880
63881    case $PKGHANDLER in
63882      apt-get)
63883        apt_help     $MISSING_DEPENDENCY ;;
63884      yum)
63885        yum_help     $MISSING_DEPENDENCY ;;
63886      port)
63887        port_help    $MISSING_DEPENDENCY ;;
63888      pkgutil)
63889        pkgutil_help $MISSING_DEPENDENCY ;;
63890      pkgadd)
63891        pkgadd_help  $MISSING_DEPENDENCY ;;
63892    esac
63893
63894    if test "x$PKGHANDLER_COMMAND" != x; then
63895      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63896    fi
63897  fi
63898
63899      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63900    fi
63901  fi
63902
63903
63904
63905
63906
63907  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63908    # Extract the first word of "llvm-config", so it can be a program name with args.
63909set dummy llvm-config; ac_word=$2
63910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63911$as_echo_n "checking for $ac_word... " >&6; }
63912if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63913  $as_echo_n "(cached) " >&6
63914else
63915  if test -n "$LLVM_CONFIG"; then
63916  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63917else
63918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63919for as_dir in $PATH
63920do
63921  IFS=$as_save_IFS
63922  test -z "$as_dir" && as_dir=.
63923    for ac_exec_ext in '' $ac_executable_extensions; do
63924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63925    ac_cv_prog_LLVM_CONFIG="llvm-config"
63926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63927    break 2
63928  fi
63929done
63930  done
63931IFS=$as_save_IFS
63932
63933fi
63934fi
63935LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63936if test -n "$LLVM_CONFIG"; then
63937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63938$as_echo "$LLVM_CONFIG" >&6; }
63939else
63940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63941$as_echo "no" >&6; }
63942fi
63943
63944
63945
63946    if test "x$LLVM_CONFIG" != xllvm-config; then
63947      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63948    fi
63949
63950    llvm_components="jit mcjit engine nativecodegen native"
63951    unset LLVM_CFLAGS
63952    for flag in $("$LLVM_CONFIG" --cxxflags); do
63953      if echo "${flag}" | grep -q '^-[ID]'; then
63954        if test "${flag}" != "-D_DEBUG" ; then
63955          if test "${LLVM_CFLAGS}" != "" ; then
63956            LLVM_CFLAGS="${LLVM_CFLAGS} "
63957          fi
63958          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63959        fi
63960      fi
63961    done
63962    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63963    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63964
63965    unset LLVM_LDFLAGS
63966    for flag in $("${LLVM_CONFIG}" --ldflags); do
63967      if echo "${flag}" | grep -q '^-L'; then
63968        if test "${LLVM_LDFLAGS}" != ""; then
63969          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63970        fi
63971        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63972      fi
63973    done
63974
63975    unset LLVM_LIBS
63976    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63977      if echo "${flag}" | grep -q '^-l'; then
63978        if test "${LLVM_LIBS}" != ""; then
63979          LLVM_LIBS="${LLVM_LIBS} "
63980        fi
63981        LLVM_LIBS="${LLVM_LIBS}${flag}"
63982      fi
63983    done
63984
63985    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63986    # always properly detect -ltinfo
63987    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63988
63989
63990
63991
63992  fi
63993
63994
63995
63996# Check whether --with-libjpeg was given.
63997if test "${with_libjpeg+set}" = set; then :
63998  withval=$with_libjpeg;
63999fi
64000
64001
64002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64003$as_echo_n "checking for which libjpeg to use... " >&6; }
64004  # default is bundled
64005  DEFAULT_LIBJPEG=bundled
64006  # if user didn't specify, use DEFAULT_LIBJPEG
64007  if test "x${with_libjpeg}" = "x"; then
64008    with_libjpeg=${DEFAULT_LIBJPEG}
64009  fi
64010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64011$as_echo "${with_libjpeg}" >&6; }
64012
64013  if test "x${with_libjpeg}" = "xbundled"; then
64014    USE_EXTERNAL_LIBJPEG=false
64015  elif test "x${with_libjpeg}" = "xsystem"; then
64016    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64017if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64018
64019else
64020   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64021fi
64022
64023
64024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64025$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64026if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64027  $as_echo_n "(cached) " >&6
64028else
64029  ac_check_lib_save_LIBS=$LIBS
64030LIBS="-ljpeg  $LIBS"
64031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64032/* end confdefs.h.  */
64033
64034/* Override any GCC internal prototype to avoid an error.
64035   Use char because int might match the return type of a GCC
64036   builtin and then its argument prototype would still apply.  */
64037#ifdef __cplusplus
64038extern "C"
64039#endif
64040char jpeg_CreateDecompress ();
64041int
64042main ()
64043{
64044return jpeg_CreateDecompress ();
64045  ;
64046  return 0;
64047}
64048_ACEOF
64049if ac_fn_cxx_try_link "$LINENO"; then :
64050  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64051else
64052  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64053fi
64054rm -f core conftest.err conftest.$ac_objext \
64055    conftest$ac_exeext conftest.$ac_ext
64056LIBS=$ac_check_lib_save_LIBS
64057fi
64058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64059$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64060if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64061  cat >>confdefs.h <<_ACEOF
64062#define HAVE_LIBJPEG 1
64063_ACEOF
64064
64065  LIBS="-ljpeg $LIBS"
64066
64067else
64068   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64069fi
64070
64071
64072    USE_EXTERNAL_LIBJPEG=true
64073  else
64074    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64075  fi
64076
64077
64078
64079
64080
64081# Check whether --with-giflib was given.
64082if test "${with_giflib+set}" = set; then :
64083  withval=$with_giflib;
64084fi
64085
64086
64087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64088$as_echo_n "checking for which giflib to use... " >&6; }
64089  # default is bundled
64090  DEFAULT_GIFLIB=bundled
64091  # if user didn't specify, use DEFAULT_GIFLIB
64092  if test "x${with_giflib}" = "x"; then
64093    with_giflib=${DEFAULT_GIFLIB}
64094  fi
64095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64096$as_echo "${with_giflib}" >&6; }
64097
64098  if test "x${with_giflib}" = "xbundled"; then
64099    USE_EXTERNAL_LIBGIF=false
64100  elif test "x${with_giflib}" = "xsystem"; then
64101    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64102if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64103
64104else
64105   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64106fi
64107
64108
64109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64110$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64111if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64112  $as_echo_n "(cached) " >&6
64113else
64114  ac_check_lib_save_LIBS=$LIBS
64115LIBS="-lgif  $LIBS"
64116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64117/* end confdefs.h.  */
64118
64119/* Override any GCC internal prototype to avoid an error.
64120   Use char because int might match the return type of a GCC
64121   builtin and then its argument prototype would still apply.  */
64122#ifdef __cplusplus
64123extern "C"
64124#endif
64125char DGifGetCode ();
64126int
64127main ()
64128{
64129return DGifGetCode ();
64130  ;
64131  return 0;
64132}
64133_ACEOF
64134if ac_fn_cxx_try_link "$LINENO"; then :
64135  ac_cv_lib_gif_DGifGetCode=yes
64136else
64137  ac_cv_lib_gif_DGifGetCode=no
64138fi
64139rm -f core conftest.err conftest.$ac_objext \
64140    conftest$ac_exeext conftest.$ac_ext
64141LIBS=$ac_check_lib_save_LIBS
64142fi
64143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64144$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64145if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64146  cat >>confdefs.h <<_ACEOF
64147#define HAVE_LIBGIF 1
64148_ACEOF
64149
64150  LIBS="-lgif $LIBS"
64151
64152else
64153   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64154fi
64155
64156
64157    USE_EXTERNAL_LIBGIF=true
64158  else
64159    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64160  fi
64161
64162
64163
64164
64165
64166# Check whether --with-libpng was given.
64167if test "${with_libpng+set}" = set; then :
64168  withval=$with_libpng;
64169fi
64170
64171
64172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64173$as_echo_n "checking for which libpng to use... " >&6; }
64174
64175  # default is bundled
64176  DEFAULT_LIBPNG=bundled
64177  # if user didn't specify, use DEFAULT_LIBPNG
64178  if test "x${with_libpng}" = "x"; then
64179      with_libpng=${DEFAULT_LIBPNG}
64180  fi
64181
64182  if test "x${with_libpng}" = "xbundled"; then
64183      USE_EXTERNAL_LIBPNG=false
64184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64185$as_echo "bundled" >&6; }
64186  elif test "x${with_libpng}" = "xsystem"; then
64187
64188pkg_failed=no
64189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64190$as_echo_n "checking for PNG... " >&6; }
64191
64192if test -n "$PNG_CFLAGS"; then
64193    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64194 elif test -n "$PKG_CONFIG"; then
64195    if test -n "$PKG_CONFIG" && \
64196    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64197  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64198  ac_status=$?
64199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64200  test $ac_status = 0; }; then
64201  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64202else
64203  pkg_failed=yes
64204fi
64205 else
64206    pkg_failed=untried
64207fi
64208if test -n "$PNG_LIBS"; then
64209    pkg_cv_PNG_LIBS="$PNG_LIBS"
64210 elif test -n "$PKG_CONFIG"; then
64211    if test -n "$PKG_CONFIG" && \
64212    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64213  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64214  ac_status=$?
64215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64216  test $ac_status = 0; }; then
64217  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64218else
64219  pkg_failed=yes
64220fi
64221 else
64222    pkg_failed=untried
64223fi
64224
64225
64226
64227if test $pkg_failed = yes; then
64228
64229if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64230        _pkg_short_errors_supported=yes
64231else
64232        _pkg_short_errors_supported=no
64233fi
64234        if test $_pkg_short_errors_supported = yes; then
64235	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64236        else
64237	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64238        fi
64239	# Put the nasty error message in config.log where it belongs
64240	echo "$PNG_PKG_ERRORS" >&5
64241
64242	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64243$as_echo "no" >&6; }
64244                 LIBPNG_FOUND=no
64245elif test $pkg_failed = untried; then
64246	 LIBPNG_FOUND=no
64247else
64248	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64249	PNG_LIBS=$pkg_cv_PNG_LIBS
64250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64251$as_echo "yes" >&6; }
64252	 LIBPNG_FOUND=yes
64253fi
64254      if test "x${LIBPNG_FOUND}" = "xyes"; then
64255          USE_EXTERNAL_LIBPNG=true
64256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64257$as_echo "system" >&6; }
64258      else
64259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64260$as_echo "system not found" >&6; }
64261          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64262      fi
64263  else
64264      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64265  fi
64266
64267
64268
64269
64270
64271# Check whether --with-zlib was given.
64272if test "${with_zlib+set}" = set; then :
64273  withval=$with_zlib;
64274fi
64275
64276
64277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64278$as_echo_n "checking for compress in -lz... " >&6; }
64279if ${ac_cv_lib_z_compress+:} false; then :
64280  $as_echo_n "(cached) " >&6
64281else
64282  ac_check_lib_save_LIBS=$LIBS
64283LIBS="-lz  $LIBS"
64284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64285/* end confdefs.h.  */
64286
64287/* Override any GCC internal prototype to avoid an error.
64288   Use char because int might match the return type of a GCC
64289   builtin and then its argument prototype would still apply.  */
64290#ifdef __cplusplus
64291extern "C"
64292#endif
64293char compress ();
64294int
64295main ()
64296{
64297return compress ();
64298  ;
64299  return 0;
64300}
64301_ACEOF
64302if ac_fn_cxx_try_link "$LINENO"; then :
64303  ac_cv_lib_z_compress=yes
64304else
64305  ac_cv_lib_z_compress=no
64306fi
64307rm -f core conftest.err conftest.$ac_objext \
64308    conftest$ac_exeext conftest.$ac_ext
64309LIBS=$ac_check_lib_save_LIBS
64310fi
64311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64312$as_echo "$ac_cv_lib_z_compress" >&6; }
64313if test "x$ac_cv_lib_z_compress" = xyes; then :
64314   ZLIB_FOUND=yes
64315else
64316   ZLIB_FOUND=no
64317fi
64318
64319
64320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64321$as_echo_n "checking for which zlib to use... " >&6; }
64322
64323  DEFAULT_ZLIB=system
64324  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64325    # On windows default is bundled...on others default is system
64326    DEFAULT_ZLIB=bundled
64327  fi
64328
64329  if test "x${ZLIB_FOUND}" != "xyes"; then
64330    # If we don't find any system...set default to bundled
64331    DEFAULT_ZLIB=bundled
64332  fi
64333
64334  # If user didn't specify, use DEFAULT_ZLIB
64335  if test "x${with_zlib}" = "x"; then
64336    with_zlib=${DEFAULT_ZLIB}
64337  fi
64338
64339  if test "x${with_zlib}" = "xbundled"; then
64340    USE_EXTERNAL_LIBZ=false
64341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64342$as_echo "bundled" >&6; }
64343  elif test "x${with_zlib}" = "xsystem"; then
64344    if test "x${ZLIB_FOUND}" = "xyes"; then
64345      USE_EXTERNAL_LIBZ=true
64346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64347$as_echo "system" >&6; }
64348    else
64349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64350$as_echo "system not found" >&6; }
64351      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64352    fi
64353  else
64354    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64355  fi
64356
64357
64358
64359
64360
64361# Check whether --with-lcms was given.
64362if test "${with_lcms+set}" = set; then :
64363  withval=$with_lcms;
64364fi
64365
64366
64367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64368$as_echo_n "checking for which lcms to use... " >&6; }
64369
64370  DEFAULT_LCMS=bundled
64371  # If user didn't specify, use DEFAULT_LCMS
64372  if test "x${with_lcms}" = "x"; then
64373      with_lcms=${DEFAULT_LCMS}
64374  fi
64375
64376  if test "x${with_lcms}" = "xbundled"; then
64377    USE_EXTERNAL_LCMS=false
64378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64379$as_echo "bundled" >&6; }
64380  elif test "x${with_lcms}" = "xsystem"; then
64381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64382$as_echo "system" >&6; }
64383
64384pkg_failed=no
64385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64386$as_echo_n "checking for LCMS... " >&6; }
64387
64388if test -n "$LCMS_CFLAGS"; then
64389    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64390 elif test -n "$PKG_CONFIG"; then
64391    if test -n "$PKG_CONFIG" && \
64392    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64393  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64394  ac_status=$?
64395  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64396  test $ac_status = 0; }; then
64397  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64398else
64399  pkg_failed=yes
64400fi
64401 else
64402    pkg_failed=untried
64403fi
64404if test -n "$LCMS_LIBS"; then
64405    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64406 elif test -n "$PKG_CONFIG"; then
64407    if test -n "$PKG_CONFIG" && \
64408    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64409  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64410  ac_status=$?
64411  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64412  test $ac_status = 0; }; then
64413  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64414else
64415  pkg_failed=yes
64416fi
64417 else
64418    pkg_failed=untried
64419fi
64420
64421
64422
64423if test $pkg_failed = yes; then
64424
64425if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64426        _pkg_short_errors_supported=yes
64427else
64428        _pkg_short_errors_supported=no
64429fi
64430        if test $_pkg_short_errors_supported = yes; then
64431	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64432        else
64433	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64434        fi
64435	# Put the nasty error message in config.log where it belongs
64436	echo "$LCMS_PKG_ERRORS" >&5
64437
64438	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64439$as_echo "no" >&6; }
64440                LCMS_FOUND=no
64441elif test $pkg_failed = untried; then
64442	LCMS_FOUND=no
64443else
64444	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64445	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64447$as_echo "yes" >&6; }
64448	LCMS_FOUND=yes
64449fi
64450    if test "x${LCMS_FOUND}" = "xyes"; then
64451      USE_EXTERNAL_LCMS=true
64452    else
64453      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64454    fi
64455  else
64456    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64457  fi
64458
64459
64460
64461
64462
64463
64464
64465
64466
64467
64468
64469  # Setup libm (the maths library)
64470  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64472$as_echo_n "checking for cos in -lm... " >&6; }
64473if ${ac_cv_lib_m_cos+:} false; then :
64474  $as_echo_n "(cached) " >&6
64475else
64476  ac_check_lib_save_LIBS=$LIBS
64477LIBS="-lm  $LIBS"
64478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64479/* end confdefs.h.  */
64480
64481/* Override any GCC internal prototype to avoid an error.
64482   Use char because int might match the return type of a GCC
64483   builtin and then its argument prototype would still apply.  */
64484#ifdef __cplusplus
64485extern "C"
64486#endif
64487char cos ();
64488int
64489main ()
64490{
64491return cos ();
64492  ;
64493  return 0;
64494}
64495_ACEOF
64496if ac_fn_cxx_try_link "$LINENO"; then :
64497  ac_cv_lib_m_cos=yes
64498else
64499  ac_cv_lib_m_cos=no
64500fi
64501rm -f core conftest.err conftest.$ac_objext \
64502    conftest$ac_exeext conftest.$ac_ext
64503LIBS=$ac_check_lib_save_LIBS
64504fi
64505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64506$as_echo "$ac_cv_lib_m_cos" >&6; }
64507if test "x$ac_cv_lib_m_cos" = xyes; then :
64508  cat >>confdefs.h <<_ACEOF
64509#define HAVE_LIBM 1
64510_ACEOF
64511
64512  LIBS="-lm $LIBS"
64513
64514else
64515
64516        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64517$as_echo "$as_me: Maths library was not found" >&6;}
64518
64519fi
64520
64521    LIBM="-lm"
64522  else
64523    LIBM=""
64524  fi
64525
64526
64527  # Setup libdl (for dynamic library loading)
64528  save_LIBS="$LIBS"
64529  LIBS=""
64530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64531$as_echo_n "checking for dlopen in -ldl... " >&6; }
64532if ${ac_cv_lib_dl_dlopen+:} false; then :
64533  $as_echo_n "(cached) " >&6
64534else
64535  ac_check_lib_save_LIBS=$LIBS
64536LIBS="-ldl  $LIBS"
64537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64538/* end confdefs.h.  */
64539
64540/* Override any GCC internal prototype to avoid an error.
64541   Use char because int might match the return type of a GCC
64542   builtin and then its argument prototype would still apply.  */
64543#ifdef __cplusplus
64544extern "C"
64545#endif
64546char dlopen ();
64547int
64548main ()
64549{
64550return dlopen ();
64551  ;
64552  return 0;
64553}
64554_ACEOF
64555if ac_fn_cxx_try_link "$LINENO"; then :
64556  ac_cv_lib_dl_dlopen=yes
64557else
64558  ac_cv_lib_dl_dlopen=no
64559fi
64560rm -f core conftest.err conftest.$ac_objext \
64561    conftest$ac_exeext conftest.$ac_ext
64562LIBS=$ac_check_lib_save_LIBS
64563fi
64564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64565$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64566if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64567  cat >>confdefs.h <<_ACEOF
64568#define HAVE_LIBDL 1
64569_ACEOF
64570
64571  LIBS="-ldl $LIBS"
64572
64573fi
64574
64575  LIBDL="$LIBS"
64576
64577  LIBS="$save_LIBS"
64578
64579  # Deprecated libraries, keep the flags for backwards compatibility
64580  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64581
64582
64583# Check whether --with-dxsdk was given.
64584if test "${with_dxsdk+set}" = set; then :
64585  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64586$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64587fi
64588
64589
64590
64591
64592# Check whether --with-dxsdk-lib was given.
64593if test "${with_dxsdk_lib+set}" = set; then :
64594  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64595$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64596fi
64597
64598
64599
64600
64601# Check whether --with-dxsdk-include was given.
64602if test "${with_dxsdk_include+set}" = set; then :
64603  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64604$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64605fi
64606
64607
64608  fi
64609
64610  # Control if libzip can use mmap. Available for purposes of overriding.
64611  LIBZIP_CAN_USE_MMAP=true
64612
64613
64614
64615  if test "$OPENJDK_TARGET_OS" = "solaris"; then
64616    # Find the root of the Solaris Studio installation from the compiler path
64617    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64618    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64620$as_echo_n "checking for libstlport.so.1... " >&6; }
64621    if test -f "$STLPORT_LIB"; then
64622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64623$as_echo "yes, $STLPORT_LIB" >&6; }
64624
64625  # Only process if variable expands to non-empty
64626
64627  if test "x$STLPORT_LIB" != x; then
64628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64629
64630  # Input might be given as Windows format, start by converting to
64631  # unix format.
64632  path="$STLPORT_LIB"
64633  new_path=`$CYGPATH -u "$path"`
64634
64635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64638  # "foo.exe" is OK but "foo" is an error.
64639  #
64640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64641  # It is also a way to make sure we got the proper file name for the real test later on.
64642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64643  if test "x$test_shortpath" = x; then
64644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64645$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64646    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64647  fi
64648
64649  # Call helper function which possibly converts this using DOS-style short mode.
64650  # If so, the updated path is stored in $new_path.
64651
64652  input_path="$new_path"
64653  # Check if we need to convert this using DOS-style short mode. If the path
64654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64655  # take no chances and rewrite it.
64656  # Note: m4 eats our [], so we need to use [ and ] instead.
64657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64658  if test "x$has_forbidden_chars" != x; then
64659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64663      # Going to short mode and back again did indeed matter. Since short mode is
64664      # case insensitive, let's make it lowercase to improve readability.
64665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64666      # Now convert it back to Unix-style (cygpath)
64667      input_path=`$CYGPATH -u "$shortmode_path"`
64668      new_path="$input_path"
64669    fi
64670  fi
64671
64672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64673  if test "x$test_cygdrive_prefix" = x; then
64674    # As a simple fix, exclude /usr/bin since it's not a real path.
64675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64677      # a path prefixed by /cygdrive for fixpath to work.
64678      new_path="$CYGWIN_ROOT_PATH$input_path"
64679    fi
64680  fi
64681
64682
64683  if test "x$path" != "x$new_path"; then
64684    STLPORT_LIB="$new_path"
64685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64686$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64687  fi
64688
64689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64690
64691  path="$STLPORT_LIB"
64692  has_colon=`$ECHO $path | $GREP ^.:`
64693  new_path="$path"
64694  if test "x$has_colon" = x; then
64695    # Not in mixed or Windows style, start by that.
64696    new_path=`cmd //c echo $path`
64697  fi
64698
64699
64700  input_path="$new_path"
64701  # Check if we need to convert this using DOS-style short mode. If the path
64702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64703  # take no chances and rewrite it.
64704  # Note: m4 eats our [], so we need to use [ and ] instead.
64705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64706  if test "x$has_forbidden_chars" != x; then
64707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64709  fi
64710
64711
64712  windows_path="$new_path"
64713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64714    unix_path=`$CYGPATH -u "$windows_path"`
64715    new_path="$unix_path"
64716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64718    new_path="$unix_path"
64719  fi
64720
64721  if test "x$path" != "x$new_path"; then
64722    STLPORT_LIB="$new_path"
64723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64724$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64725  fi
64726
64727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64729
64730    else
64731      # We're on a unix platform. Hooray! :)
64732      path="$STLPORT_LIB"
64733      has_space=`$ECHO "$path" | $GREP " "`
64734      if test "x$has_space" != x; then
64735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64736$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64738      fi
64739
64740      # Use eval to expand a potential ~
64741      eval path="$path"
64742      if test ! -f "$path" && test ! -d "$path"; then
64743        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64744      fi
64745
64746      if test -d "$path"; then
64747        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64748      else
64749        dir="`$DIRNAME "$path"`"
64750        base="`$BASENAME "$path"`"
64751        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64752      fi
64753    fi
64754  fi
64755
64756    else
64757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64758$as_echo "no, not found at $STLPORT_LIB" >&6; }
64759      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64760    fi
64761
64762  fi
64763
64764
64765
64766
64767
64768
64769
64770
64771
64772
64773
64774
64775
64776
64777###############################################################################
64778#
64779# We need to do some final tweaking, when everything else is done.
64780#
64781###############################################################################
64782
64783
64784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64785$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64786
64787  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64788    ENABLE_INTREE_EC=yes
64789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64790$as_echo "yes" >&6; }
64791  else
64792    ENABLE_INTREE_EC=no
64793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64794$as_echo "no" >&6; }
64795  fi
64796
64797
64798
64799
64800  # Check whether --enable-jtreg-failure-handler was given.
64801if test "${enable_jtreg_failure_handler+set}" = set; then :
64802  enableval=$enable_jtreg_failure_handler;
64803fi
64804
64805
64806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64807$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64808
64809  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64810    if test "x$JT_HOME" = "x"; then
64811      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64812    else
64813      BUILD_FAILURE_HANDLER=true
64814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64815$as_echo "yes, forced" >&6; }
64816    fi
64817  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64818    BUILD_FAILURE_HANDLER=false
64819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64820$as_echo "no, forced" >&6; }
64821  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64822      || test "x$enable_jtreg_failure_handler" = "x"; then
64823    if test "x$JT_HOME" = "x"; then
64824      BUILD_FAILURE_HANDLER=false
64825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64826$as_echo "no, missing jtreg" >&6; }
64827    else
64828      BUILD_FAILURE_HANDLER=true
64829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64830$as_echo "yes, jtreg present" >&6; }
64831    fi
64832  else
64833    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64834  fi
64835
64836
64837
64838
64839  # Check whether --enable-generate-classlist was given.
64840if test "${enable_generate_classlist+set}" = set; then :
64841  enableval=$enable_generate_classlist;
64842fi
64843
64844
64845  # Check if it's likely that it's possible to generate the classlist. Depending
64846  # on exact jvm configuration it could be possible anyway.
64847  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64848    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64849  else
64850    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64851  fi
64852
64853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64854$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64855  if test "x$enable_generate_classlist" = "xyes"; then
64856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64857$as_echo "yes, forced" >&6; }
64858    ENABLE_GENERATE_CLASSLIST="true"
64859    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64860      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64861$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64862    fi
64863  elif test "x$enable_generate_classlist" = "xno"; then
64864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64865$as_echo "no, forced" >&6; }
64866    ENABLE_GENERATE_CLASSLIST="false"
64867  elif test "x$enable_generate_classlist" = "x"; then
64868    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64870$as_echo "yes" >&6; }
64871      ENABLE_GENERATE_CLASSLIST="true"
64872    else
64873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64874$as_echo "no" >&6; }
64875      ENABLE_GENERATE_CLASSLIST="false"
64876    fi
64877  else
64878    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64879  fi
64880
64881
64882
64883
64884###############################################################################
64885#
64886# Configure parts of the build that only affect the build performance,
64887# not the result.
64888#
64889###############################################################################
64890
64891
64892  # How many cores do we have on this build system?
64893
64894# Check whether --with-num-cores was given.
64895if test "${with_num_cores+set}" = set; then :
64896  withval=$with_num_cores;
64897fi
64898
64899  if test "x$with_num_cores" = x; then
64900    # The number of cores were not specified, try to probe them.
64901
64902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64903$as_echo_n "checking for number of cores... " >&6; }
64904  NUM_CORES=1
64905  FOUND_CORES=no
64906
64907  if test -f /proc/cpuinfo; then
64908    # Looks like a Linux (or cygwin) system
64909    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64910    FOUND_CORES=yes
64911  elif test -x /usr/sbin/psrinfo; then
64912    # Looks like a Solaris system
64913    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64914    FOUND_CORES=yes
64915  elif test -x /usr/sbin/sysctl; then
64916    # Looks like a MacOSX system
64917    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64918    FOUND_CORES=yes
64919  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64920    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64921    FOUND_CORES=yes
64922  elif test -n "$NUMBER_OF_PROCESSORS"; then
64923    # On windows, look in the env
64924    NUM_CORES=$NUMBER_OF_PROCESSORS
64925    FOUND_CORES=yes
64926  fi
64927
64928  if test "x$FOUND_CORES" = xyes; then
64929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64930$as_echo "$NUM_CORES" >&6; }
64931  else
64932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64933$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64934    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64935$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64936  fi
64937
64938  else
64939    NUM_CORES=$with_num_cores
64940  fi
64941
64942
64943
64944  # How much memory do we have on this build system?
64945
64946# Check whether --with-memory-size was given.
64947if test "${with_memory_size+set}" = set; then :
64948  withval=$with_memory_size;
64949fi
64950
64951  if test "x$with_memory_size" = x; then
64952    # The memory size was not specified, try to probe it.
64953
64954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64955$as_echo_n "checking for memory size... " >&6; }
64956  # Default to 1024 MB
64957  MEMORY_SIZE=1024
64958  FOUND_MEM=no
64959
64960  if test -f /proc/meminfo; then
64961    # Looks like a Linux (or cygwin) system
64962    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64963    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64964    FOUND_MEM=yes
64965  elif test -x /usr/sbin/prtconf; then
64966    # Looks like a Solaris or AIX system
64967    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64968    FOUND_MEM=yes
64969  elif test -x /usr/sbin/sysctl; then
64970    # Looks like a MacOSX system
64971    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64972    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64973    FOUND_MEM=yes
64974  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64975    # Windows, but without cygwin
64976    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64977    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64978    FOUND_MEM=yes
64979  fi
64980
64981  if test "x$FOUND_MEM" = xyes; then
64982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64983$as_echo "$MEMORY_SIZE MB" >&6; }
64984  else
64985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64986$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64987    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64988$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64989  fi
64990
64991  else
64992    MEMORY_SIZE=$with_memory_size
64993  fi
64994
64995
64996
64997  # Provide a decent default number of parallel jobs for make depending on
64998  # number of cores, amount of memory and machine architecture.
64999
65000# Check whether --with-jobs was given.
65001if test "${with_jobs+set}" = set; then :
65002  withval=$with_jobs;
65003fi
65004
65005  if test "x$with_jobs" = x; then
65006    # Number of jobs was not specified, calculate.
65007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65008$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65009    # Approximate memory in GB.
65010    memory_gb=`expr $MEMORY_SIZE / 1024`
65011    # Pick the lowest of memory in gb and number of cores.
65012    if test "$memory_gb" -lt "$NUM_CORES"; then
65013      JOBS="$memory_gb"
65014    else
65015      JOBS="$NUM_CORES"
65016    fi
65017    if test "$JOBS" -eq "0"; then
65018      JOBS=1
65019    fi
65020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65021$as_echo "$JOBS" >&6; }
65022  else
65023    JOBS=$with_jobs
65024  fi
65025
65026
65027
65028  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65029
65030# Check whether --with-test-jobs was given.
65031if test "${with_test_jobs+set}" = set; then :
65032  withval=$with_test_jobs;
65033fi
65034
65035  if test "x$with_test_jobs" = x; then
65036      TEST_JOBS=0
65037  else
65038      TEST_JOBS=$with_test_jobs
65039  fi
65040
65041
65042
65043# Setup arguments for the boot jdk (after cores and memory have been setup)
65044
65045  ##############################################################################
65046  #
65047  # Specify jvm options for anything that is run with the Boot JDK.
65048  # Not all JVM:s accept the same arguments on the command line.
65049  #
65050
65051# Check whether --with-boot-jdk-jvmargs was given.
65052if test "${with_boot_jdk_jvmargs+set}" = set; then :
65053  withval=$with_boot_jdk_jvmargs;
65054fi
65055
65056
65057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65058$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65059
65060  # Disable special log output when a debug build is used as Boot JDK...
65061
65062  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65063  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65064  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65065  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65066  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65067  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65068    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65069    JVM_ARG_OK=true
65070  else
65071    $ECHO "Arg failed:" >&5
65072    $ECHO "$OUTPUT" >&5
65073    JVM_ARG_OK=false
65074  fi
65075
65076
65077  # Apply user provided options.
65078
65079  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65080  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65081  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65082  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65083  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65084  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65085    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65086    JVM_ARG_OK=true
65087  else
65088    $ECHO "Arg failed:" >&5
65089    $ECHO "$OUTPUT" >&5
65090    JVM_ARG_OK=false
65091  fi
65092
65093
65094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65095$as_echo "$boot_jdk_jvmargs" >&6; }
65096
65097  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65098  JAVA_FLAGS=$boot_jdk_jvmargs
65099
65100
65101
65102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65103$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65104
65105  # Starting amount of heap memory.
65106
65107  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65108  $ECHO "Command: $JAVA -Xms64M -version" >&5
65109  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65110  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65111  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65112  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65113    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65114    JVM_ARG_OK=true
65115  else
65116    $ECHO "Arg failed:" >&5
65117    $ECHO "$OUTPUT" >&5
65118    JVM_ARG_OK=false
65119  fi
65120
65121
65122  # Maximum amount of heap memory.
65123  # Maximum stack size.
65124  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
65125  if test "x$BOOT_JDK_BITS" = "x32"; then
65126    if test "$JVM_MAX_HEAP" -gt "1100"; then
65127      JVM_MAX_HEAP=1100
65128    elif test "$JVM_MAX_HEAP" -lt "512"; then
65129      JVM_MAX_HEAP=512
65130    fi
65131    STACK_SIZE=768
65132  else
65133    # Running a 64 bit JVM allows for and requires a bigger heap
65134    if test "$JVM_MAX_HEAP" -gt "1600"; then
65135      JVM_MAX_HEAP=1600
65136    elif test "$JVM_MAX_HEAP" -lt "512"; then
65137      JVM_MAX_HEAP=512
65138    fi
65139    STACK_SIZE=1536
65140  fi
65141
65142  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65143  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65144  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65145  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65146  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65148    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65149    JVM_ARG_OK=true
65150  else
65151    $ECHO "Arg failed:" >&5
65152    $ECHO "$OUTPUT" >&5
65153    JVM_ARG_OK=false
65154  fi
65155
65156
65157  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65158  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65159  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65160  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65161  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65162  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65163    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65164    JVM_ARG_OK=true
65165  else
65166    $ECHO "Arg failed:" >&5
65167    $ECHO "$OUTPUT" >&5
65168    JVM_ARG_OK=false
65169  fi
65170
65171
65172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65173$as_echo "$boot_jdk_jvmargs_big" >&6; }
65174
65175  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65176
65177
65178  # By default, the main javac compilations use big
65179  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65180
65181
65182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65183$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65184
65185  # Use serial gc for small short lived tools if possible
65186
65187  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65188  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65189  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65190  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65191  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65193    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65194    JVM_ARG_OK=true
65195  else
65196    $ECHO "Arg failed:" >&5
65197    $ECHO "$OUTPUT" >&5
65198    JVM_ARG_OK=false
65199  fi
65200
65201
65202  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65203  $ECHO "Command: $JAVA -Xms32M -version" >&5
65204  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65205  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65206  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65207  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65208    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65209    JVM_ARG_OK=true
65210  else
65211    $ECHO "Arg failed:" >&5
65212    $ECHO "$OUTPUT" >&5
65213    JVM_ARG_OK=false
65214  fi
65215
65216
65217  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65218  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65219  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65220  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65221  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65222  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65223    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65224    JVM_ARG_OK=true
65225  else
65226    $ECHO "Arg failed:" >&5
65227    $ECHO "$OUTPUT" >&5
65228    JVM_ARG_OK=false
65229  fi
65230
65231
65232  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65233  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65234  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65235  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65236  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65237  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65238    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65239    JVM_ARG_OK=true
65240  else
65241    $ECHO "Arg failed:" >&5
65242    $ECHO "$OUTPUT" >&5
65243    JVM_ARG_OK=false
65244  fi
65245
65246
65247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65248$as_echo "$boot_jdk_jvmargs_small" >&6; }
65249
65250  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65251
65252
65253  JAVA_TOOL_FLAGS_SMALL=""
65254  for f in $JAVA_FLAGS_SMALL; do
65255    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65256  done
65257
65258
65259
65260# Setup smart javac (after cores and memory have been setup)
65261
65262
65263# Check whether --with-sjavac-server-java was given.
65264if test "${with_sjavac_server_java+set}" = set; then :
65265  withval=$with_sjavac_server_java;
65266fi
65267
65268
65269  if test "x$with_sjavac_server_java" != x; then
65270    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65271    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65272    if test "x$FOUND_VERSION" = x; then
65273      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65274    fi
65275  else
65276    SJAVAC_SERVER_JAVA="$JAVA"
65277  fi
65278
65279
65280  if test "$MEMORY_SIZE" -gt "3000"; then
65281
65282  $ECHO "Check if jvm arg is ok: -d64" >&5
65283  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65284  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65285  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65286  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65287  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65288    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65289    JVM_ARG_OK=true
65290  else
65291    $ECHO "Arg failed:" >&5
65292    $ECHO "$OUTPUT" >&5
65293    JVM_ARG_OK=false
65294  fi
65295
65296    if test "$JVM_ARG_OK" = true; then
65297      JVM_64BIT=true
65298      JVM_ARG_OK=false
65299    fi
65300  fi
65301
65302  MX_VALUE=`expr $MEMORY_SIZE / 2`
65303  if test "$JVM_64BIT" = true; then
65304    # Set ms lower than mx since more than one instance of the server might
65305    # get launched at the same time before they figure out which instance won.
65306    MS_VALUE=512
65307    if test "$MX_VALUE" -gt "2048"; then
65308      MX_VALUE=2048
65309    fi
65310  else
65311    MS_VALUE=256
65312    if test "$MX_VALUE" -gt "1500"; then
65313      MX_VALUE=1500
65314    fi
65315  fi
65316  if test "$MX_VALUE" -lt "512"; then
65317    MX_VALUE=512
65318  fi
65319
65320  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65321  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65322  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65323  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65324  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65325  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65326    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65327    JVM_ARG_OK=true
65328  else
65329    $ECHO "Arg failed:" >&5
65330    $ECHO "$OUTPUT" >&5
65331    JVM_ARG_OK=false
65332  fi
65333
65334
65335
65336  # Check whether --enable-sjavac was given.
65337if test "${enable_sjavac+set}" = set; then :
65338  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65339else
65340  ENABLE_SJAVAC="no"
65341fi
65342
65343  if test "x$JVM_ARG_OK" = "xfalse"; then
65344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65345$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65346    ENABLE_SJAVAC="no"
65347  fi
65348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65349$as_echo_n "checking whether to use sjavac... " >&6; }
65350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65351$as_echo "$ENABLE_SJAVAC" >&6; }
65352
65353
65354  # Check whether --enable-javac-server was given.
65355if test "${enable_javac_server+set}" = set; then :
65356  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65357else
65358  ENABLE_JAVAC_SERVER="yes"
65359fi
65360
65361  if test "x$JVM_ARG_OK" = "xfalse"; then
65362    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65363$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65364    ENABLE_JAVAC_SERVER="no"
65365  fi
65366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65367$as_echo_n "checking whether to use javac server... " >&6; }
65368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65369$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65370
65371
65372  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65373    # When using a server javac, the small client instances do not need much
65374    # resources.
65375    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65376  fi
65377
65378
65379# Setup use of icecc if requested
65380
65381  # Check whether --enable-icecc was given.
65382if test "${enable_icecc+set}" = set; then :
65383  enableval=$enable_icecc;
65384fi
65385
65386
65387  if test "x${enable_icecc}" = "xyes"; then
65388
65389
65390
65391  # Publish this variable in the help.
65392
65393
65394  if [ -z "${ICECC_CMD+x}" ]; then
65395    # The variable is not set by user, try to locate tool using the code snippet
65396    for ac_prog in icecc
65397do
65398  # Extract the first word of "$ac_prog", so it can be a program name with args.
65399set dummy $ac_prog; ac_word=$2
65400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65401$as_echo_n "checking for $ac_word... " >&6; }
65402if ${ac_cv_path_ICECC_CMD+:} false; then :
65403  $as_echo_n "(cached) " >&6
65404else
65405  case $ICECC_CMD in
65406  [\\/]* | ?:[\\/]*)
65407  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65408  ;;
65409  *)
65410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65411for as_dir in $PATH
65412do
65413  IFS=$as_save_IFS
65414  test -z "$as_dir" && as_dir=.
65415    for ac_exec_ext in '' $ac_executable_extensions; do
65416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65417    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65419    break 2
65420  fi
65421done
65422  done
65423IFS=$as_save_IFS
65424
65425  ;;
65426esac
65427fi
65428ICECC_CMD=$ac_cv_path_ICECC_CMD
65429if test -n "$ICECC_CMD"; then
65430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65431$as_echo "$ICECC_CMD" >&6; }
65432else
65433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65434$as_echo "no" >&6; }
65435fi
65436
65437
65438  test -n "$ICECC_CMD" && break
65439done
65440
65441  else
65442    # The variable is set, but is it from the command line or the environment?
65443
65444    # Try to remove the string !ICECC_CMD! from our list.
65445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65447      # If it failed, the variable was not from the command line. Ignore it,
65448      # but warn the user (except for BASH, which is always set by the calling BASH).
65449      if test "xICECC_CMD" != xBASH; then
65450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65451$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65452      fi
65453      # Try to locate tool using the code snippet
65454      for ac_prog in icecc
65455do
65456  # Extract the first word of "$ac_prog", so it can be a program name with args.
65457set dummy $ac_prog; ac_word=$2
65458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65459$as_echo_n "checking for $ac_word... " >&6; }
65460if ${ac_cv_path_ICECC_CMD+:} false; then :
65461  $as_echo_n "(cached) " >&6
65462else
65463  case $ICECC_CMD in
65464  [\\/]* | ?:[\\/]*)
65465  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65466  ;;
65467  *)
65468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65469for as_dir in $PATH
65470do
65471  IFS=$as_save_IFS
65472  test -z "$as_dir" && as_dir=.
65473    for ac_exec_ext in '' $ac_executable_extensions; do
65474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65475    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65477    break 2
65478  fi
65479done
65480  done
65481IFS=$as_save_IFS
65482
65483  ;;
65484esac
65485fi
65486ICECC_CMD=$ac_cv_path_ICECC_CMD
65487if test -n "$ICECC_CMD"; then
65488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65489$as_echo "$ICECC_CMD" >&6; }
65490else
65491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65492$as_echo "no" >&6; }
65493fi
65494
65495
65496  test -n "$ICECC_CMD" && break
65497done
65498
65499    else
65500      # If it succeeded, then it was overridden by the user. We will use it
65501      # for the tool.
65502
65503      # First remove it from the list of overridden variables, so we can test
65504      # for unknown variables in the end.
65505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65506
65507      # Check if we try to supply an empty value
65508      if test "x$ICECC_CMD" = x; then
65509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65510$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65512$as_echo_n "checking for ICECC_CMD... " >&6; }
65513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65514$as_echo "disabled" >&6; }
65515      else
65516        # Check if the provided tool contains a complete path.
65517        tool_specified="$ICECC_CMD"
65518        tool_basename="${tool_specified##*/}"
65519        if test "x$tool_basename" = "x$tool_specified"; then
65520          # A command without a complete path is provided, search $PATH.
65521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65522$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65523          # Extract the first word of "$tool_basename", so it can be a program name with args.
65524set dummy $tool_basename; ac_word=$2
65525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65526$as_echo_n "checking for $ac_word... " >&6; }
65527if ${ac_cv_path_ICECC_CMD+:} false; then :
65528  $as_echo_n "(cached) " >&6
65529else
65530  case $ICECC_CMD in
65531  [\\/]* | ?:[\\/]*)
65532  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65533  ;;
65534  *)
65535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65536for as_dir in $PATH
65537do
65538  IFS=$as_save_IFS
65539  test -z "$as_dir" && as_dir=.
65540    for ac_exec_ext in '' $ac_executable_extensions; do
65541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65542    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65544    break 2
65545  fi
65546done
65547  done
65548IFS=$as_save_IFS
65549
65550  ;;
65551esac
65552fi
65553ICECC_CMD=$ac_cv_path_ICECC_CMD
65554if test -n "$ICECC_CMD"; then
65555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65556$as_echo "$ICECC_CMD" >&6; }
65557else
65558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65559$as_echo "no" >&6; }
65560fi
65561
65562
65563          if test "x$ICECC_CMD" = x; then
65564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65565          fi
65566        else
65567          # Otherwise we believe it is a complete path. Use it as it is.
65568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65569$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65571$as_echo_n "checking for ICECC_CMD... " >&6; }
65572          if test ! -x "$tool_specified"; then
65573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65574$as_echo "not found" >&6; }
65575            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65576          fi
65577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65578$as_echo "$tool_specified" >&6; }
65579        fi
65580      fi
65581    fi
65582
65583  fi
65584
65585
65586
65587  if test "x$ICECC_CMD" = x; then
65588    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65589  fi
65590
65591
65592    old_path="$PATH"
65593
65594    # Look for icecc-create-env in some known places
65595    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65596
65597
65598
65599  # Publish this variable in the help.
65600
65601
65602  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65603    # The variable is not set by user, try to locate tool using the code snippet
65604    for ac_prog in icecc-create-env
65605do
65606  # Extract the first word of "$ac_prog", so it can be a program name with args.
65607set dummy $ac_prog; ac_word=$2
65608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65609$as_echo_n "checking for $ac_word... " >&6; }
65610if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65611  $as_echo_n "(cached) " >&6
65612else
65613  case $ICECC_CREATE_ENV in
65614  [\\/]* | ?:[\\/]*)
65615  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65616  ;;
65617  *)
65618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65619for as_dir in $PATH
65620do
65621  IFS=$as_save_IFS
65622  test -z "$as_dir" && as_dir=.
65623    for ac_exec_ext in '' $ac_executable_extensions; do
65624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65625    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65627    break 2
65628  fi
65629done
65630  done
65631IFS=$as_save_IFS
65632
65633  ;;
65634esac
65635fi
65636ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65637if test -n "$ICECC_CREATE_ENV"; then
65638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65639$as_echo "$ICECC_CREATE_ENV" >&6; }
65640else
65641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65642$as_echo "no" >&6; }
65643fi
65644
65645
65646  test -n "$ICECC_CREATE_ENV" && break
65647done
65648
65649  else
65650    # The variable is set, but is it from the command line or the environment?
65651
65652    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65655      # If it failed, the variable was not from the command line. Ignore it,
65656      # but warn the user (except for BASH, which is always set by the calling BASH).
65657      if test "xICECC_CREATE_ENV" != xBASH; then
65658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65659$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65660      fi
65661      # Try to locate tool using the code snippet
65662      for ac_prog in icecc-create-env
65663do
65664  # Extract the first word of "$ac_prog", so it can be a program name with args.
65665set dummy $ac_prog; ac_word=$2
65666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65667$as_echo_n "checking for $ac_word... " >&6; }
65668if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65669  $as_echo_n "(cached) " >&6
65670else
65671  case $ICECC_CREATE_ENV in
65672  [\\/]* | ?:[\\/]*)
65673  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65674  ;;
65675  *)
65676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65677for as_dir in $PATH
65678do
65679  IFS=$as_save_IFS
65680  test -z "$as_dir" && as_dir=.
65681    for ac_exec_ext in '' $ac_executable_extensions; do
65682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65683    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65685    break 2
65686  fi
65687done
65688  done
65689IFS=$as_save_IFS
65690
65691  ;;
65692esac
65693fi
65694ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65695if test -n "$ICECC_CREATE_ENV"; then
65696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65697$as_echo "$ICECC_CREATE_ENV" >&6; }
65698else
65699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65700$as_echo "no" >&6; }
65701fi
65702
65703
65704  test -n "$ICECC_CREATE_ENV" && break
65705done
65706
65707    else
65708      # If it succeeded, then it was overridden by the user. We will use it
65709      # for the tool.
65710
65711      # First remove it from the list of overridden variables, so we can test
65712      # for unknown variables in the end.
65713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65714
65715      # Check if we try to supply an empty value
65716      if test "x$ICECC_CREATE_ENV" = x; then
65717        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65718$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65720$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65722$as_echo "disabled" >&6; }
65723      else
65724        # Check if the provided tool contains a complete path.
65725        tool_specified="$ICECC_CREATE_ENV"
65726        tool_basename="${tool_specified##*/}"
65727        if test "x$tool_basename" = "x$tool_specified"; then
65728          # A command without a complete path is provided, search $PATH.
65729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65730$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65731          # Extract the first word of "$tool_basename", so it can be a program name with args.
65732set dummy $tool_basename; ac_word=$2
65733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65734$as_echo_n "checking for $ac_word... " >&6; }
65735if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65736  $as_echo_n "(cached) " >&6
65737else
65738  case $ICECC_CREATE_ENV in
65739  [\\/]* | ?:[\\/]*)
65740  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65741  ;;
65742  *)
65743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65744for as_dir in $PATH
65745do
65746  IFS=$as_save_IFS
65747  test -z "$as_dir" && as_dir=.
65748    for ac_exec_ext in '' $ac_executable_extensions; do
65749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65750    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65752    break 2
65753  fi
65754done
65755  done
65756IFS=$as_save_IFS
65757
65758  ;;
65759esac
65760fi
65761ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65762if test -n "$ICECC_CREATE_ENV"; then
65763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65764$as_echo "$ICECC_CREATE_ENV" >&6; }
65765else
65766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65767$as_echo "no" >&6; }
65768fi
65769
65770
65771          if test "x$ICECC_CREATE_ENV" = x; then
65772            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65773          fi
65774        else
65775          # Otherwise we believe it is a complete path. Use it as it is.
65776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65777$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65779$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65780          if test ! -x "$tool_specified"; then
65781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65782$as_echo "not found" >&6; }
65783            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65784          fi
65785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65786$as_echo "$tool_specified" >&6; }
65787        fi
65788      fi
65789    fi
65790
65791  fi
65792
65793
65794
65795  if test "x$ICECC_CREATE_ENV" = x; then
65796    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65797  fi
65798
65799
65800    # Use icecc-create-env to create a minimal compilation environment that can
65801    # be sent to the other hosts in the icecream cluster.
65802    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65803    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65804    # Older versions of icecc does not have the --gcc parameter
65805    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65806      icecc_gcc_arg="--gcc"
65807    fi
65808    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65809
65810  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65811      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65812          ${icecc_create_env_log} 2>&1 )
65813  if test "$?" != "0"; then
65814    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65815$as_echo "$as_me: icecc-create-env output:" >&6;}
65816    cat \
65817          ${icecc_create_env_log}
65818    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65819  fi
65820
65821    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65822      # For clang, the icecc compilerwrapper is needed. It usually resides next
65823      # to icecc-create-env.
65824
65825
65826
65827  # Publish this variable in the help.
65828
65829
65830  if [ -z "${ICECC_WRAPPER+x}" ]; then
65831    # The variable is not set by user, try to locate tool using the code snippet
65832    for ac_prog in compilerwrapper
65833do
65834  # Extract the first word of "$ac_prog", so it can be a program name with args.
65835set dummy $ac_prog; ac_word=$2
65836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65837$as_echo_n "checking for $ac_word... " >&6; }
65838if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65839  $as_echo_n "(cached) " >&6
65840else
65841  case $ICECC_WRAPPER in
65842  [\\/]* | ?:[\\/]*)
65843  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65844  ;;
65845  *)
65846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65847for as_dir in $PATH
65848do
65849  IFS=$as_save_IFS
65850  test -z "$as_dir" && as_dir=.
65851    for ac_exec_ext in '' $ac_executable_extensions; do
65852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65853    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65855    break 2
65856  fi
65857done
65858  done
65859IFS=$as_save_IFS
65860
65861  ;;
65862esac
65863fi
65864ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65865if test -n "$ICECC_WRAPPER"; then
65866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65867$as_echo "$ICECC_WRAPPER" >&6; }
65868else
65869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65870$as_echo "no" >&6; }
65871fi
65872
65873
65874  test -n "$ICECC_WRAPPER" && break
65875done
65876
65877  else
65878    # The variable is set, but is it from the command line or the environment?
65879
65880    # Try to remove the string !ICECC_WRAPPER! from our list.
65881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65883      # If it failed, the variable was not from the command line. Ignore it,
65884      # but warn the user (except for BASH, which is always set by the calling BASH).
65885      if test "xICECC_WRAPPER" != xBASH; then
65886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65887$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65888      fi
65889      # Try to locate tool using the code snippet
65890      for ac_prog in compilerwrapper
65891do
65892  # Extract the first word of "$ac_prog", so it can be a program name with args.
65893set dummy $ac_prog; ac_word=$2
65894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65895$as_echo_n "checking for $ac_word... " >&6; }
65896if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65897  $as_echo_n "(cached) " >&6
65898else
65899  case $ICECC_WRAPPER in
65900  [\\/]* | ?:[\\/]*)
65901  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65902  ;;
65903  *)
65904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65905for as_dir in $PATH
65906do
65907  IFS=$as_save_IFS
65908  test -z "$as_dir" && as_dir=.
65909    for ac_exec_ext in '' $ac_executable_extensions; do
65910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65911    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65913    break 2
65914  fi
65915done
65916  done
65917IFS=$as_save_IFS
65918
65919  ;;
65920esac
65921fi
65922ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65923if test -n "$ICECC_WRAPPER"; then
65924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65925$as_echo "$ICECC_WRAPPER" >&6; }
65926else
65927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65928$as_echo "no" >&6; }
65929fi
65930
65931
65932  test -n "$ICECC_WRAPPER" && break
65933done
65934
65935    else
65936      # If it succeeded, then it was overridden by the user. We will use it
65937      # for the tool.
65938
65939      # First remove it from the list of overridden variables, so we can test
65940      # for unknown variables in the end.
65941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65942
65943      # Check if we try to supply an empty value
65944      if test "x$ICECC_WRAPPER" = x; then
65945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65946$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65948$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65950$as_echo "disabled" >&6; }
65951      else
65952        # Check if the provided tool contains a complete path.
65953        tool_specified="$ICECC_WRAPPER"
65954        tool_basename="${tool_specified##*/}"
65955        if test "x$tool_basename" = "x$tool_specified"; then
65956          # A command without a complete path is provided, search $PATH.
65957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65958$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65959          # Extract the first word of "$tool_basename", so it can be a program name with args.
65960set dummy $tool_basename; ac_word=$2
65961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65962$as_echo_n "checking for $ac_word... " >&6; }
65963if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65964  $as_echo_n "(cached) " >&6
65965else
65966  case $ICECC_WRAPPER in
65967  [\\/]* | ?:[\\/]*)
65968  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65969  ;;
65970  *)
65971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65972for as_dir in $PATH
65973do
65974  IFS=$as_save_IFS
65975  test -z "$as_dir" && as_dir=.
65976    for ac_exec_ext in '' $ac_executable_extensions; do
65977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65978    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65980    break 2
65981  fi
65982done
65983  done
65984IFS=$as_save_IFS
65985
65986  ;;
65987esac
65988fi
65989ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65990if test -n "$ICECC_WRAPPER"; then
65991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65992$as_echo "$ICECC_WRAPPER" >&6; }
65993else
65994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65995$as_echo "no" >&6; }
65996fi
65997
65998
65999          if test "x$ICECC_WRAPPER" = x; then
66000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66001          fi
66002        else
66003          # Otherwise we believe it is a complete path. Use it as it is.
66004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66005$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66007$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66008          if test ! -x "$tool_specified"; then
66009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66010$as_echo "not found" >&6; }
66011            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66012          fi
66013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66014$as_echo "$tool_specified" >&6; }
66015        fi
66016      fi
66017    fi
66018
66019  fi
66020
66021
66022
66023  if test "x$ICECC_WRAPPER" = x; then
66024    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66025  fi
66026
66027
66028
66029  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66030      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66031  if test "$?" != "0"; then
66032    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66033$as_echo "$as_me: icecc-create-env output:" >&6;}
66034    cat ${icecc_create_env_log}
66035    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66036  fi
66037
66038    else
66039      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66040    fi
66041    PATH="$old_path"
66042    # The bundle with the compiler gets a name based on checksums. Parse log file
66043    # to find it.
66044    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66045    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66046    if test ! -f ${ICECC_ENV_BUNDLE}; then
66047      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66048    fi
66049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66050$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66052$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66053    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66054
66055    if test "x${COMPILE_TYPE}" = "xcross"; then
66056      # If cross compiling, create a separate env package for the build compiler
66057      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66058      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66059      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66060
66061  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66062      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66063            ${icecc_create_env_log_build} 2>&1 )
66064  if test "$?" != "0"; then
66065    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66066$as_echo "$as_me: icecc-create-env output:" >&6;}
66067    cat \
66068            ${icecc_create_env_log_build}
66069    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66070  fi
66071
66072      elif test "x${BUILD_CC##*/}" = "xclang"; then
66073
66074  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66075      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66076  if test "$?" != "0"; then
66077    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66078$as_echo "$as_me: icecc-create-env output:" >&6;}
66079    cat ${icecc_create_env_log_build}
66080    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66081  fi
66082
66083      else
66084        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66085      fi
66086      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66087      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66088      if test ! -f ${ICECC_ENV_BUNDLE}; then
66089        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66090      fi
66091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66092$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66094$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66095      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66096          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66097    else
66098      BUILD_ICECC="${ICECC}"
66099    fi
66100
66101
66102  fi
66103
66104
66105# Can the C/C++ compiler use precompiled headers?
66106
66107
66108  ###############################################################################
66109  #
66110  # Can the C/C++ compiler use precompiled headers?
66111  #
66112  # Check whether --enable-precompiled-headers was given.
66113if test "${enable_precompiled_headers+set}" = set; then :
66114  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66115else
66116  ENABLE_PRECOMPH=yes
66117fi
66118
66119
66120  USE_PRECOMPILED_HEADER=1
66121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66122$as_echo_n "checking If precompiled header is enabled... " >&6; }
66123  if test "x$ENABLE_PRECOMPH" = xno; then
66124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66125$as_echo "no, forced" >&6; }
66126    USE_PRECOMPILED_HEADER=0
66127  elif test "x$ICECC" != "x"; then
66128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66129$as_echo "no, does not work effectively with icecc" >&6; }
66130    USE_PRECOMPILED_HEADER=0
66131  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66133$as_echo "no, does not work with Solaris Studio" >&6; }
66134    USE_PRECOMPILED_HEADER=0
66135  else
66136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66137$as_echo "yes" >&6; }
66138  fi
66139
66140  if test "x$ENABLE_PRECOMPH" = xyes; then
66141    # Check that the compiler actually supports precomp headers.
66142    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66144$as_echo_n "checking that precompiled headers work... " >&6; }
66145      echo "int alfa();" > conftest.h
66146      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66147      if test ! -f conftest.hpp.gch; then
66148        USE_PRECOMPILED_HEADER=0
66149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66150$as_echo "no" >&6; }
66151      else
66152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66153$as_echo "yes" >&6; }
66154      fi
66155      $RM conftest.h conftest.hpp.gch
66156    fi
66157  fi
66158
66159
66160
66161
66162# Setup use of ccache, if available
66163
66164  # Check whether --enable-ccache was given.
66165if test "${enable_ccache+set}" = set; then :
66166  enableval=$enable_ccache;
66167fi
66168
66169
66170  CCACHE=
66171  CCACHE_STATUS=
66172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66173$as_echo_n "checking is ccache enabled... " >&6; }
66174  if test "x$enable_ccache" = xyes; then
66175    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66177$as_echo "yes" >&6; }
66178      OLD_PATH="$PATH"
66179      if test "x$TOOLCHAIN_PATH" != x; then
66180        PATH=$TOOLCHAIN_PATH:$PATH
66181      fi
66182
66183
66184
66185  # Publish this variable in the help.
66186
66187
66188  if [ -z "${CCACHE+x}" ]; then
66189    # The variable is not set by user, try to locate tool using the code snippet
66190    for ac_prog in ccache
66191do
66192  # Extract the first word of "$ac_prog", so it can be a program name with args.
66193set dummy $ac_prog; ac_word=$2
66194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66195$as_echo_n "checking for $ac_word... " >&6; }
66196if ${ac_cv_path_CCACHE+:} false; then :
66197  $as_echo_n "(cached) " >&6
66198else
66199  case $CCACHE in
66200  [\\/]* | ?:[\\/]*)
66201  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66202  ;;
66203  *)
66204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66205for as_dir in $PATH
66206do
66207  IFS=$as_save_IFS
66208  test -z "$as_dir" && as_dir=.
66209    for ac_exec_ext in '' $ac_executable_extensions; do
66210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66211    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66213    break 2
66214  fi
66215done
66216  done
66217IFS=$as_save_IFS
66218
66219  ;;
66220esac
66221fi
66222CCACHE=$ac_cv_path_CCACHE
66223if test -n "$CCACHE"; then
66224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66225$as_echo "$CCACHE" >&6; }
66226else
66227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66228$as_echo "no" >&6; }
66229fi
66230
66231
66232  test -n "$CCACHE" && break
66233done
66234
66235  else
66236    # The variable is set, but is it from the command line or the environment?
66237
66238    # Try to remove the string !CCACHE! from our list.
66239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66241      # If it failed, the variable was not from the command line. Ignore it,
66242      # but warn the user (except for BASH, which is always set by the calling BASH).
66243      if test "xCCACHE" != xBASH; then
66244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66245$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66246      fi
66247      # Try to locate tool using the code snippet
66248      for ac_prog in ccache
66249do
66250  # Extract the first word of "$ac_prog", so it can be a program name with args.
66251set dummy $ac_prog; ac_word=$2
66252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66253$as_echo_n "checking for $ac_word... " >&6; }
66254if ${ac_cv_path_CCACHE+:} false; then :
66255  $as_echo_n "(cached) " >&6
66256else
66257  case $CCACHE in
66258  [\\/]* | ?:[\\/]*)
66259  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66260  ;;
66261  *)
66262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66263for as_dir in $PATH
66264do
66265  IFS=$as_save_IFS
66266  test -z "$as_dir" && as_dir=.
66267    for ac_exec_ext in '' $ac_executable_extensions; do
66268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66269    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66271    break 2
66272  fi
66273done
66274  done
66275IFS=$as_save_IFS
66276
66277  ;;
66278esac
66279fi
66280CCACHE=$ac_cv_path_CCACHE
66281if test -n "$CCACHE"; then
66282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66283$as_echo "$CCACHE" >&6; }
66284else
66285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66286$as_echo "no" >&6; }
66287fi
66288
66289
66290  test -n "$CCACHE" && break
66291done
66292
66293    else
66294      # If it succeeded, then it was overridden by the user. We will use it
66295      # for the tool.
66296
66297      # First remove it from the list of overridden variables, so we can test
66298      # for unknown variables in the end.
66299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66300
66301      # Check if we try to supply an empty value
66302      if test "x$CCACHE" = x; then
66303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66304$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66306$as_echo_n "checking for CCACHE... " >&6; }
66307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66308$as_echo "disabled" >&6; }
66309      else
66310        # Check if the provided tool contains a complete path.
66311        tool_specified="$CCACHE"
66312        tool_basename="${tool_specified##*/}"
66313        if test "x$tool_basename" = "x$tool_specified"; then
66314          # A command without a complete path is provided, search $PATH.
66315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66316$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66317          # Extract the first word of "$tool_basename", so it can be a program name with args.
66318set dummy $tool_basename; ac_word=$2
66319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66320$as_echo_n "checking for $ac_word... " >&6; }
66321if ${ac_cv_path_CCACHE+:} false; then :
66322  $as_echo_n "(cached) " >&6
66323else
66324  case $CCACHE in
66325  [\\/]* | ?:[\\/]*)
66326  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66327  ;;
66328  *)
66329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66330for as_dir in $PATH
66331do
66332  IFS=$as_save_IFS
66333  test -z "$as_dir" && as_dir=.
66334    for ac_exec_ext in '' $ac_executable_extensions; do
66335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66336    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66338    break 2
66339  fi
66340done
66341  done
66342IFS=$as_save_IFS
66343
66344  ;;
66345esac
66346fi
66347CCACHE=$ac_cv_path_CCACHE
66348if test -n "$CCACHE"; then
66349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66350$as_echo "$CCACHE" >&6; }
66351else
66352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66353$as_echo "no" >&6; }
66354fi
66355
66356
66357          if test "x$CCACHE" = x; then
66358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66359          fi
66360        else
66361          # Otherwise we believe it is a complete path. Use it as it is.
66362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66363$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66365$as_echo_n "checking for CCACHE... " >&6; }
66366          if test ! -x "$tool_specified"; then
66367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66368$as_echo "not found" >&6; }
66369            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66370          fi
66371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66372$as_echo "$tool_specified" >&6; }
66373        fi
66374      fi
66375    fi
66376
66377  fi
66378
66379
66380
66381  if test "x$CCACHE" = x; then
66382    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66383  fi
66384
66385
66386      PATH="$OLD_PATH"
66387      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66388      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66389    else
66390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66391$as_echo "no" >&6; }
66392      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66393$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66394    fi
66395  elif test "x$enable_ccache" = xno; then
66396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66397$as_echo "no, explicitly disabled" >&6; }
66398    CCACHE_STATUS="Disabled"
66399  elif test "x$enable_ccache" = x; then
66400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66401$as_echo "no" >&6; }
66402  else
66403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66404$as_echo "unknown" >&6; }
66405    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66406  fi
66407
66408
66409
66410# Check whether --with-ccache-dir was given.
66411if test "${with_ccache_dir+set}" = set; then :
66412  withval=$with_ccache_dir;
66413fi
66414
66415
66416  if test "x$with_ccache_dir" != x; then
66417    # When using a non home ccache directory, assume the use is to share ccache files
66418    # with other users. Thus change the umask.
66419    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66420    if test "x$CCACHE" = x; then
66421      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66422$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66423    fi
66424  fi
66425
66426  if test "x$CCACHE" != x; then
66427
66428  if test "x$CCACHE" != x; then
66429    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66430      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66431          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66432      if test "x$HAS_BAD_CCACHE" != "x"; then
66433        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66434      fi
66435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66436$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66437      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66438      PUSHED_FLAGS="$CXXFLAGS"
66439      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66440      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66441/* end confdefs.h.  */
66442
66443int
66444main ()
66445{
66446
66447  ;
66448  return 0;
66449}
66450_ACEOF
66451if ac_fn_cxx_try_compile "$LINENO"; then :
66452  CC_KNOWS_CCACHE_TRICK=yes
66453else
66454  CC_KNOWS_CCACHE_TRICK=no
66455fi
66456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66457      CXXFLAGS="$PUSHED_FLAGS"
66458      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66460$as_echo "yes" >&6; }
66461        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66462
66463        CCACHE_SLOPPINESS=pch_defines,time_macros
66464      else
66465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66466$as_echo "no" >&6; }
66467        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66468      fi
66469    fi
66470
66471    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66472        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66473
66474    if test "x$SET_CCACHE_DIR" != x; then
66475      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66476      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66477    fi
66478  fi
66479
66480  fi
66481
66482
66483###############################################################################
66484#
66485# And now the finish...
66486#
66487###############################################################################
66488
66489# Check for some common pitfalls
66490
66491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66492    file_to_test="$SRC_ROOT/LICENSE"
66493    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66494      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
66495    fi
66496  fi
66497
66498
66499  # Did user specify any unknown variables?
66500
66501  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66502    # Replace the separating ! with spaces before presenting for end user.
66503    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66504    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66505$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66506  fi
66507
66508
66509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66510$as_echo_n "checking if build directory is on local disk... " >&6; }
66511
66512  # df -l lists only local disks; if the given directory is not found then
66513  # a non-zero exit code is given
66514  if test "x$DF" = x; then
66515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66516      # msys does not have df; use Windows "net use" instead.
66517      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66518      if test "x$IS_NETWORK_DISK" = x; then
66519        OUTPUT_DIR_IS_LOCAL="yes"
66520      else
66521        OUTPUT_DIR_IS_LOCAL="no"
66522      fi
66523    else
66524      # No df here, say it's local
66525      OUTPUT_DIR_IS_LOCAL="yes"
66526    fi
66527  else
66528    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66529      OUTPUT_DIR_IS_LOCAL="yes"
66530    else
66531      OUTPUT_DIR_IS_LOCAL="no"
66532    fi
66533  fi
66534
66535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66536$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66537
66538
66539
66540  # Check if the user has any old-style ALT_ variables set.
66541  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66542
66543  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66544  # Since we can't properly handle the dependencies for this, warn the user about the situation
66545  if test -e $OUTPUT_ROOT/spec.gmk; then
66546    IS_RECONFIGURE=yes
66547  else
66548    IS_RECONFIGURE=no
66549  fi
66550
66551
66552# At the end, call the custom hook. (Dummy macro if no custom sources available)
66553
66554
66555# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66556
66557  # Keep feature lists sorted and free of duplicates
66558  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66559  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66560  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66561  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66562  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66563  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66564  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66565
66566  # Validate features
66567  for variant in $JVM_VARIANTS; do
66568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66569$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66570    features_var_name=JVM_FEATURES_$variant
66571    JVM_FEATURES_TO_TEST=${!features_var_name}
66572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66573$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66574    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66575    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66576    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66577    if test "x$INVALID_FEATURES" != x; then
66578      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66579    fi
66580  done
66581
66582
66583# We're messing a bit with internal autoconf variables to put the config.status
66584# in the output directory instead of the current directory.
66585CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66586
66587# Create the actual output files. Now the main work of configure is done.
66588cat >confcache <<\_ACEOF
66589# This file is a shell script that caches the results of configure
66590# tests run on this system so they can be shared between configure
66591# scripts and configure runs, see configure's option --config-cache.
66592# It is not useful on other systems.  If it contains results you don't
66593# want to keep, you may remove or edit it.
66594#
66595# config.status only pays attention to the cache file if you give it
66596# the --recheck option to rerun configure.
66597#
66598# `ac_cv_env_foo' variables (set or unset) will be overridden when
66599# loading this file, other *unset* `ac_cv_foo' will be assigned the
66600# following values.
66601
66602_ACEOF
66603
66604# The following way of writing the cache mishandles newlines in values,
66605# but we know of no workaround that is simple, portable, and efficient.
66606# So, we kill variables containing newlines.
66607# Ultrix sh set writes to stderr and can't be redirected directly,
66608# and sets the high bit in the cache file unless we assign to the vars.
66609(
66610  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66611    eval ac_val=\$$ac_var
66612    case $ac_val in #(
66613    *${as_nl}*)
66614      case $ac_var in #(
66615      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66616$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66617      esac
66618      case $ac_var in #(
66619      _ | IFS | as_nl) ;; #(
66620      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66621      *) { eval $ac_var=; unset $ac_var;} ;;
66622      esac ;;
66623    esac
66624  done
66625
66626  (set) 2>&1 |
66627    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66628    *${as_nl}ac_space=\ *)
66629      # `set' does not quote correctly, so add quotes: double-quote
66630      # substitution turns \\\\ into \\, and sed turns \\ into \.
66631      sed -n \
66632	"s/'/'\\\\''/g;
66633	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66634      ;; #(
66635    *)
66636      # `set' quotes correctly as required by POSIX, so do not add quotes.
66637      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66638      ;;
66639    esac |
66640    sort
66641) |
66642  sed '
66643     /^ac_cv_env_/b end
66644     t clear
66645     :clear
66646     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66647     t end
66648     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66649     :end' >>confcache
66650if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66651  if test -w "$cache_file"; then
66652    if test "x$cache_file" != "x/dev/null"; then
66653      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66654$as_echo "$as_me: updating cache $cache_file" >&6;}
66655      if test ! -f "$cache_file" || test -h "$cache_file"; then
66656	cat confcache >"$cache_file"
66657      else
66658        case $cache_file in #(
66659        */* | ?:*)
66660	  mv -f confcache "$cache_file"$$ &&
66661	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66662        *)
66663	  mv -f confcache "$cache_file" ;;
66664	esac
66665      fi
66666    fi
66667  else
66668    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66669$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66670  fi
66671fi
66672rm -f confcache
66673
66674test "x$prefix" = xNONE && prefix=$ac_default_prefix
66675# Let make expand exec_prefix.
66676test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66677
66678# Transform confdefs.h into DEFS.
66679# Protect against shell expansion while executing Makefile rules.
66680# Protect against Makefile macro expansion.
66681#
66682# If the first sed substitution is executed (which looks for macros that
66683# take arguments), then branch to the quote section.  Otherwise,
66684# look for a macro that doesn't take arguments.
66685ac_script='
66686:mline
66687/\\$/{
66688 N
66689 s,\\\n,,
66690 b mline
66691}
66692t clear
66693:clear
66694s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66695t quote
66696s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66697t quote
66698b any
66699:quote
66700s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66701s/\[/\\&/g
66702s/\]/\\&/g
66703s/\$/$$/g
66704H
66705:any
66706${
66707	g
66708	s/^\n//
66709	s/\n/ /g
66710	p
66711}
66712'
66713DEFS=`sed -n "$ac_script" confdefs.h`
66714
66715
66716ac_libobjs=
66717ac_ltlibobjs=
66718U=
66719for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66720  # 1. Remove the extension, and $U if already installed.
66721  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66722  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66723  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66724  #    will be set to the directory where LIBOBJS objects are built.
66725  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66726  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66727done
66728LIBOBJS=$ac_libobjs
66729
66730LTLIBOBJS=$ac_ltlibobjs
66731
66732
66733
66734: "${CONFIG_STATUS=./config.status}"
66735ac_write_fail=0
66736ac_clean_files_save=$ac_clean_files
66737ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66738{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66739$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66740as_write_fail=0
66741cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66742#! $SHELL
66743# Generated by $as_me.
66744# Run this file to recreate the current configuration.
66745# Compiler output produced by configure, useful for debugging
66746# configure, is in config.log if it exists.
66747
66748debug=false
66749ac_cs_recheck=false
66750ac_cs_silent=false
66751
66752SHELL=\${CONFIG_SHELL-$SHELL}
66753export SHELL
66754_ASEOF
66755cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66756## -------------------- ##
66757## M4sh Initialization. ##
66758## -------------------- ##
66759
66760# Be more Bourne compatible
66761DUALCASE=1; export DUALCASE # for MKS sh
66762if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66763  emulate sh
66764  NULLCMD=:
66765  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66766  # is contrary to our usage.  Disable this feature.
66767  alias -g '${1+"$@"}'='"$@"'
66768  setopt NO_GLOB_SUBST
66769else
66770  case `(set -o) 2>/dev/null` in #(
66771  *posix*) :
66772    set -o posix ;; #(
66773  *) :
66774     ;;
66775esac
66776fi
66777
66778
66779as_nl='
66780'
66781export as_nl
66782# Printing a long string crashes Solaris 7 /usr/bin/printf.
66783as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66784as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66785as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66786# Prefer a ksh shell builtin over an external printf program on Solaris,
66787# but without wasting forks for bash or zsh.
66788if test -z "$BASH_VERSION$ZSH_VERSION" \
66789    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66790  as_echo='print -r --'
66791  as_echo_n='print -rn --'
66792elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66793  as_echo='printf %s\n'
66794  as_echo_n='printf %s'
66795else
66796  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66797    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66798    as_echo_n='/usr/ucb/echo -n'
66799  else
66800    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66801    as_echo_n_body='eval
66802      arg=$1;
66803      case $arg in #(
66804      *"$as_nl"*)
66805	expr "X$arg" : "X\\(.*\\)$as_nl";
66806	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66807      esac;
66808      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66809    '
66810    export as_echo_n_body
66811    as_echo_n='sh -c $as_echo_n_body as_echo'
66812  fi
66813  export as_echo_body
66814  as_echo='sh -c $as_echo_body as_echo'
66815fi
66816
66817# The user is always right.
66818if test "${PATH_SEPARATOR+set}" != set; then
66819  PATH_SEPARATOR=:
66820  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66821    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66822      PATH_SEPARATOR=';'
66823  }
66824fi
66825
66826
66827# IFS
66828# We need space, tab and new line, in precisely that order.  Quoting is
66829# there to prevent editors from complaining about space-tab.
66830# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66831# splitting by setting IFS to empty value.)
66832IFS=" ""	$as_nl"
66833
66834# Find who we are.  Look in the path if we contain no directory separator.
66835as_myself=
66836case $0 in #((
66837  *[\\/]* ) as_myself=$0 ;;
66838  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66839for as_dir in $PATH
66840do
66841  IFS=$as_save_IFS
66842  test -z "$as_dir" && as_dir=.
66843    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66844  done
66845IFS=$as_save_IFS
66846
66847     ;;
66848esac
66849# We did not find ourselves, most probably we were run as `sh COMMAND'
66850# in which case we are not to be found in the path.
66851if test "x$as_myself" = x; then
66852  as_myself=$0
66853fi
66854if test ! -f "$as_myself"; then
66855  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66856  exit 1
66857fi
66858
66859# Unset variables that we do not need and which cause bugs (e.g. in
66860# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66861# suppresses any "Segmentation fault" message there.  '((' could
66862# trigger a bug in pdksh 5.2.14.
66863for as_var in BASH_ENV ENV MAIL MAILPATH
66864do eval test x\${$as_var+set} = xset \
66865  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66866done
66867PS1='$ '
66868PS2='> '
66869PS4='+ '
66870
66871# NLS nuisances.
66872LC_ALL=C
66873export LC_ALL
66874LANGUAGE=C
66875export LANGUAGE
66876
66877# CDPATH.
66878(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66879
66880
66881# as_fn_error STATUS ERROR [LINENO LOG_FD]
66882# ----------------------------------------
66883# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66884# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66885# script with STATUS, using 1 if that was 0.
66886as_fn_error ()
66887{
66888  as_status=$1; test $as_status -eq 0 && as_status=1
66889  if test "$4"; then
66890    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66891    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66892  fi
66893  $as_echo "$as_me: error: $2" >&2
66894  as_fn_exit $as_status
66895} # as_fn_error
66896
66897
66898# as_fn_set_status STATUS
66899# -----------------------
66900# Set $? to STATUS, without forking.
66901as_fn_set_status ()
66902{
66903  return $1
66904} # as_fn_set_status
66905
66906# as_fn_exit STATUS
66907# -----------------
66908# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66909as_fn_exit ()
66910{
66911  set +e
66912  as_fn_set_status $1
66913  exit $1
66914} # as_fn_exit
66915
66916# as_fn_unset VAR
66917# ---------------
66918# Portably unset VAR.
66919as_fn_unset ()
66920{
66921  { eval $1=; unset $1;}
66922}
66923as_unset=as_fn_unset
66924# as_fn_append VAR VALUE
66925# ----------------------
66926# Append the text in VALUE to the end of the definition contained in VAR. Take
66927# advantage of any shell optimizations that allow amortized linear growth over
66928# repeated appends, instead of the typical quadratic growth present in naive
66929# implementations.
66930if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66931  eval 'as_fn_append ()
66932  {
66933    eval $1+=\$2
66934  }'
66935else
66936  as_fn_append ()
66937  {
66938    eval $1=\$$1\$2
66939  }
66940fi # as_fn_append
66941
66942# as_fn_arith ARG...
66943# ------------------
66944# Perform arithmetic evaluation on the ARGs, and store the result in the
66945# global $as_val. Take advantage of shells that can avoid forks. The arguments
66946# must be portable across $(()) and expr.
66947if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66948  eval 'as_fn_arith ()
66949  {
66950    as_val=$(( $* ))
66951  }'
66952else
66953  as_fn_arith ()
66954  {
66955    as_val=`expr "$@" || test $? -eq 1`
66956  }
66957fi # as_fn_arith
66958
66959
66960if expr a : '\(a\)' >/dev/null 2>&1 &&
66961   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66962  as_expr=expr
66963else
66964  as_expr=false
66965fi
66966
66967if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66968  as_basename=basename
66969else
66970  as_basename=false
66971fi
66972
66973if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66974  as_dirname=dirname
66975else
66976  as_dirname=false
66977fi
66978
66979as_me=`$as_basename -- "$0" ||
66980$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66981	 X"$0" : 'X\(//\)$' \| \
66982	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66983$as_echo X/"$0" |
66984    sed '/^.*\/\([^/][^/]*\)\/*$/{
66985	    s//\1/
66986	    q
66987	  }
66988	  /^X\/\(\/\/\)$/{
66989	    s//\1/
66990	    q
66991	  }
66992	  /^X\/\(\/\).*/{
66993	    s//\1/
66994	    q
66995	  }
66996	  s/.*/./; q'`
66997
66998# Avoid depending upon Character Ranges.
66999as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67000as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67001as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67002as_cr_digits='0123456789'
67003as_cr_alnum=$as_cr_Letters$as_cr_digits
67004
67005ECHO_C= ECHO_N= ECHO_T=
67006case `echo -n x` in #(((((
67007-n*)
67008  case `echo 'xy\c'` in
67009  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67010  xy)  ECHO_C='\c';;
67011  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67012       ECHO_T='	';;
67013  esac;;
67014*)
67015  ECHO_N='-n';;
67016esac
67017
67018rm -f conf$$ conf$$.exe conf$$.file
67019if test -d conf$$.dir; then
67020  rm -f conf$$.dir/conf$$.file
67021else
67022  rm -f conf$$.dir
67023  mkdir conf$$.dir 2>/dev/null
67024fi
67025if (echo >conf$$.file) 2>/dev/null; then
67026  if ln -s conf$$.file conf$$ 2>/dev/null; then
67027    as_ln_s='ln -s'
67028    # ... but there are two gotchas:
67029    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67030    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67031    # In both cases, we have to default to `cp -pR'.
67032    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67033      as_ln_s='cp -pR'
67034  elif ln conf$$.file conf$$ 2>/dev/null; then
67035    as_ln_s=ln
67036  else
67037    as_ln_s='cp -pR'
67038  fi
67039else
67040  as_ln_s='cp -pR'
67041fi
67042rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67043rmdir conf$$.dir 2>/dev/null
67044
67045
67046# as_fn_mkdir_p
67047# -------------
67048# Create "$as_dir" as a directory, including parents if necessary.
67049as_fn_mkdir_p ()
67050{
67051
67052  case $as_dir in #(
67053  -*) as_dir=./$as_dir;;
67054  esac
67055  test -d "$as_dir" || eval $as_mkdir_p || {
67056    as_dirs=
67057    while :; do
67058      case $as_dir in #(
67059      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67060      *) as_qdir=$as_dir;;
67061      esac
67062      as_dirs="'$as_qdir' $as_dirs"
67063      as_dir=`$as_dirname -- "$as_dir" ||
67064$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67065	 X"$as_dir" : 'X\(//\)[^/]' \| \
67066	 X"$as_dir" : 'X\(//\)$' \| \
67067	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67068$as_echo X"$as_dir" |
67069    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67070	    s//\1/
67071	    q
67072	  }
67073	  /^X\(\/\/\)[^/].*/{
67074	    s//\1/
67075	    q
67076	  }
67077	  /^X\(\/\/\)$/{
67078	    s//\1/
67079	    q
67080	  }
67081	  /^X\(\/\).*/{
67082	    s//\1/
67083	    q
67084	  }
67085	  s/.*/./; q'`
67086      test -d "$as_dir" && break
67087    done
67088    test -z "$as_dirs" || eval "mkdir $as_dirs"
67089  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67090
67091
67092} # as_fn_mkdir_p
67093if mkdir -p . 2>/dev/null; then
67094  as_mkdir_p='mkdir -p "$as_dir"'
67095else
67096  test -d ./-p && rmdir ./-p
67097  as_mkdir_p=false
67098fi
67099
67100
67101# as_fn_executable_p FILE
67102# -----------------------
67103# Test if FILE is an executable regular file.
67104as_fn_executable_p ()
67105{
67106  test -f "$1" && test -x "$1"
67107} # as_fn_executable_p
67108as_test_x='test -x'
67109as_executable_p=as_fn_executable_p
67110
67111# Sed expression to map a string onto a valid CPP name.
67112as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67113
67114# Sed expression to map a string onto a valid variable name.
67115as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67116
67117
67118exec 6>&1
67119## ----------------------------------- ##
67120## Main body of $CONFIG_STATUS script. ##
67121## ----------------------------------- ##
67122_ASEOF
67123test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67124
67125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67126# Save the log message, to keep $0 and so on meaningful, and to
67127# report actual input values of CONFIG_FILES etc. instead of their
67128# values after options handling.
67129ac_log="
67130This file was extended by OpenJDK $as_me jdk9, which was
67131generated by GNU Autoconf 2.69.  Invocation command line was
67132
67133  CONFIG_FILES    = $CONFIG_FILES
67134  CONFIG_HEADERS  = $CONFIG_HEADERS
67135  CONFIG_LINKS    = $CONFIG_LINKS
67136  CONFIG_COMMANDS = $CONFIG_COMMANDS
67137  $ $0 $@
67138
67139on `(hostname || uname -n) 2>/dev/null | sed 1q`
67140"
67141
67142_ACEOF
67143
67144case $ac_config_files in *"
67145"*) set x $ac_config_files; shift; ac_config_files=$*;;
67146esac
67147
67148
67149
67150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67151# Files that config.status was made for.
67152config_files="$ac_config_files"
67153
67154_ACEOF
67155
67156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67157ac_cs_usage="\
67158\`$as_me' instantiates files and other configuration actions
67159from templates according to the current configuration.  Unless the files
67160and actions are specified as TAGs, all are instantiated by default.
67161
67162Usage: $0 [OPTION]... [TAG]...
67163
67164  -h, --help       print this help, then exit
67165  -V, --version    print version number and configuration settings, then exit
67166      --config     print configuration, then exit
67167  -q, --quiet, --silent
67168                   do not print progress messages
67169  -d, --debug      don't remove temporary files
67170      --recheck    update $as_me by reconfiguring in the same conditions
67171      --file=FILE[:TEMPLATE]
67172                   instantiate the configuration file FILE
67173
67174Configuration files:
67175$config_files
67176
67177Report bugs to <build-dev@openjdk.java.net>.
67178OpenJDK home page: <http://openjdk.java.net>."
67179
67180_ACEOF
67181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67182ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67183ac_cs_version="\\
67184OpenJDK config.status jdk9
67185configured by $0, generated by GNU Autoconf 2.69,
67186  with options \\"\$ac_cs_config\\"
67187
67188Copyright (C) 2012 Free Software Foundation, Inc.
67189This config.status script is free software; the Free Software Foundation
67190gives unlimited permission to copy, distribute and modify it."
67191
67192ac_pwd='$ac_pwd'
67193srcdir='$srcdir'
67194AWK='$AWK'
67195test -n "\$AWK" || AWK=awk
67196_ACEOF
67197
67198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67199# The default lists apply if the user does not specify any file.
67200ac_need_defaults=:
67201while test $# != 0
67202do
67203  case $1 in
67204  --*=?*)
67205    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67206    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67207    ac_shift=:
67208    ;;
67209  --*=)
67210    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67211    ac_optarg=
67212    ac_shift=:
67213    ;;
67214  *)
67215    ac_option=$1
67216    ac_optarg=$2
67217    ac_shift=shift
67218    ;;
67219  esac
67220
67221  case $ac_option in
67222  # Handling of the options.
67223  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67224    ac_cs_recheck=: ;;
67225  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67226    $as_echo "$ac_cs_version"; exit ;;
67227  --config | --confi | --conf | --con | --co | --c )
67228    $as_echo "$ac_cs_config"; exit ;;
67229  --debug | --debu | --deb | --de | --d | -d )
67230    debug=: ;;
67231  --file | --fil | --fi | --f )
67232    $ac_shift
67233    case $ac_optarg in
67234    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67235    '') as_fn_error $? "missing file argument" ;;
67236    esac
67237    as_fn_append CONFIG_FILES " '$ac_optarg'"
67238    ac_need_defaults=false;;
67239  --he | --h |  --help | --hel | -h )
67240    $as_echo "$ac_cs_usage"; exit ;;
67241  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67242  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67243    ac_cs_silent=: ;;
67244
67245  # This is an error.
67246  -*) as_fn_error $? "unrecognized option: \`$1'
67247Try \`$0 --help' for more information." ;;
67248
67249  *) as_fn_append ac_config_targets " $1"
67250     ac_need_defaults=false ;;
67251
67252  esac
67253  shift
67254done
67255
67256ac_configure_extra_args=
67257
67258if $ac_cs_silent; then
67259  exec 6>/dev/null
67260  ac_configure_extra_args="$ac_configure_extra_args --silent"
67261fi
67262
67263_ACEOF
67264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67265if \$ac_cs_recheck; then
67266  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67267  shift
67268  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67269  CONFIG_SHELL='$SHELL'
67270  export CONFIG_SHELL
67271  exec "\$@"
67272fi
67273
67274_ACEOF
67275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67276exec 5>>config.log
67277{
67278  echo
67279  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67280## Running $as_me. ##
67281_ASBOX
67282  $as_echo "$ac_log"
67283} >&5
67284
67285_ACEOF
67286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67287_ACEOF
67288
67289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67290
67291# Handling of arguments.
67292for ac_config_target in $ac_config_targets
67293do
67294  case $ac_config_target in
67295    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67296    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67297    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67298    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67299    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67300
67301  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67302  esac
67303done
67304
67305
67306# If the user did not use the arguments to specify the items to instantiate,
67307# then the envvar interface is used.  Set only those that are not.
67308# We use the long form for the default assignment because of an extremely
67309# bizarre bug on SunOS 4.1.3.
67310if $ac_need_defaults; then
67311  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67312fi
67313
67314# Have a temporary directory for convenience.  Make it in the build tree
67315# simply because there is no reason against having it here, and in addition,
67316# creating and moving files from /tmp can sometimes cause problems.
67317# Hook for its removal unless debugging.
67318# Note that there is a small window in which the directory will not be cleaned:
67319# after its creation but before its name has been assigned to `$tmp'.
67320$debug ||
67321{
67322  tmp= ac_tmp=
67323  trap 'exit_status=$?
67324  : "${ac_tmp:=$tmp}"
67325  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67326' 0
67327  trap 'as_fn_exit 1' 1 2 13 15
67328}
67329# Create a (secure) tmp directory for tmp files.
67330
67331{
67332  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67333  test -d "$tmp"
67334}  ||
67335{
67336  tmp=./conf$$-$RANDOM
67337  (umask 077 && mkdir "$tmp")
67338} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67339ac_tmp=$tmp
67340
67341# Set up the scripts for CONFIG_FILES section.
67342# No need to generate them if there are no CONFIG_FILES.
67343# This happens for instance with `./config.status config.h'.
67344if test -n "$CONFIG_FILES"; then
67345
67346
67347ac_cr=`echo X | tr X '\015'`
67348# On cygwin, bash can eat \r inside `` if the user requested igncr.
67349# But we know of no other shell where ac_cr would be empty at this
67350# point, so we can use a bashism as a fallback.
67351if test "x$ac_cr" = x; then
67352  eval ac_cr=\$\'\\r\'
67353fi
67354ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67355if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67356  ac_cs_awk_cr='\\r'
67357else
67358  ac_cs_awk_cr=$ac_cr
67359fi
67360
67361echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67362_ACEOF
67363
67364
67365{
67366  echo "cat >conf$$subs.awk <<_ACEOF" &&
67367  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67368  echo "_ACEOF"
67369} >conf$$subs.sh ||
67370  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67371ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67372ac_delim='%!_!# '
67373for ac_last_try in false false false false false :; do
67374  . ./conf$$subs.sh ||
67375    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67376
67377  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67378  if test $ac_delim_n = $ac_delim_num; then
67379    break
67380  elif $ac_last_try; then
67381    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67382  else
67383    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67384  fi
67385done
67386rm -f conf$$subs.sh
67387
67388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67389cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67390_ACEOF
67391sed -n '
67392h
67393s/^/S["/; s/!.*/"]=/
67394p
67395g
67396s/^[^!]*!//
67397:repl
67398t repl
67399s/'"$ac_delim"'$//
67400t delim
67401:nl
67402h
67403s/\(.\{148\}\)..*/\1/
67404t more1
67405s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67406p
67407n
67408b repl
67409:more1
67410s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67411p
67412g
67413s/.\{148\}//
67414t nl
67415:delim
67416h
67417s/\(.\{148\}\)..*/\1/
67418t more2
67419s/["\\]/\\&/g; s/^/"/; s/$/"/
67420p
67421b
67422:more2
67423s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67424p
67425g
67426s/.\{148\}//
67427t delim
67428' <conf$$subs.awk | sed '
67429/^[^""]/{
67430  N
67431  s/\n//
67432}
67433' >>$CONFIG_STATUS || ac_write_fail=1
67434rm -f conf$$subs.awk
67435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67436_ACAWK
67437cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67438  for (key in S) S_is_set[key] = 1
67439  FS = ""
67440
67441}
67442{
67443  line = $ 0
67444  nfields = split(line, field, "@")
67445  substed = 0
67446  len = length(field[1])
67447  for (i = 2; i < nfields; i++) {
67448    key = field[i]
67449    keylen = length(key)
67450    if (S_is_set[key]) {
67451      value = S[key]
67452      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67453      len += length(value) + length(field[++i])
67454      substed = 1
67455    } else
67456      len += 1 + keylen
67457  }
67458
67459  print line
67460}
67461
67462_ACAWK
67463_ACEOF
67464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67465if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67466  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67467else
67468  cat
67469fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67470  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67471_ACEOF
67472
67473# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67474# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67475# trailing colons and then remove the whole line if VPATH becomes empty
67476# (actually we leave an empty line to preserve line numbers).
67477if test "x$srcdir" = x.; then
67478  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67479h
67480s///
67481s/^/:/
67482s/[	 ]*$/:/
67483s/:\$(srcdir):/:/g
67484s/:\${srcdir}:/:/g
67485s/:@srcdir@:/:/g
67486s/^:*//
67487s/:*$//
67488x
67489s/\(=[	 ]*\).*/\1/
67490G
67491s/\n//
67492s/^[^=]*=[	 ]*$//
67493}'
67494fi
67495
67496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67497fi # test -n "$CONFIG_FILES"
67498
67499
67500eval set X "  :F $CONFIG_FILES      "
67501shift
67502for ac_tag
67503do
67504  case $ac_tag in
67505  :[FHLC]) ac_mode=$ac_tag; continue;;
67506  esac
67507  case $ac_mode$ac_tag in
67508  :[FHL]*:*);;
67509  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67510  :[FH]-) ac_tag=-:-;;
67511  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67512  esac
67513  ac_save_IFS=$IFS
67514  IFS=:
67515  set x $ac_tag
67516  IFS=$ac_save_IFS
67517  shift
67518  ac_file=$1
67519  shift
67520
67521  case $ac_mode in
67522  :L) ac_source=$1;;
67523  :[FH])
67524    ac_file_inputs=
67525    for ac_f
67526    do
67527      case $ac_f in
67528      -) ac_f="$ac_tmp/stdin";;
67529      *) # Look for the file first in the build tree, then in the source tree
67530	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67531	 # because $ac_f cannot contain `:'.
67532	 test -f "$ac_f" ||
67533	   case $ac_f in
67534	   [\\/$]*) false;;
67535	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67536	   esac ||
67537	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67538      esac
67539      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67540      as_fn_append ac_file_inputs " '$ac_f'"
67541    done
67542
67543    # Let's still pretend it is `configure' which instantiates (i.e., don't
67544    # use $as_me), people would be surprised to read:
67545    #    /* config.h.  Generated by config.status.  */
67546    configure_input='Generated from '`
67547	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67548	`' by configure.'
67549    if test x"$ac_file" != x-; then
67550      configure_input="$ac_file.  $configure_input"
67551      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67552$as_echo "$as_me: creating $ac_file" >&6;}
67553    fi
67554    # Neutralize special characters interpreted by sed in replacement strings.
67555    case $configure_input in #(
67556    *\&* | *\|* | *\\* )
67557       ac_sed_conf_input=`$as_echo "$configure_input" |
67558       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67559    *) ac_sed_conf_input=$configure_input;;
67560    esac
67561
67562    case $ac_tag in
67563    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67564      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67565    esac
67566    ;;
67567  esac
67568
67569  ac_dir=`$as_dirname -- "$ac_file" ||
67570$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67571	 X"$ac_file" : 'X\(//\)[^/]' \| \
67572	 X"$ac_file" : 'X\(//\)$' \| \
67573	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67574$as_echo X"$ac_file" |
67575    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67576	    s//\1/
67577	    q
67578	  }
67579	  /^X\(\/\/\)[^/].*/{
67580	    s//\1/
67581	    q
67582	  }
67583	  /^X\(\/\/\)$/{
67584	    s//\1/
67585	    q
67586	  }
67587	  /^X\(\/\).*/{
67588	    s//\1/
67589	    q
67590	  }
67591	  s/.*/./; q'`
67592  as_dir="$ac_dir"; as_fn_mkdir_p
67593  ac_builddir=.
67594
67595case "$ac_dir" in
67596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67597*)
67598  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67599  # A ".." for each directory in $ac_dir_suffix.
67600  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67601  case $ac_top_builddir_sub in
67602  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67603  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67604  esac ;;
67605esac
67606ac_abs_top_builddir=$ac_pwd
67607ac_abs_builddir=$ac_pwd$ac_dir_suffix
67608# for backward compatibility:
67609ac_top_builddir=$ac_top_build_prefix
67610
67611case $srcdir in
67612  .)  # We are building in place.
67613    ac_srcdir=.
67614    ac_top_srcdir=$ac_top_builddir_sub
67615    ac_abs_top_srcdir=$ac_pwd ;;
67616  [\\/]* | ?:[\\/]* )  # Absolute name.
67617    ac_srcdir=$srcdir$ac_dir_suffix;
67618    ac_top_srcdir=$srcdir
67619    ac_abs_top_srcdir=$srcdir ;;
67620  *) # Relative name.
67621    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67622    ac_top_srcdir=$ac_top_build_prefix$srcdir
67623    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67624esac
67625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67626
67627
67628  case $ac_mode in
67629  :F)
67630  #
67631  # CONFIG_FILE
67632  #
67633
67634_ACEOF
67635
67636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67637# If the template does not know about datarootdir, expand it.
67638# FIXME: This hack should be removed a few years after 2.60.
67639ac_datarootdir_hack=; ac_datarootdir_seen=
67640ac_sed_dataroot='
67641/datarootdir/ {
67642  p
67643  q
67644}
67645/@datadir@/p
67646/@docdir@/p
67647/@infodir@/p
67648/@localedir@/p
67649/@mandir@/p'
67650case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67651*datarootdir*) ac_datarootdir_seen=yes;;
67652*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67653  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67654$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67655_ACEOF
67656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67657  ac_datarootdir_hack='
67658  s&@datadir@&$datadir&g
67659  s&@docdir@&$docdir&g
67660  s&@infodir@&$infodir&g
67661  s&@localedir@&$localedir&g
67662  s&@mandir@&$mandir&g
67663  s&\\\${datarootdir}&$datarootdir&g' ;;
67664esac
67665_ACEOF
67666
67667# Neutralize VPATH when `$srcdir' = `.'.
67668# Shell code in configure.ac might set extrasub.
67669# FIXME: do we really want to maintain this feature?
67670cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67671ac_sed_extra="$ac_vpsub
67672$extrasub
67673_ACEOF
67674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67675:t
67676/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67677s|@configure_input@|$ac_sed_conf_input|;t t
67678s&@top_builddir@&$ac_top_builddir_sub&;t t
67679s&@top_build_prefix@&$ac_top_build_prefix&;t t
67680s&@srcdir@&$ac_srcdir&;t t
67681s&@abs_srcdir@&$ac_abs_srcdir&;t t
67682s&@top_srcdir@&$ac_top_srcdir&;t t
67683s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67684s&@builddir@&$ac_builddir&;t t
67685s&@abs_builddir@&$ac_abs_builddir&;t t
67686s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67687$ac_datarootdir_hack
67688"
67689eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67690  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67691
67692test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67693  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67694  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67695      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67696  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67697which seems to be undefined.  Please make sure it is defined" >&5
67698$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67699which seems to be undefined.  Please make sure it is defined" >&2;}
67700
67701  rm -f "$ac_tmp/stdin"
67702  case $ac_file in
67703  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67704  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67705  esac \
67706  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67707 ;;
67708
67709
67710
67711  esac
67712
67713done # for ac_tag
67714
67715
67716as_fn_exit 0
67717_ACEOF
67718ac_clean_files=$ac_clean_files_save
67719
67720test $ac_write_fail = 0 ||
67721  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67722
67723
67724# configure is writing to config.log, and then calls config.status.
67725# config.status does its own redirection, appending to config.log.
67726# Unfortunately, on DOS this fails, as config.log is still kept open
67727# by configure, so config.status won't be able to write to it; its
67728# output is simply discarded.  So we exec the FD to /dev/null,
67729# effectively closing config.log, so it can be properly (re)opened and
67730# appended to by config.status.  When coming back to configure, we
67731# need to make the FD available again.
67732if test "$no_create" != yes; then
67733  ac_cs_success=:
67734  ac_config_status_args=
67735  test "$silent" = yes &&
67736    ac_config_status_args="$ac_config_status_args --quiet"
67737  exec 5>/dev/null
67738  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67739  exec 5>>config.log
67740  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67741  # would make configure fail if this is the last instruction.
67742  $ac_cs_success || as_fn_exit 1
67743fi
67744if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67745  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67746$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67747fi
67748
67749
67750# After AC_OUTPUT, we need to do final work
67751
67752
67753  # Try to move config.log (generated by autoconf) to the configure-support directory.
67754  if test -e ./config.log; then
67755    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67756  fi
67757
67758  # Rotate our log file (configure.log)
67759  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67760    $RM -f "$OUTPUT_ROOT/configure.log.old"
67761  fi
67762  if test -e "$OUTPUT_ROOT/configure.log"; then
67763    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67764  fi
67765
67766  # Move configure.log from current directory to the build output root
67767  if test -e ./configure.log; then
67768    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67769  fi
67770
67771  # Make the compare script executable
67772  $CHMOD +x $OUTPUT_ROOT/compare.sh
67773
67774
67775# Finally output some useful information to the user
67776
67777  # Finally output some useful information to the user
67778
67779  printf "\n"
67780  printf "====================================================\n"
67781  if test "x$no_create" != "xyes"; then
67782    if test "x$IS_RECONFIGURE" != "xyes"; then
67783      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67784    else
67785      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67786    fi
67787  else
67788    if test "x$IS_RECONFIGURE" != "xyes"; then
67789      printf "A configuration has been successfully checked but not created\n"
67790    else
67791      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67792    fi
67793  fi
67794  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67795    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67796  else
67797    printf "using default settings.\n"
67798  fi
67799
67800  printf "\n"
67801  printf "Configuration summary:\n"
67802  printf "* Debug level:    $DEBUG_LEVEL\n"
67803  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67804  printf "* JDK variant:    $JDK_VARIANT\n"
67805  printf "* JVM variants:   $JVM_VARIANTS\n"
67806  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67807  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67808
67809  printf "\n"
67810  printf "Tools summary:\n"
67811  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67812    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67813  fi
67814  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67815  if test "x$TOOLCHAIN_VERSION" != "x"; then
67816    print_version=" $TOOLCHAIN_VERSION"
67817  fi
67818  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67819  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67820  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67821
67822  printf "\n"
67823  printf "Build performance summary:\n"
67824  printf "* Cores to use:   $JOBS\n"
67825  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67826  if test "x$CCACHE_STATUS" != "x"; then
67827    printf "* ccache status:  $CCACHE_STATUS\n"
67828  fi
67829  printf "\n"
67830
67831  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67832    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67833    printf "will result in longer build times.\n"
67834    printf "\n"
67835  fi
67836
67837  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67838    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67839    printf "These are not respected, and will be ignored. It is recommended\n"
67840    printf "that you clean your environment. The following variables are set:\n"
67841    printf "$FOUND_ALT_VARIABLES\n"
67842    printf "\n"
67843  fi
67844
67845  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67846    printf "WARNING: Your build output directory is not on a local disk.\n"
67847    printf "This will severely degrade build performance!\n"
67848    printf "It is recommended that you create an output directory on a local disk,\n"
67849    printf "and run the configure script again from that directory.\n"
67850    printf "\n"
67851  fi
67852
67853  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67854    printf "WARNING: The result of this configuration has overridden an older\n"
67855    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67856    printf "proper build. Failure to do so might result in strange build problems.\n"
67857    printf "\n"
67858  fi
67859
67860  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67861    printf "WARNING: The result of this configuration was not saved.\n"
67862    printf "You should run without '--no-create | -n' to create the configuration.\n"
67863    printf "\n"
67864  fi
67865
67866
67867
67868  # Locate config.log.
67869  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67870    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67871  elif test -e "./config.log"; then
67872    CONFIG_LOG_PATH="."
67873  fi
67874
67875  if test -e "$CONFIG_LOG_PATH/config.log"; then
67876    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67877    if test $? -eq 0; then
67878      printf "The following warnings were produced. Repeated here for convenience:\n"
67879      # We must quote sed expression (using []) to stop m4 from eating the [].
67880      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67881      printf "\n"
67882    fi
67883  fi
67884
67885