generated-configure.sh revision 2349:c8b7d9eb4aa1
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIP
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969VALID_JVM_VARIANTS
970JVM_VARIANTS
971DEBUG_LEVEL
972HOTSPOT_DEBUG_LEVEL
973JDK_VARIANT
974USERNAME
975CANONICAL_TOPDIR
976ORIGINAL_TOPDIR
977TOPDIR
978PATH_SEP
979ZERO_ARCHDEF
980HOTSPOT_BUILD_CPU_DEFINE
981HOTSPOT_BUILD_CPU_ARCH
982HOTSPOT_BUILD_CPU
983HOTSPOT_BUILD_OS_TYPE
984HOTSPOT_BUILD_OS
985OPENJDK_BUILD_BUNDLE_PLATFORM
986OPENJDK_BUILD_CPU_BUNDLE
987OPENJDK_BUILD_OS_BUNDLE
988OPENJDK_BUILD_OS_EXPORT_DIR
989OPENJDK_BUILD_CPU_JLI_CFLAGS
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LIBDIR
993OPENJDK_BUILD_CPU_LEGACY_LIB
994OPENJDK_BUILD_CPU_LEGACY
995HOTSPOT_TARGET_CPU_DEFINE
996HOTSPOT_TARGET_CPU_ARCH
997HOTSPOT_TARGET_CPU
998HOTSPOT_TARGET_OS_TYPE
999HOTSPOT_TARGET_OS
1000DEFINE_CROSS_COMPILE_ARCH
1001LP64
1002OPENJDK_TARGET_BUNDLE_PLATFORM
1003OPENJDK_TARGET_CPU_BUNDLE
1004OPENJDK_TARGET_OS_BUNDLE
1005OPENJDK_TARGET_OS_EXPORT_DIR
1006OPENJDK_TARGET_CPU_JLI_CFLAGS
1007OPENJDK_TARGET_CPU_OSARCH
1008OPENJDK_TARGET_CPU_ISADIR
1009OPENJDK_TARGET_CPU_LIBDIR
1010OPENJDK_TARGET_CPU_LEGACY_LIB
1011OPENJDK_TARGET_CPU_LEGACY
1012REQUIRED_OS_VERSION
1013REQUIRED_OS_NAME
1014COMPILE_TYPE
1015OPENJDK_TARGET_CPU_ENDIAN
1016OPENJDK_TARGET_CPU_BITS
1017OPENJDK_TARGET_CPU_ARCH
1018OPENJDK_TARGET_CPU
1019OPENJDK_TARGET_OS_ENV
1020OPENJDK_TARGET_OS_TYPE
1021OPENJDK_TARGET_OS
1022OPENJDK_BUILD_CPU_ENDIAN
1023OPENJDK_BUILD_CPU_BITS
1024OPENJDK_BUILD_CPU_ARCH
1025OPENJDK_BUILD_CPU
1026OPENJDK_BUILD_OS_ENV
1027OPENJDK_BUILD_OS_TYPE
1028OPENJDK_BUILD_OS
1029OPENJDK_BUILD_AUTOCONF_NAME
1030OPENJDK_TARGET_AUTOCONF_NAME
1031target_os
1032target_vendor
1033target_cpu
1034target
1035host_os
1036host_vendor
1037host_cpu
1038host
1039build_os
1040build_vendor
1041build_cpu
1042build
1043NICE
1044CPIO
1045DF
1046READLINK
1047CYGPATH
1048SED
1049FGREP
1050EGREP
1051GREP
1052AWK
1053XARGS
1054WHICH
1055WC
1056UNIQ
1057UNAME
1058TR
1059TOUCH
1060TEE
1061TAR
1062TAIL
1063SORT
1064SH
1065RMDIR
1066RM
1067PRINTF
1068NAWK
1069MV
1070MKTEMP
1071MKDIR
1072LS
1073LN
1074GZIP
1075GUNZIP
1076HEAD
1077FIND
1078FILE
1079EXPR
1080ECHO
1081DIRNAME
1082DIFF
1083DATE
1084CUT
1085CP
1086COMM
1087CMP
1088CHMOD
1089CAT
1090BASH
1091BASENAME
1092DATE_WHEN_CONFIGURED
1093ORIGINAL_PATH
1094CONFIGURE_COMMAND_LINE
1095target_alias
1096host_alias
1097build_alias
1098LIBS
1099ECHO_T
1100ECHO_N
1101ECHO_C
1102DEFS
1103mandir
1104localedir
1105libdir
1106psdir
1107pdfdir
1108dvidir
1109htmldir
1110infodir
1111docdir
1112oldincludedir
1113includedir
1114localstatedir
1115sharedstatedir
1116sysconfdir
1117datadir
1118datarootdir
1119libexecdir
1120sbindir
1121bindir
1122program_transform_name
1123prefix
1124exec_prefix
1125PACKAGE_URL
1126PACKAGE_BUGREPORT
1127PACKAGE_STRING
1128PACKAGE_VERSION
1129PACKAGE_TARNAME
1130PACKAGE_NAME
1131PATH_SEPARATOR
1132SHELL'
1133ac_subst_files=''
1134ac_user_opts='
1135enable_option_checking
1136with_target_bits
1137enable_openjdk_only
1138with_custom_make_dir
1139with_jdk_variant
1140enable_debug
1141with_debug_level
1142with_jvm_variants
1143with_devkit
1144with_sys_root
1145with_sysroot
1146with_tools_dir
1147with_toolchain_path
1148with_extra_path
1149with_sdk_name
1150with_conf_name
1151with_output_sync
1152with_default_make_target
1153enable_headless_only
1154with_cacerts_file
1155enable_unlimited_crypto
1156with_copyright_year
1157enable_keep_packaged_modules
1158with_milestone
1159with_update_version
1160with_user_release_suffix
1161with_build_number
1162with_version_string
1163with_version_pre
1164with_version_opt
1165with_version_build
1166with_version_major
1167with_version_minor
1168with_version_security
1169with_version_patch
1170with_boot_jdk
1171with_build_jdk
1172with_add_source_root
1173with_override_source_root
1174with_adds_and_overrides
1175with_override_langtools
1176with_override_corba
1177with_override_jaxp
1178with_override_jaxws
1179with_override_hotspot
1180with_override_nashorn
1181with_override_jdk
1182with_import_hotspot
1183with_import_modules
1184enable_static_build
1185with_toolchain_type
1186with_extra_cflags
1187with_extra_cxxflags
1188with_extra_ldflags
1189with_toolchain_version
1190with_build_devkit
1191with_jtreg
1192enable_warnings_as_errors
1193with_native_debug_symbols
1194enable_debug_symbols
1195enable_zip_debug_info
1196enable_native_coverage
1197enable_dtrace
1198with_jvm_features
1199with_jvm_interpreter
1200enable_hotspot_gtest
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIP
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-unlimited-crypto
1978                          Enable unlimited crypto policy [disabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-devkit           use this devkit for compilers, tools and resources
2035  --with-sys-root         alias for --with-sysroot for backwards compatability
2036  --with-sysroot          use this directory as sysroot
2037  --with-tools-dir        alias for --with-toolchain-path for backwards
2038                          compatibility
2039  --with-toolchain-path   prepend these directories when searching for
2040                          toolchain binaries (compilers etc)
2041  --with-extra-path       prepend these directories to the default path
2042  --with-sdk-name         use the platform SDK of the given name. [macosx]
2043  --with-conf-name        use this as the name of the configuration [generated
2044                          from important configuration options]
2045  --with-output-sync      set make output sync type if supported by make.
2046                          [recurse]
2047  --with-default-make-target
2048                          set the default make target [exploded-image]
2049  --with-cacerts-file     specify alternative cacerts file
2050  --with-copyright-year   Set copyright year value for build [current year]
2051  --with-milestone        Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-update-version   Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-user-release-suffix
2056                          Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-build-number     Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-version-string   Set version string [calculated]
2061  --with-version-pre      Set the base part of the version 'PRE' field
2062                          (pre-release identifier) ['internal']
2063  --with-version-opt      Set version 'OPT' field (build metadata)
2064                          [<timestamp>.<user>.<dirname>]
2065  --with-version-build    Set version 'BUILD' field (build number) [not
2066                          specified]
2067  --with-version-major    Set version 'MAJOR' field (first number) [current
2068                          source value]
2069  --with-version-minor    Set version 'MINOR' field (second number) [current
2070                          source value]
2071  --with-version-security Set version 'SECURITY' field (third number) [current
2072                          source value]
2073  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2074                          specified]
2075  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2076  --with-build-jdk        path to JDK of same version as is being built[the
2077                          newly built JDK]
2078  --with-add-source-root  Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-source-root
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-adds-and-overrides
2084                          Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-langtools
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-corba   Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxp    Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxws   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-hotspot Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-nashorn Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jdk     Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-hotspot   import hotspot binaries from this jdk image or
2102                          hotspot build dist dir instead of building from
2103                          source
2104  --with-import-modules   import a set of prebuilt modules either as a zip
2105                          file or an exploded directory
2106  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2107                          to show possible values [platform dependent]
2108  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2109  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2110  --with-extra-ldflags    extra flags to be used when linking jdk
2111  --with-toolchain-version
2112                          the version of the toolchain to look for, use
2113                          '--help' to show possible values [platform
2114                          dependent]
2115  --with-build-devkit     Devkit to use for the build platform toolchain
2116  --with-jtreg            Regression Test Harness [probed]
2117  --with-native-debug-symbols
2118                          set the native debug symbol configuration (none,
2119                          internal, external, zipped) [varying]
2120  --with-jvm-features     additional JVM features to enable (separated by
2121                          comma), use '--help' to show possible values [none]
2122  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2123                          compatibility and is ignored
2124  --with-stdc++lib=<static>,<dynamic>,<default>
2125                          force linking of the C++ runtime on Linux to either
2126                          static or dynamic, default is static with dynamic as
2127                          fallback
2128  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2129                          (Windows only) [probed]
2130  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2131                          (Windows only) [probed]
2132  --with-x                use the X Window System
2133  --with-cups             specify prefix directory for the cups package
2134                          (expecting the headers under PATH/include)
2135  --with-cups-include     specify directory for the cups include files
2136  --with-freetype         specify prefix directory for the freetype package
2137                          (expecting the libraries under PATH/lib and the
2138                          headers under PATH/include)
2139  --with-freetype-include specify directory for the freetype include files
2140  --with-freetype-lib     specify directory for the freetype library
2141  --with-freetype-src     specify directory with freetype sources to
2142                          automatically build the library (experimental,
2143                          Windows-only)
2144  --with-alsa             specify prefix directory for the alsa package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-alsa-include     specify directory for the alsa include files
2148  --with-alsa-lib         specify directory for the alsa library
2149  --with-libffi           specify prefix directory for the libffi package
2150                          (expecting the libraries under PATH/lib and the
2151                          headers under PATH/include)
2152  --with-libffi-include   specify directory for the libffi include files
2153  --with-libffi-lib       specify directory for the libffi library
2154  --with-libjpeg          use libjpeg from build system or OpenJDK source
2155                          (system, bundled) [bundled]
2156  --with-giflib           use giflib from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-libpng           use libpng from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-zlib             use zlib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-lcms             use lcms2 from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-dxsdk            Deprecated. Option is kept for backwards
2165                          compatibility and is ignored
2166  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-include    Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-num-cores        number of cores in the build system, e.g.
2171                          --with-num-cores=8 [probed]
2172  --with-memory-size      memory (in MB) available in the build system, e.g.
2173                          --with-memory-size=1024 [probed]
2174  --with-jobs             number of parallel jobs to let make run [calculated
2175                          based on cores and memory]
2176  --with-test-jobs        number of parallel tests jobs to run [based on build
2177                          jobs]
2178  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2179                          invocations of boot JDK, overriding the default
2180                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2181                          -enableassertions"
2182  --with-sjavac-server-java
2183                          use this java binary for running the sjavac
2184                          background server [Boot JDK java]
2185  --with-ccache-dir       where to store ccache files [~/.ccache]
2186
2187Some influential environment variables:
2188  BASENAME    Override default value for BASENAME
2189  BASH        Override default value for BASH
2190  CAT         Override default value for CAT
2191  CHMOD       Override default value for CHMOD
2192  CMP         Override default value for CMP
2193  COMM        Override default value for COMM
2194  CP          Override default value for CP
2195  CUT         Override default value for CUT
2196  DATE        Override default value for DATE
2197  DIFF        Override default value for DIFF
2198  DIRNAME     Override default value for DIRNAME
2199  ECHO        Override default value for ECHO
2200  EXPR        Override default value for EXPR
2201  FILE        Override default value for FILE
2202  FIND        Override default value for FIND
2203  HEAD        Override default value for HEAD
2204  GUNZIP      Override default value for GUNZIP
2205  GZIP        Override default value for GZIP
2206  LN          Override default value for LN
2207  LS          Override default value for LS
2208  MKDIR       Override default value for MKDIR
2209  MKTEMP      Override default value for MKTEMP
2210  MV          Override default value for MV
2211  NAWK        Override default value for NAWK
2212  PRINTF      Override default value for PRINTF
2213  RM          Override default value for RM
2214  RMDIR       Override default value for RMDIR
2215  SH          Override default value for SH
2216  SORT        Override default value for SORT
2217  TAIL        Override default value for TAIL
2218  TAR         Override default value for TAR
2219  TEE         Override default value for TEE
2220  TOUCH       Override default value for TOUCH
2221  TR          Override default value for TR
2222  UNAME       Override default value for UNAME
2223  UNIQ        Override default value for UNIQ
2224  WC          Override default value for WC
2225  WHICH       Override default value for WHICH
2226  XARGS       Override default value for XARGS
2227  AWK         Override default value for AWK
2228  GREP        Override default value for GREP
2229  EGREP       Override default value for EGREP
2230  FGREP       Override default value for FGREP
2231  SED         Override default value for SED
2232  CYGPATH     Override default value for CYGPATH
2233  READLINK    Override default value for READLINK
2234  DF          Override default value for DF
2235  CPIO        Override default value for CPIO
2236  NICE        Override default value for NICE
2237  MAKE        Override default value for MAKE
2238  UNZIP       Override default value for UNZIP
2239  ZIP         Override default value for ZIP
2240  LDD         Override default value for LDD
2241  OTOOL       Override default value for OTOOL
2242  READELF     Override default value for READELF
2243  HG          Override default value for HG
2244  STAT        Override default value for STAT
2245  TIME        Override default value for TIME
2246  DTRACE      Override default value for DTRACE
2247  PATCH       Override default value for PATCH
2248  DSYMUTIL    Override default value for DSYMUTIL
2249  XATTR       Override default value for XATTR
2250  CODESIGN    Override default value for CODESIGN
2251  SETFILE     Override default value for SETFILE
2252  PKG_CONFIG  path to pkg-config utility
2253  JAVA        Override default value for JAVA
2254  JAVAC       Override default value for JAVAC
2255  JAVAH       Override default value for JAVAH
2256  JAR         Override default value for JAR
2257  JARSIGNER   Override default value for JARSIGNER
2258  CC          C compiler command
2259  CFLAGS      C compiler flags
2260  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261              nonstandard directory <lib dir>
2262  LIBS        libraries to pass to the linker, e.g. -l<library>
2263  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264              you have headers in a nonstandard directory <include dir>
2265  CXX         C++ compiler command
2266  CXXFLAGS    C++ compiler flags
2267  CPP         C preprocessor
2268  CXXCPP      C++ preprocessor
2269  AS          Override default value for AS
2270  AR          Override default value for AR
2271  LIPO        Override default value for LIPO
2272  STRIP       Override default value for STRIP
2273  NM          Override default value for NM
2274  GNM         Override default value for GNM
2275  OBJCOPY     Override default value for OBJCOPY
2276  OBJDUMP     Override default value for OBJDUMP
2277  BUILD_CC    Override default value for BUILD_CC
2278  BUILD_CXX   Override default value for BUILD_CXX
2279  BUILD_NM    Override default value for BUILD_NM
2280  BUILD_AR    Override default value for BUILD_AR
2281  BUILD_OBJCOPY
2282              Override default value for BUILD_OBJCOPY
2283  BUILD_STRIP Override default value for BUILD_STRIP
2284  JTREGEXE    Override default value for JTREGEXE
2285  XMKMF       Path to xmkmf, Makefile generator for X Window System
2286  FREETYPE_CFLAGS
2287              C compiler flags for FREETYPE, overriding pkg-config
2288  FREETYPE_LIBS
2289              linker flags for FREETYPE, overriding pkg-config
2290  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292  LIBFFI_CFLAGS
2293              C compiler flags for LIBFFI, overriding pkg-config
2294  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296  PNG_LIBS    linker flags for PNG, overriding pkg-config
2297  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299  ICECC_CMD   Override default value for ICECC_CMD
2300  ICECC_CREATE_ENV
2301              Override default value for ICECC_CREATE_ENV
2302  ICECC_WRAPPER
2303              Override default value for ICECC_WRAPPER
2304  CCACHE      Override default value for CCACHE
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to <build-dev@openjdk.java.net>.
2310OpenJDK home page: <http://openjdk.java.net>.
2311_ACEOF
2312ac_status=$?
2313fi
2314
2315if test "$ac_init_help" = "recursive"; then
2316  # If there are subdirs, report their specific --help.
2317  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318    test -d "$ac_dir" ||
2319      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320      continue
2321    ac_builddir=.
2322
2323case "$ac_dir" in
2324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325*)
2326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327  # A ".." for each directory in $ac_dir_suffix.
2328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329  case $ac_top_builddir_sub in
2330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332  esac ;;
2333esac
2334ac_abs_top_builddir=$ac_pwd
2335ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336# for backward compatibility:
2337ac_top_builddir=$ac_top_build_prefix
2338
2339case $srcdir in
2340  .)  # We are building in place.
2341    ac_srcdir=.
2342    ac_top_srcdir=$ac_top_builddir_sub
2343    ac_abs_top_srcdir=$ac_pwd ;;
2344  [\\/]* | ?:[\\/]* )  # Absolute name.
2345    ac_srcdir=$srcdir$ac_dir_suffix;
2346    ac_top_srcdir=$srcdir
2347    ac_abs_top_srcdir=$srcdir ;;
2348  *) # Relative name.
2349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350    ac_top_srcdir=$ac_top_build_prefix$srcdir
2351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352esac
2353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354
2355    cd "$ac_dir" || { ac_status=$?; continue; }
2356    # Check for guested configure.
2357    if test -f "$ac_srcdir/configure.gnu"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360    elif test -f "$ac_srcdir/configure"; then
2361      echo &&
2362      $SHELL "$ac_srcdir/configure" --help=recursive
2363    else
2364      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365    fi || ac_status=$?
2366    cd "$ac_pwd" || { ac_status=$?; break; }
2367  done
2368fi
2369
2370test -n "$ac_init_help" && exit $ac_status
2371if $ac_init_version; then
2372  cat <<\_ACEOF
2373OpenJDK configure jdk9
2374generated by GNU Autoconf 2.69
2375
2376Copyright (C) 2012 Free Software Foundation, Inc.
2377This configure script is free software; the Free Software Foundation
2378gives unlimited permission to copy, distribute and modify it.
2379_ACEOF
2380  exit
2381fi
2382
2383## ------------------------ ##
2384## Autoconf initialization. ##
2385## ------------------------ ##
2386
2387# ac_fn_c_try_compile LINENO
2388# --------------------------
2389# Try to compile conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_c_try_compile ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext
2394  if { { ac_try="$ac_compile"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_compile") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_c_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest.$ac_objext; then :
2413  ac_retval=0
2414else
2415  $as_echo "$as_me: failed program was:" >&5
2416sed 's/^/| /' conftest.$ac_ext >&5
2417
2418	ac_retval=1
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_compile
2424
2425# ac_fn_cxx_try_compile LINENO
2426# ----------------------------
2427# Try to compile conftest.$ac_ext, and return whether this succeeded.
2428ac_fn_cxx_try_compile ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  rm -f conftest.$ac_objext
2432  if { { ac_try="$ac_compile"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_compile") 2>conftest.err
2440  ac_status=$?
2441  if test -s conftest.err; then
2442    grep -v '^ *+' conftest.err >conftest.er1
2443    cat conftest.er1 >&5
2444    mv -f conftest.er1 conftest.err
2445  fi
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && {
2448	 test -z "$ac_cxx_werror_flag" ||
2449	 test ! -s conftest.err
2450       } && test -s conftest.$ac_objext; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_cxx_try_compile
2462
2463# ac_fn_c_try_cpp LINENO
2464# ----------------------
2465# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466ac_fn_c_try_cpp ()
2467{
2468  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469  if { { ac_try="$ac_cpp conftest.$ac_ext"
2470case "(($ac_try" in
2471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472  *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477  ac_status=$?
2478  if test -s conftest.err; then
2479    grep -v '^ *+' conftest.err >conftest.er1
2480    cat conftest.er1 >&5
2481    mv -f conftest.er1 conftest.err
2482  fi
2483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484  test $ac_status = 0; } > conftest.i && {
2485	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486	 test ! -s conftest.err
2487       }; then :
2488  ac_retval=0
2489else
2490  $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493    ac_retval=1
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496  as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_cpp
2499
2500# ac_fn_cxx_try_cpp LINENO
2501# ------------------------
2502# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_cpp ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_cpp conftest.$ac_ext"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514  ac_status=$?
2515  if test -s conftest.err; then
2516    grep -v '^ *+' conftest.err >conftest.er1
2517    cat conftest.er1 >&5
2518    mv -f conftest.er1 conftest.err
2519  fi
2520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521  test $ac_status = 0; } > conftest.i && {
2522	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523	 test ! -s conftest.err
2524       }; then :
2525  ac_retval=0
2526else
2527  $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530    ac_retval=1
2531fi
2532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533  as_fn_set_status $ac_retval
2534
2535} # ac_fn_cxx_try_cpp
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584# ---------------------------------------------------------
2585# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586# the include files in INCLUDES and setting the cache variable VAR
2587# accordingly.
2588ac_fn_cxx_check_header_mongrel ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if eval \${$3+:} false; then :
2592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593$as_echo_n "checking for $2... " >&6; }
2594if eval \${$3+:} false; then :
2595  $as_echo_n "(cached) " >&6
2596fi
2597eval ac_res=\$$3
2598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599$as_echo "$ac_res" >&6; }
2600else
2601  # Is the header compilable?
2602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603$as_echo_n "checking $2 usability... " >&6; }
2604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607#include <$2>
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_header_compiler=yes
2611else
2612  ac_header_compiler=no
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616$as_echo "$ac_header_compiler" >&6; }
2617
2618# Is the header present?
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620$as_echo_n "checking $2 presence... " >&6; }
2621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623#include <$2>
2624_ACEOF
2625if ac_fn_cxx_try_cpp "$LINENO"; then :
2626  ac_header_preproc=yes
2627else
2628  ac_header_preproc=no
2629fi
2630rm -f conftest.err conftest.i conftest.$ac_ext
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632$as_echo "$ac_header_preproc" >&6; }
2633
2634# So?  What about this header?
2635case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636  yes:no: )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641    ;;
2642  no:yes:* )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653( $as_echo "## ----------------------------------------- ##
2654## Report this to build-dev@openjdk.java.net ##
2655## ----------------------------------------- ##"
2656     ) | sed "s/^/$as_me: WARNING:     /" >&2
2657    ;;
2658esac
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
2661if eval \${$3+:} false; then :
2662  $as_echo_n "(cached) " >&6
2663else
2664  eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
2670  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671
2672} # ac_fn_cxx_check_header_mongrel
2673
2674# ac_fn_cxx_try_run LINENO
2675# ------------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_cxx_try_run ()
2679{
2680  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681  if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684  *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688  (eval "$ac_link") 2>&5
2689  ac_status=$?
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692  { { case "(($ac_try" in
2693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694  *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698  (eval "$ac_try") 2>&5
2699  ac_status=$?
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; }; }; then :
2702  ac_retval=0
2703else
2704  $as_echo "$as_me: program exited with status $ac_status" >&5
2705       $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708       ac_retval=$ac_status
2709fi
2710  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712  as_fn_set_status $ac_retval
2713
2714} # ac_fn_cxx_try_run
2715
2716# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717# ---------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_cxx_check_header_compile ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_cxx_try_compile "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
2743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744
2745} # ac_fn_cxx_check_header_compile
2746
2747# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748# ----------------------------------------------
2749# Tries to find the compile-time value of EXPR in a program that includes
2750# INCLUDES, setting VAR accordingly. Returns whether the value could be
2751# computed
2752ac_fn_cxx_compute_int ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  if test "$cross_compiling" = yes; then
2756    # Depending upon the size, compute the lo and hi bounds.
2757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758/* end confdefs.h.  */
2759$4
2760int
2761main ()
2762{
2763static int test_array [1 - 2 * !(($2) >= 0)];
2764test_array [0] = 0;
2765return test_array [0];
2766
2767  ;
2768  return 0;
2769}
2770_ACEOF
2771if ac_fn_cxx_try_compile "$LINENO"; then :
2772  ac_lo=0 ac_mid=0
2773  while :; do
2774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0;
2782return test_array [0];
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788if ac_fn_cxx_try_compile "$LINENO"; then :
2789  ac_hi=$ac_mid; break
2790else
2791  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792			if test $ac_lo -le $ac_mid; then
2793			  ac_lo= ac_hi=
2794			  break
2795			fi
2796			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799  done
2800else
2801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) < 0)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=-1 ac_mid=-1
2817  while :; do
2818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825test_array [0] = 0;
2826return test_array [0];
2827
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_compile "$LINENO"; then :
2833  ac_lo=$ac_mid; break
2834else
2835  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836			if test $ac_mid -le $ac_hi; then
2837			  ac_lo= ac_hi=
2838			  break
2839			fi
2840			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843  done
2844else
2845  ac_lo= ac_hi=
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850# Binary search between lo and hi bounds.
2851while test "x$ac_lo" != "x$ac_hi"; do
2852  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854/* end confdefs.h.  */
2855$4
2856int
2857main ()
2858{
2859static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860test_array [0] = 0;
2861return test_array [0];
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_compile "$LINENO"; then :
2868  ac_hi=$ac_mid
2869else
2870  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873done
2874case $ac_lo in #((
2875?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876'') ac_retval=1 ;;
2877esac
2878  else
2879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882static long int longval () { return $2; }
2883static unsigned long int ulongval () { return $2; }
2884#include <stdio.h>
2885#include <stdlib.h>
2886int
2887main ()
2888{
2889
2890  FILE *f = fopen ("conftest.val", "w");
2891  if (! f)
2892    return 1;
2893  if (($2) < 0)
2894    {
2895      long int i = longval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%ld", i);
2899    }
2900  else
2901    {
2902      unsigned long int i = ulongval ();
2903      if (i != ($2))
2904	return 1;
2905      fprintf (f, "%lu", i);
2906    }
2907  /* Do not output a trailing newline, as this causes \r\n confusion
2908     on some platforms.  */
2909  return ferror (f) || fclose (f) != 0;
2910
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915if ac_fn_cxx_try_run "$LINENO"; then :
2916  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917else
2918  ac_retval=1
2919fi
2920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921  conftest.$ac_objext conftest.beam conftest.$ac_ext
2922rm -f conftest.val
2923
2924  fi
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_cxx_compute_int
2929
2930# ac_fn_cxx_try_link LINENO
2931# -------------------------
2932# Try to link conftest.$ac_ext, and return whether this succeeded.
2933ac_fn_cxx_try_link ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  rm -f conftest.$ac_objext conftest$ac_exeext
2937  if { { ac_try="$ac_link"
2938case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944  (eval "$ac_link") 2>conftest.err
2945  ac_status=$?
2946  if test -s conftest.err; then
2947    grep -v '^ *+' conftest.err >conftest.er1
2948    cat conftest.er1 >&5
2949    mv -f conftest.er1 conftest.err
2950  fi
2951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952  test $ac_status = 0; } && {
2953	 test -z "$ac_cxx_werror_flag" ||
2954	 test ! -s conftest.err
2955       } && test -s conftest$ac_exeext && {
2956	 test "$cross_compiling" = yes ||
2957	 test -x conftest$ac_exeext
2958       }; then :
2959  ac_retval=0
2960else
2961  $as_echo "$as_me: failed program was:" >&5
2962sed 's/^/| /' conftest.$ac_ext >&5
2963
2964	ac_retval=1
2965fi
2966  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968  # interfere with the next link command; also delete a directory that is
2969  # left behind by Apple's compiler.  We do this before executing the actions.
2970  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972  as_fn_set_status $ac_retval
2973
2974} # ac_fn_cxx_try_link
2975
2976# ac_fn_cxx_check_func LINENO FUNC VAR
2977# ------------------------------------
2978# Tests whether FUNC exists, setting the cache variable VAR accordingly
2979ac_fn_cxx_check_func ()
2980{
2981  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983$as_echo_n "checking for $2... " >&6; }
2984if eval \${$3+:} false; then :
2985  $as_echo_n "(cached) " >&6
2986else
2987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h.  */
2989/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991#define $2 innocuous_$2
2992
2993/* System header to define __stub macros and hopefully few prototypes,
2994    which can conflict with char $2 (); below.
2995    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996    <limits.h> exists even on freestanding compilers.  */
2997
2998#ifdef __STDC__
2999# include <limits.h>
3000#else
3001# include <assert.h>
3002#endif
3003
3004#undef $2
3005
3006/* Override any GCC internal prototype to avoid an error.
3007   Use char because int might match the return type of a GCC
3008   builtin and then its argument prototype would still apply.  */
3009#ifdef __cplusplus
3010extern "C"
3011#endif
3012char $2 ();
3013/* The GNU C library defines this for functions which it implements
3014    to always fail with ENOSYS.  Some functions are actually named
3015    something starting with __ and the normal name is an alias.  */
3016#if defined __stub_$2 || defined __stub___$2
3017choke me
3018#endif
3019
3020int
3021main ()
3022{
3023return $2 ();
3024  ;
3025  return 0;
3026}
3027_ACEOF
3028if ac_fn_cxx_try_link "$LINENO"; then :
3029  eval "$3=yes"
3030else
3031  eval "$3=no"
3032fi
3033rm -f core conftest.err conftest.$ac_objext \
3034    conftest$ac_exeext conftest.$ac_ext
3035fi
3036eval ac_res=\$$3
3037	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038$as_echo "$ac_res" >&6; }
3039  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040
3041} # ac_fn_cxx_check_func
3042
3043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044# -------------------------------------------------------
3045# Tests whether HEADER exists and can be compiled using the include files in
3046# INCLUDES, setting the cache variable VAR accordingly.
3047ac_fn_c_check_header_compile ()
3048{
3049  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051$as_echo_n "checking for $2... " >&6; }
3052if eval \${$3+:} false; then :
3053  $as_echo_n "(cached) " >&6
3054else
3055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056/* end confdefs.h.  */
3057$4
3058#include <$2>
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  eval "$3=yes"
3062else
3063  eval "$3=no"
3064fi
3065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066fi
3067eval ac_res=\$$3
3068	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069$as_echo "$ac_res" >&6; }
3070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071
3072} # ac_fn_c_check_header_compile
3073cat >config.log <<_ACEOF
3074This file contains any messages produced by compilers while
3075running configure, to aid debugging if configure makes a mistake.
3076
3077It was created by OpenJDK $as_me jdk9, which was
3078generated by GNU Autoconf 2.69.  Invocation command line was
3079
3080  $ $0 $@
3081
3082_ACEOF
3083exec 5>>config.log
3084{
3085cat <<_ASUNAME
3086## --------- ##
3087## Platform. ##
3088## --------- ##
3089
3090hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095
3096/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098
3099/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106
3107_ASUNAME
3108
3109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110for as_dir in $PATH
3111do
3112  IFS=$as_save_IFS
3113  test -z "$as_dir" && as_dir=.
3114    $as_echo "PATH: $as_dir"
3115  done
3116IFS=$as_save_IFS
3117
3118} >&5
3119
3120cat >&5 <<_ACEOF
3121
3122
3123## ----------- ##
3124## Core tests. ##
3125## ----------- ##
3126
3127_ACEOF
3128
3129
3130# Keep a trace of the command line.
3131# Strip out --no-create and --no-recursion so they do not pile up.
3132# Strip out --silent because we don't want to record it for future runs.
3133# Also quote any args containing shell meta-characters.
3134# Make two passes to allow for proper duplicate-argument suppression.
3135ac_configure_args=
3136ac_configure_args0=
3137ac_configure_args1=
3138ac_must_keep_next=false
3139for ac_pass in 1 2
3140do
3141  for ac_arg
3142  do
3143    case $ac_arg in
3144    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146    | -silent | --silent | --silen | --sile | --sil)
3147      continue ;;
3148    *\'*)
3149      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    esac
3151    case $ac_pass in
3152    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153    2)
3154      as_fn_append ac_configure_args1 " '$ac_arg'"
3155      if test $ac_must_keep_next = true; then
3156	ac_must_keep_next=false # Got value, back to normal.
3157      else
3158	case $ac_arg in
3159	  *=* | --config-cache | -C | -disable-* | --disable-* \
3160	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162	  | -with-* | --with-* | -without-* | --without-* | --x)
3163	    case "$ac_configure_args0 " in
3164	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165	    esac
3166	    ;;
3167	  -* ) ac_must_keep_next=true ;;
3168	esac
3169      fi
3170      as_fn_append ac_configure_args " '$ac_arg'"
3171      ;;
3172    esac
3173  done
3174done
3175{ ac_configure_args0=; unset ac_configure_args0;}
3176{ ac_configure_args1=; unset ac_configure_args1;}
3177
3178# When interrupted or exit'd, cleanup temporary files, and complete
3179# config.log.  We remove comments because anyway the quotes in there
3180# would cause problems or look ugly.
3181# WARNING: Use '\'' to represent an apostrophe within the trap.
3182# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183trap 'exit_status=$?
3184  # Save into config.log some information that might help in debugging.
3185  {
3186    echo
3187
3188    $as_echo "## ---------------- ##
3189## Cache variables. ##
3190## ---------------- ##"
3191    echo
3192    # The following way of writing the cache mishandles newlines in values,
3193(
3194  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195    eval ac_val=\$$ac_var
3196    case $ac_val in #(
3197    *${as_nl}*)
3198      case $ac_var in #(
3199      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201      esac
3202      case $ac_var in #(
3203      _ | IFS | as_nl) ;; #(
3204      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205      *) { eval $ac_var=; unset $ac_var;} ;;
3206      esac ;;
3207    esac
3208  done
3209  (set) 2>&1 |
3210    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211    *${as_nl}ac_space=\ *)
3212      sed -n \
3213	"s/'\''/'\''\\\\'\'''\''/g;
3214	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215      ;; #(
3216    *)
3217      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218      ;;
3219    esac |
3220    sort
3221)
3222    echo
3223
3224    $as_echo "## ----------------- ##
3225## Output variables. ##
3226## ----------------- ##"
3227    echo
3228    for ac_var in $ac_subst_vars
3229    do
3230      eval ac_val=\$$ac_var
3231      case $ac_val in
3232      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233      esac
3234      $as_echo "$ac_var='\''$ac_val'\''"
3235    done | sort
3236    echo
3237
3238    if test -n "$ac_subst_files"; then
3239      $as_echo "## ------------------- ##
3240## File substitutions. ##
3241## ------------------- ##"
3242      echo
3243      for ac_var in $ac_subst_files
3244      do
3245	eval ac_val=\$$ac_var
3246	case $ac_val in
3247	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248	esac
3249	$as_echo "$ac_var='\''$ac_val'\''"
3250      done | sort
3251      echo
3252    fi
3253
3254    if test -s confdefs.h; then
3255      $as_echo "## ----------- ##
3256## confdefs.h. ##
3257## ----------- ##"
3258      echo
3259      cat confdefs.h
3260      echo
3261    fi
3262    test "$ac_signal" != 0 &&
3263      $as_echo "$as_me: caught signal $ac_signal"
3264    $as_echo "$as_me: exit $exit_status"
3265  } >&5
3266  rm -f core *.core core.conftest.* &&
3267    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268    exit $exit_status
3269' 0
3270for ac_signal in 1 2 13 15; do
3271  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272done
3273ac_signal=0
3274
3275# confdefs.h avoids OS command line length limits that DEFS can exceed.
3276rm -f -r conftest* confdefs.h
3277
3278$as_echo "/* confdefs.h */" > confdefs.h
3279
3280# Predefined preprocessor variables.
3281
3282cat >>confdefs.h <<_ACEOF
3283#define PACKAGE_NAME "$PACKAGE_NAME"
3284_ACEOF
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_VERSION "$PACKAGE_VERSION"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_STRING "$PACKAGE_STRING"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_URL "$PACKAGE_URL"
3304_ACEOF
3305
3306
3307# Let the site file select an alternate cache file if it wants to.
3308# Prefer an explicitly selected file to automatically selected ones.
3309ac_site_file1=NONE
3310ac_site_file2=NONE
3311if test -n "$CONFIG_SITE"; then
3312  # We do not want a PATH search for config.site.
3313  case $CONFIG_SITE in #((
3314    -*)  ac_site_file1=./$CONFIG_SITE;;
3315    */*) ac_site_file1=$CONFIG_SITE;;
3316    *)   ac_site_file1=./$CONFIG_SITE;;
3317  esac
3318elif test "x$prefix" != xNONE; then
3319  ac_site_file1=$prefix/share/config.site
3320  ac_site_file2=$prefix/etc/config.site
3321else
3322  ac_site_file1=$ac_default_prefix/share/config.site
3323  ac_site_file2=$ac_default_prefix/etc/config.site
3324fi
3325for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326do
3327  test "x$ac_site_file" = xNONE && continue
3328  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331    sed 's/^/| /' "$ac_site_file" >&5
3332    . "$ac_site_file" \
3333      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "failed to load site script $ac_site_file
3336See \`config.log' for more details" "$LINENO" 5; }
3337  fi
3338done
3339
3340if test -r "$cache_file"; then
3341  # Some versions of bash will fail to source /dev/null (special files
3342  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345$as_echo "$as_me: loading cache $cache_file" >&6;}
3346    case $cache_file in
3347      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348      *)                      . "./$cache_file";;
3349    esac
3350  fi
3351else
3352  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353$as_echo "$as_me: creating cache $cache_file" >&6;}
3354  >$cache_file
3355fi
3356
3357# Check that the precious variables saved in the cache have kept the same
3358# value.
3359ac_cache_corrupted=false
3360for ac_var in $ac_precious_vars; do
3361  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362  eval ac_new_set=\$ac_env_${ac_var}_set
3363  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364  eval ac_new_val=\$ac_env_${ac_var}_value
3365  case $ac_old_set,$ac_new_set in
3366    set,)
3367      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369      ac_cache_corrupted=: ;;
3370    ,set)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,);;
3375    *)
3376      if test "x$ac_old_val" != "x$ac_new_val"; then
3377	# differences in whitespace do not lead to failure.
3378	ac_old_val_w=`echo x $ac_old_val`
3379	ac_new_val_w=`echo x $ac_new_val`
3380	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383	  ac_cache_corrupted=:
3384	else
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387	  eval $ac_var=\$ac_old_val
3388	fi
3389	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393      fi;;
3394  esac
3395  # Pass precious variables to config.status.
3396  if test "$ac_new_set" = set; then
3397    case $ac_new_val in
3398    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399    *) ac_arg=$ac_var=$ac_new_val ;;
3400    esac
3401    case " $ac_configure_args " in
3402      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404    esac
3405  fi
3406done
3407if $ac_cache_corrupted; then
3408  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413fi
3414## -------------------- ##
3415## Main body of script. ##
3416## -------------------- ##
3417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423
3424
3425
3426ac_aux_dir=
3427for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428  if test -f "$ac_dir/install-sh"; then
3429    ac_aux_dir=$ac_dir
3430    ac_install_sh="$ac_aux_dir/install-sh -c"
3431    break
3432  elif test -f "$ac_dir/install.sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install.sh -c"
3435    break
3436  elif test -f "$ac_dir/shtool"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/shtool install -c"
3439    break
3440  fi
3441done
3442if test -z "$ac_aux_dir"; then
3443  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3444fi
3445
3446# These three variables are undocumented and unsupported,
3447# and are intended to be withdrawn in a future Autoconf release.
3448# They can cause serious problems if a builder's source tree is in a directory
3449# whose full name contains unusual characters.
3450ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453
3454
3455# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456
3457#
3458# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482#
3483# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3484#
3485# This program is free software; you can redistribute it and/or modify
3486# it under the terms of the GNU General Public License as published by
3487# the Free Software Foundation; either version 2 of the License, or
3488# (at your option) any later version.
3489#
3490# This program is distributed in the hope that it will be useful, but
3491# WITHOUT ANY WARRANTY; without even the implied warranty of
3492# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493# General Public License for more details.
3494#
3495# You should have received a copy of the GNU General Public License
3496# along with this program; if not, write to the Free Software
3497# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498#
3499# As a special exception to the GNU General Public License, if you
3500# distribute this file as part of a program that contains a
3501# configuration script generated by Autoconf, you may include it under
3502# the same distribution terms that you use for the rest of that program.
3503
3504# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505# ----------------------------------
3506# PKG_PROG_PKG_CONFIG
3507
3508# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509#
3510# Check to see whether a particular set of modules exists.  Similar
3511# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512#
3513#
3514# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515# this or PKG_CHECK_MODULES is called, or make sure to call
3516# PKG_CHECK_EXISTS manually
3517# --------------------------------------------------------------
3518
3519
3520
3521# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522# ---------------------------------------------
3523# _PKG_CONFIG
3524
3525# _PKG_SHORT_ERRORS_SUPPORTED
3526# -----------------------------
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528
3529
3530# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531# [ACTION-IF-NOT-FOUND])
3532#
3533#
3534# Note that if there is a possibility the first call to
3535# PKG_CHECK_MODULES might not happen, you should be sure to include an
3536# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537#
3538#
3539# --------------------------------------------------------------
3540# PKG_CHECK_MODULES
3541
3542
3543# Include these first...
3544#
3545# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Create a function/macro that takes a series of named arguments. The call is
3570# similar to AC_DEFUN, but the setup of the function looks like this:
3571# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572# ... do something
3573#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574# ])
3575# A star (*) in front of a named argument means that it is required and it's
3576# presence will be verified. To pass e.g. the first value as a normal indexed
3577# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579# "ARG_FOO".
3580#
3581# The generated function can be called like this:
3582# MYFUNC(FOO: [foo-val],
3583#     BAR: [
3584#         $ECHO hello world
3585#     ])
3586# Note that the argument value must start on the same line as the argument name.
3587#
3588# Argument 1: Name of the function to define
3589# Argument 2: List of legal named arguments, with a * prefix for required arguments
3590# Argument 3: Argument array to treat as named, typically $@
3591# Argument 4: The main function body
3592
3593
3594# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595# If so, then append $1 to $2 \
3596# Also set JVM_ARG_OK to true/false depending on outcome.
3597
3598
3599# Appends a string to a path variable, only adding the : when needed.
3600
3601
3602# Prepends a string to a path variable, only adding the : when needed.
3603
3604
3605# This will make sure the given variable points to a full and proper
3606# path. This means:
3607# 1) There will be no spaces in the path. On unix platforms,
3608#    spaces in the path will result in an error. On Windows,
3609#    the path will be rewritten using short-style to be space-free.
3610# 2) The path will be absolute, and it will be in unix-style (on
3611#     cygwin).
3612# $1: The name of the variable to fix
3613
3614
3615# This will make sure the given variable points to a executable
3616# with a full and proper path. This means:
3617# 1) There will be no spaces in the path. On unix platforms,
3618#    spaces in the path will result in an error. On Windows,
3619#    the path will be rewritten using short-style to be space-free.
3620# 2) The path will be absolute, and it will be in unix-style (on
3621#     cygwin).
3622# Any arguments given to the executable is preserved.
3623# If the input variable does not have a directory specification, then
3624# it need to be in the PATH.
3625# $1: The name of the variable to fix
3626
3627
3628
3629
3630# Register a --with argument but mark it as deprecated
3631# $1: The name of the with argument to deprecate, not including --with-
3632
3633
3634# Register a --enable argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --enable-
3636# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637# $3: Messages to user.
3638
3639
3640
3641
3642# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643# $1: variable to check
3644
3645
3646# Check that there are no unprocessed overridden variables left.
3647# If so, they are an incorrect argument and we will exit with an error.
3648
3649
3650# Setup a tool for the given variable. If correctly specified by the user,
3651# use that value, otherwise search for the tool using the supplied code snippet.
3652# $1: variable to set
3653# $2: code snippet to call to look for the tool
3654# $3: code snippet to call if variable was used to find tool
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660# $3: [path]
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Like BASIC_PATH_PROGS but fails if no tool was found.
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671# $3: [path]
3672
3673
3674# Like BASIC_SETUP_TOOL but fails if no tool was found.
3675# $1: variable to set
3676# $2: autoconf macro to call to look for the special tool
3677
3678
3679# Setup the most fundamental tools that relies on not much else to set up,
3680# but is used by much of the early bootstrap code.
3681
3682
3683# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684
3685
3686# Evaluates platform specific overrides for devkit variables.
3687# $1: Name of variable
3688
3689
3690
3691
3692
3693
3694#%%% Simple tools %%%
3695
3696# Check if we have found a usable version of make
3697# $1: the path to a potential make binary (or empty)
3698# $2: the description on how we found this
3699
3700
3701
3702
3703# Goes looking for a usable version of GNU make.
3704
3705
3706
3707
3708
3709
3710
3711
3712# Check if build directory is on local disk. If not possible to determine,
3713# we prefer to claim it's local.
3714# Argument 1: directory to test
3715# Argument 2: what to do if it is on local disk
3716# Argument 3: what to do otherwise (remote disk or failure)
3717
3718
3719# Check that source files have basic read permissions set. This might
3720# not be the case in cygwin in certain conditions.
3721
3722
3723
3724
3725# Check for support for specific options in bash
3726
3727
3728################################################################################
3729#
3730# Default make target
3731#
3732
3733
3734# Code to run after AC_OUTPUT
3735
3736
3737#
3738# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# Helper function which possibly converts a path using DOS-style short mode.
3772# If so, the updated path is stored in $new_path.
3773# $1: The path to check
3774
3775
3776# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3777# and could probably be heavily simplified. However, all changes in this
3778# area tend to need lot of testing in different scenarios, and in lack of
3779# proper unit testing, cleaning this up has not been deemed worth the effort
3780# at the moment.
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3791
3792
3793
3794
3795# ... then the rest
3796#
3797# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3798# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3799#
3800# This code is free software; you can redistribute it and/or modify it
3801# under the terms of the GNU General Public License version 2 only, as
3802# published by the Free Software Foundation.  Oracle designates this
3803# particular file as subject to the "Classpath" exception as provided
3804# by Oracle in the LICENSE file that accompanied this code.
3805#
3806# This code is distributed in the hope that it will be useful, but WITHOUT
3807# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3808# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3809# version 2 for more details (a copy is included in the LICENSE file that
3810# accompanied this code).
3811#
3812# You should have received a copy of the GNU General Public License version
3813# 2 along with this work; if not, write to the Free Software Foundation,
3814# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3815#
3816# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3817# or visit www.oracle.com if you need additional information or have any
3818# questions.
3819#
3820
3821########################################################################
3822# This file handles detection of the Boot JDK. The Boot JDK detection
3823# process has been developed as a response to solve a complex real-world
3824# problem. Initially, it was simple, but it has grown as platform after
3825# platform, idiosyncracy after idiosyncracy has been supported.
3826#
3827# The basic idea is this:
3828# 1) You need an acceptable *) JDK to use as a Boot JDK
3829# 2) There are several ways to locate a JDK, that are mostly platform
3830#    dependent **)
3831# 3) You can have multiple JDKs installed
3832# 4) If possible, configure should try to dig out an acceptable JDK
3833#    automatically, without having to resort to command-line options
3834#
3835# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3836#     javac) and not a JRE, etc.
3837#
3838# **) On Windows we typically use a well-known path.
3839#     On MacOSX we typically use the tool java_home.
3840#     On Linux we typically find javac in the $PATH, and then follow a
3841#     chain of symlinks that often ends up in a real JDK.
3842#
3843# This leads to the code where we check in different ways to locate a
3844# JDK, and if one is found, check if it is acceptable. If not, we print
3845# our reasons for rejecting it (useful when debugging non-working
3846# configure situations) and continue checking the next one.
3847########################################################################
3848
3849# Execute the check given as argument, and verify the result
3850# If the Boot JDK was previously found, do nothing
3851# $1 A command line (typically autoconf macro) to execute
3852
3853
3854# Test: Is bootjdk explicitely set by command line arguments?
3855
3856
3857# Test: Is $JAVA_HOME set?
3858
3859
3860# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3861
3862
3863# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3864# $1: Argument to the java_home binary (optional)
3865
3866
3867# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3868
3869
3870# Look for a jdk in the given path. If there are multiple, try to select the newest.
3871# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3872# $1 = Path to directory containing jdk installations.
3873# $2 = String to append to the found JDK directory to get the proper JDK home
3874
3875
3876# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3877# environmental variable as base for where to look.
3878# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3879
3880
3881# Test: Is there a JDK installed in default, well-known locations?
3882
3883
3884# Check that a command-line tool in the Boot JDK is correct
3885# $1 = name of variable to assign
3886# $2 = name of binary
3887
3888
3889###############################################################################
3890#
3891# We need a Boot JDK to bootstrap the build.
3892#
3893
3894
3895
3896
3897
3898# BUILD_JDK: the location of the latest JDK that can run
3899#   on the host system and supports the target class file version
3900#   generated in this JDK build.  This variable should only be
3901#   used after the launchers are built.
3902#
3903
3904# Execute the check given as argument, and verify the result.
3905# If the JDK was previously found, do nothing.
3906# $1 A command line (typically autoconf macro) to execute
3907
3908
3909# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3910# is different than the host system doing the build (e.g. cross-compilation),
3911# a special BUILD_JDK is built as part of the build process.  An external
3912# prebuilt BUILD_JDK can also be supplied.
3913
3914
3915#
3916# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3918#
3919# This code is free software; you can redistribute it and/or modify it
3920# under the terms of the GNU General Public License version 2 only, as
3921# published by the Free Software Foundation.  Oracle designates this
3922# particular file as subject to the "Classpath" exception as provided
3923# by Oracle in the LICENSE file that accompanied this code.
3924#
3925# This code is distributed in the hope that it will be useful, but WITHOUT
3926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3928# version 2 for more details (a copy is included in the LICENSE file that
3929# accompanied this code).
3930#
3931# You should have received a copy of the GNU General Public License version
3932# 2 along with this work; if not, write to the Free Software Foundation,
3933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3934#
3935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3936# or visit www.oracle.com if you need additional information or have any
3937# questions.
3938#
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956################################################################################
3957#
3958# Runs icecc-create-env once and prints the error if it fails
3959#
3960# $1: arguments to icecc-create-env
3961# $2: log file
3962#
3963
3964
3965################################################################################
3966#
3967# Optionally enable distributed compilation of native code using icecc/icecream
3968#
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4002# corresponding configure arguments instead
4003
4004
4005# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4006# that configure can use them while detecting compilers.
4007# TOOLCHAIN_TYPE is available here.
4008# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4009
4010
4011
4012
4013
4014
4015# Documentation on common flags used for solstudio in HIGHEST.
4016#
4017# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4018#          done with care, there are some assumptions below that need to
4019#          be understood about the use of pointers, and IEEE behavior.
4020#
4021# -fns: Use non-standard floating point mode (not IEEE 754)
4022# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4023# -fsingle: Use single precision floating point with 'float'
4024# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4025#   (Source with excessing pointer casting and data access with mixed
4026#    pointer types are not recommended)
4027# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4028#   (If you expect perfect errno behavior, do not use this)
4029# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4030# -xrestrict: Pointer parameters to functions do not overlap
4031#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4032#    If you pass in multiple pointers to the same data, do not use this)
4033# -xlibmil: Inline some library routines
4034#   (If you expect perfect errno behavior, do not use this)
4035# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4036#   (If you expect perfect errno behavior, do not use this)
4037#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4038
4039    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4040    # Bug?
4041    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4042    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4043    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4044    #fi
4045
4046
4047
4048
4049
4050
4051################################################################################
4052# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4053#      conditionals against.
4054# $2 - Optional prefix for each variable defined.
4055
4056
4057# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4058#                                  IF_FALSE: [RUN-IF-FALSE])
4059# ------------------------------------------------------------
4060# Check that the C compiler supports an argument
4061
4062
4063
4064
4065# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4066#                                    IF_FALSE: [RUN-IF-FALSE])
4067# ------------------------------------------------------------
4068# Check that the C++ compiler supports an argument
4069
4070
4071
4072
4073# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C and C++ compilers support an argument
4077
4078
4079
4080
4081# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                   IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the linker support an argument
4085
4086
4087
4088
4089
4090
4091# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4092# Arguments:
4093# $1 - Optional prefix for each variable defined.
4094
4095
4096#
4097# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099#
4100# This code is free software; you can redistribute it and/or modify it
4101# under the terms of the GNU General Public License version 2 only, as
4102# published by the Free Software Foundation.  Oracle designates this
4103# particular file as subject to the "Classpath" exception as provided
4104# by Oracle in the LICENSE file that accompanied this code.
4105#
4106# This code is distributed in the hope that it will be useful, but WITHOUT
4107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109# version 2 for more details (a copy is included in the LICENSE file that
4110# accompanied this code).
4111#
4112# You should have received a copy of the GNU General Public License version
4113# 2 along with this work; if not, write to the Free Software Foundation,
4114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115#
4116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117# or visit www.oracle.com if you need additional information or have any
4118# questions.
4119#
4120
4121
4122
4123
4124
4125cygwin_help() {
4126  case $1 in
4127    unzip)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    zip)
4132      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4133      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4134      ;;
4135    make)
4136      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4137      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4138      ;;
4139    freetype)
4140      HELP_MSG="
4141The freetype library can now be build during the configure process.
4142Download the freetype sources and unpack them into an arbitrary directory:
4143
4144wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4145tar -xzf freetype-2.5.3.tar.gz
4146
4147Then run configure with '--with-freetype-src=<freetype_src>'. This will
4148automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4149builds or into '<freetype_src>/lib32' for 32-bit builds.
4150Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4151and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4152
4153Alternatively you can unpack the sources like this to use the default directory:
4154
4155tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4156      ;;
4157  esac
4158}
4159
4160msys_help() {
4161  PKGHANDLER_COMMAND=""
4162}
4163
4164apt_help() {
4165  case $1 in
4166    reduced)
4167      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4168    devkit)
4169      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4170    openjdk)
4171      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4172    alsa)
4173      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4174    cups)
4175      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4176    freetype)
4177      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4178    ffi)
4179      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4180    x11)
4181      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4182    ccache)
4183      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4184    dtrace)
4185      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4186  esac
4187}
4188
4189yum_help() {
4190  case $1 in
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4201    x11)
4202      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4203    ccache)
4204      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4205  esac
4206}
4207
4208port_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212pkgutil_help() {
4213  PKGHANDLER_COMMAND=""
4214}
4215
4216pkgadd_help() {
4217  PKGHANDLER_COMMAND=""
4218}
4219
4220# This function will check if we're called from the "configure" wrapper while
4221# printing --help. If so, we will print out additional information that can
4222# only be extracted within the autoconf script, and then exit. This must be
4223# called at the very beginning in configure.ac.
4224
4225
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# All valid JVM features, regardless of platform
4256VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4257    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4258
4259# All valid JVM variants
4260VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4261
4262###############################################################################
4263# Check if the specified JVM variant should be built. To be used in shell if
4264# constructs, like this:
4265# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4266#
4267# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4268
4269# Definition kept in one line to allow inlining in if statements.
4270# Additional [] needed to keep m4 from mangling shell constructs.
4271
4272
4273###############################################################################
4274# Check if the specified JVM features are explicitly enabled. To be used in
4275# shell if constructs, like this:
4276# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4277#
4278# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4279
4280# Definition kept in one line to allow inlining in if statements.
4281# Additional [] needed to keep m4 from mangling shell constructs.
4282
4283
4284###############################################################################
4285# Check which variants of the JVM that we want to build. Available variants are:
4286#   server: normal interpreter, and a tiered C1/C2 compiler
4287#   client: normal interpreter, and C1 (no C2 compiler)
4288#   minimal: reduced form of client with optional features stripped out
4289#   core: normal interpreter only, no compiler
4290#   zero: C++ based interpreter only, no compiler
4291#   zeroshark: C++ based interpreter, and a llvm-based compiler
4292#   custom: baseline JVM with no default features
4293#
4294
4295
4296###############################################################################
4297# Check if dtrace should be enabled and has all prerequisites present.
4298#
4299
4300
4301###############################################################################
4302# Set up all JVM features for each JVM variant.
4303#
4304
4305
4306###############################################################################
4307# Validate JVM features once all setup is complete, including custom setup.
4308#
4309
4310
4311################################################################################
4312# Check if gtest should be built
4313#
4314
4315
4316#
4317# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4318# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4319#
4320# This code is free software; you can redistribute it and/or modify it
4321# under the terms of the GNU General Public License version 2 only, as
4322# published by the Free Software Foundation.  Oracle designates this
4323# particular file as subject to the "Classpath" exception as provided
4324# by Oracle in the LICENSE file that accompanied this code.
4325#
4326# This code is distributed in the hope that it will be useful, but WITHOUT
4327# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4328# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4329# version 2 for more details (a copy is included in the LICENSE file that
4330# accompanied this code).
4331#
4332# You should have received a copy of the GNU General Public License version
4333# 2 along with this work; if not, write to the Free Software Foundation,
4334# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4335#
4336# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4337# or visit www.oracle.com if you need additional information or have any
4338# questions.
4339#
4340
4341###############################################################################
4342# Check which variant of the JDK that we want to build.
4343# Currently we have:
4344#    normal:   standard edition
4345# but the custom make system may add other variants
4346#
4347# Effectively the JDK variant gives a name to a specific set of
4348# modules to compile into the JDK.
4349
4350
4351###############################################################################
4352# Set the debug level
4353#    release: no debug information, all optimizations, no asserts.
4354#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4355#    fastdebug: debug information (-g), all optimizations, all asserts
4356#    slowdebug: debug information (-g), no optimizations, all asserts
4357
4358
4359###############################################################################
4360#
4361# Should we build only OpenJDK even if closed sources are present?
4362#
4363
4364
4365
4366
4367###############################################################################
4368#
4369# Enable or disable the elliptic curve crypto implementation
4370#
4371
4372
4373
4374
4375################################################################################
4376#
4377# Gcov coverage data for hotspot
4378#
4379
4380
4381################################################################################
4382#
4383# Static build support.  When enabled will generate static
4384# libraries instead of shared libraries for all JDK libs.
4385#
4386
4387
4388################################################################################
4389#
4390# jlink options.
4391# We always keep packaged modules in JDK image.
4392#
4393
4394
4395################################################################################
4396#
4397# Check if building of the jtreg failure handler should be enabled.
4398#
4399
4400
4401################################################################################
4402#
4403# Enable or disable generation of the classlist at build time
4404#
4405
4406
4407#
4408# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410#
4411# This code is free software; you can redistribute it and/or modify it
4412# under the terms of the GNU General Public License version 2 only, as
4413# published by the Free Software Foundation.  Oracle designates this
4414# particular file as subject to the "Classpath" exception as provided
4415# by Oracle in the LICENSE file that accompanied this code.
4416#
4417# This code is distributed in the hope that it will be useful, but WITHOUT
4418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420# version 2 for more details (a copy is included in the LICENSE file that
4421# accompanied this code).
4422#
4423# You should have received a copy of the GNU General Public License version
4424# 2 along with this work; if not, write to the Free Software Foundation,
4425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426#
4427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428# or visit www.oracle.com if you need additional information or have any
4429# questions.
4430#
4431
4432###############################################################################
4433#
4434# Setup version numbers
4435#
4436
4437# Verify that a given string represents a valid version number, and assign it
4438# to a variable.
4439
4440# Argument 1: the variable to assign to
4441# Argument 2: the value given by the user
4442
4443
4444
4445
4446#
4447# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4449#
4450# This code is free software; you can redistribute it and/or modify it
4451# under the terms of the GNU General Public License version 2 only, as
4452# published by the Free Software Foundation.  Oracle designates this
4453# particular file as subject to the "Classpath" exception as provided
4454# by Oracle in the LICENSE file that accompanied this code.
4455#
4456# This code is distributed in the hope that it will be useful, but WITHOUT
4457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4459# version 2 for more details (a copy is included in the LICENSE file that
4460# accompanied this code).
4461#
4462# You should have received a copy of the GNU General Public License version
4463# 2 along with this work; if not, write to the Free Software Foundation,
4464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4465#
4466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4467# or visit www.oracle.com if you need additional information or have any
4468# questions.
4469#
4470
4471# Major library component reside in separate files.
4472#
4473# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497################################################################################
4498# Setup alsa (Advanced Linux Sound Architecture)
4499################################################################################
4500
4501
4502#
4503# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4505#
4506# This code is free software; you can redistribute it and/or modify it
4507# under the terms of the GNU General Public License version 2 only, as
4508# published by the Free Software Foundation.  Oracle designates this
4509# particular file as subject to the "Classpath" exception as provided
4510# by Oracle in the LICENSE file that accompanied this code.
4511#
4512# This code is distributed in the hope that it will be useful, but WITHOUT
4513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4515# version 2 for more details (a copy is included in the LICENSE file that
4516# accompanied this code).
4517#
4518# You should have received a copy of the GNU General Public License version
4519# 2 along with this work; if not, write to the Free Software Foundation,
4520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4521#
4522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4523# or visit www.oracle.com if you need additional information or have any
4524# questions.
4525#
4526
4527################################################################################
4528# Setup bundled libraries.
4529#
4530# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4531# OpenJDK repository. Default is to use these libraries as bundled, but they
4532# might be replaced by en external version by the user.
4533################################################################################
4534
4535
4536################################################################################
4537# Setup libjpeg
4538################################################################################
4539
4540
4541################################################################################
4542# Setup giflib
4543################################################################################
4544
4545
4546################################################################################
4547# Setup libpng
4548################################################################################
4549
4550
4551################################################################################
4552# Setup zlib
4553################################################################################
4554
4555
4556################################################################################
4557# Setup lcms (Little CMS)
4558################################################################################
4559
4560
4561#
4562# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586################################################################################
4587# Setup cups (Common Unix Printing System)
4588################################################################################
4589
4590
4591#
4592# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4593# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4594#
4595# This code is free software; you can redistribute it and/or modify it
4596# under the terms of the GNU General Public License version 2 only, as
4597# published by the Free Software Foundation.  Oracle designates this
4598# particular file as subject to the "Classpath" exception as provided
4599# by Oracle in the LICENSE file that accompanied this code.
4600#
4601# This code is distributed in the hope that it will be useful, but WITHOUT
4602# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4603# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4604# version 2 for more details (a copy is included in the LICENSE file that
4605# accompanied this code).
4606#
4607# You should have received a copy of the GNU General Public License version
4608# 2 along with this work; if not, write to the Free Software Foundation,
4609# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4610#
4611# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4612# or visit www.oracle.com if you need additional information or have any
4613# questions.
4614#
4615
4616################################################################################
4617# Setup libffi (Foreign Function Interface)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Build the freetype lib from source
4648################################################################################
4649
4650
4651################################################################################
4652# Check if a potential freeype library match is correct and usable
4653################################################################################
4654
4655
4656################################################################################
4657# Setup freetype (The FreeType2 font rendering library)
4658################################################################################
4659
4660
4661#
4662# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686################################################################################
4687# Setup the standard C/C++ runtime libraries.
4688#
4689# Most importantly, determine if stdc++ should be linked statically or
4690# dynamically.
4691################################################################################
4692
4693
4694#
4695# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4696# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4697#
4698# This code is free software; you can redistribute it and/or modify it
4699# under the terms of the GNU General Public License version 2 only, as
4700# published by the Free Software Foundation.  Oracle designates this
4701# particular file as subject to the "Classpath" exception as provided
4702# by Oracle in the LICENSE file that accompanied this code.
4703#
4704# This code is distributed in the hope that it will be useful, but WITHOUT
4705# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4706# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4707# version 2 for more details (a copy is included in the LICENSE file that
4708# accompanied this code).
4709#
4710# You should have received a copy of the GNU General Public License version
4711# 2 along with this work; if not, write to the Free Software Foundation,
4712# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4713#
4714# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4715# or visit www.oracle.com if you need additional information or have any
4716# questions.
4717#
4718
4719################################################################################
4720# Setup X11 Windows system
4721################################################################################
4722
4723
4724
4725################################################################################
4726# Determine which libraries are needed for this configuration
4727################################################################################
4728
4729
4730################################################################################
4731# Parse library options, and setup needed libraries
4732################################################################################
4733
4734
4735################################################################################
4736# Setup llvm (Low-Level VM)
4737################################################################################
4738
4739
4740################################################################################
4741# Setup various libraries, typically small system libraries
4742################################################################################
4743
4744
4745################################################################################
4746# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4747# redistribute it in the test image.
4748################################################################################
4749
4750
4751
4752#
4753# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755#
4756# This code is free software; you can redistribute it and/or modify it
4757# under the terms of the GNU General Public License version 2 only, as
4758# published by the Free Software Foundation.  Oracle designates this
4759# particular file as subject to the "Classpath" exception as provided
4760# by Oracle in the LICENSE file that accompanied this code.
4761#
4762# This code is distributed in the hope that it will be useful, but WITHOUT
4763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765# version 2 for more details (a copy is included in the LICENSE file that
4766# accompanied this code).
4767#
4768# You should have received a copy of the GNU General Public License version
4769# 2 along with this work; if not, write to the Free Software Foundation,
4770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771#
4772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773# or visit www.oracle.com if you need additional information or have any
4774# questions.
4775#
4776
4777# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778# Converts autoconf style CPU name to OpenJDK style, into
4779# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4780
4781
4782# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4783# Converts autoconf style OS name to OpenJDK style, into
4784# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4785
4786
4787# Expects $host_os $host_cpu $build_os and $build_cpu
4788# and $with_target_bits to have been setup!
4789#
4790# Translate the standard triplet(quadruplet) definition
4791# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4792# OPENJDK_BUILD_OS, etc.
4793
4794
4795# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4796# accordingly. Must be done after setting up build and target system, but before
4797# doing anything else with these values.
4798
4799
4800# Setup the legacy variables, for controlling the old makefiles.
4801#
4802
4803
4804# $1 - Either TARGET or BUILD to setup the variables for.
4805
4806
4807
4808
4809#%%% Build and target systems %%%
4810
4811
4812
4813
4814# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4815# Add -mX to various FLAGS variables.
4816
4817
4818
4819
4820
4821
4822#
4823# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825#
4826# This code is free software; you can redistribute it and/or modify it
4827# under the terms of the GNU General Public License version 2 only, as
4828# published by the Free Software Foundation.  Oracle designates this
4829# particular file as subject to the "Classpath" exception as provided
4830# by Oracle in the LICENSE file that accompanied this code.
4831#
4832# This code is distributed in the hope that it will be useful, but WITHOUT
4833# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835# version 2 for more details (a copy is included in the LICENSE file that
4836# accompanied this code).
4837#
4838# You should have received a copy of the GNU General Public License version
4839# 2 along with this work; if not, write to the Free Software Foundation,
4840# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841#
4842# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843# or visit www.oracle.com if you need additional information or have any
4844# questions.
4845#
4846
4847
4848
4849
4850
4851
4852
4853################################################################################
4854# Define a mechanism for importing extra prebuilt modules
4855#
4856
4857
4858
4859#
4860# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4862#
4863# This code is free software; you can redistribute it and/or modify it
4864# under the terms of the GNU General Public License version 2 only, as
4865# published by the Free Software Foundation.  Oracle designates this
4866# particular file as subject to the "Classpath" exception as provided
4867# by Oracle in the LICENSE file that accompanied this code.
4868#
4869# This code is distributed in the hope that it will be useful, but WITHOUT
4870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4872# version 2 for more details (a copy is included in the LICENSE file that
4873# accompanied this code).
4874#
4875# You should have received a copy of the GNU General Public License version
4876# 2 along with this work; if not, write to the Free Software Foundation,
4877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4878#
4879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4880# or visit www.oracle.com if you need additional information or have any
4881# questions.
4882#
4883
4884########################################################################
4885# This file is responsible for detecting, verifying and setting up the
4886# toolchain, i.e. the compiler, linker and related utilities. It will setup
4887# proper paths to the binaries, but it will not setup any flags.
4888#
4889# The binaries used is determined by the toolchain type, which is the family of
4890# compilers and related tools that are used.
4891########################################################################
4892
4893
4894# All valid toolchains, regardless of platform (used by help.m4)
4895VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4896
4897# These toolchains are valid on different platforms
4898VALID_TOOLCHAINS_linux="gcc clang"
4899VALID_TOOLCHAINS_solaris="solstudio"
4900VALID_TOOLCHAINS_macosx="gcc clang"
4901VALID_TOOLCHAINS_aix="xlc"
4902VALID_TOOLCHAINS_windows="microsoft"
4903
4904# Toolchain descriptions
4905TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4906TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4907TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4908TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4909TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4910
4911# Minimum supported versions, empty means unspecified
4912TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4913TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4914TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4915TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4916TOOLCHAIN_MINIMUM_VERSION_xlc=""
4917
4918# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4919# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4920# $1 - optional variable prefix for compiler and version variables (BUILD_)
4921# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4922
4923
4924# Check if the configured compiler (C and C++) is of a specific version or
4925# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4926#
4927# Arguments:
4928#   VERSION:   The version string to check against the found version
4929#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4930#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4931#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4932
4933
4934
4935
4936# Setup a number of variables describing how native output files are
4937# named on this platform/toolchain.
4938
4939
4940# Determine which toolchain type to use, and make sure it is valid for this
4941# platform. Setup various information about the selected toolchain.
4942
4943
4944# Before we start detecting the toolchain executables, we might need some
4945# special setup, e.g. additional paths etc.
4946
4947
4948# Restore path, etc
4949
4950
4951# Check if a compiler is of the toolchain type we expect, and save the version
4952# information from it. If the compiler does not match the expected type,
4953# this function will abort using AC_MSG_ERROR. If it matches, the version will
4954# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4955# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4956#
4957# $1 = compiler to test (CC or CXX)
4958# $2 = human readable name of compiler (C or C++)
4959
4960
4961# Try to locate the given C or C++ compiler in the path, or otherwise.
4962#
4963# $1 = compiler to test (CC or CXX)
4964# $2 = human readable name of compiler (C or C++)
4965# $3 = list of compiler names to search for
4966
4967
4968# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4969# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4970# archiver (AR). Verify that the compilers are correct according to the
4971# toolchain type.
4972
4973
4974# Setup additional tools that is considered a part of the toolchain, but not the
4975# core part. Many of these are highly platform-specific and do not exist,
4976# and/or are not needed on all platforms.
4977
4978
4979# Setup the build tools (i.e, the compiler and linker used to build programs
4980# that should be run on the build platform, not the target platform, as a build
4981# helper). Since the non-cross-compile case uses the normal, target compilers
4982# for this, we can only do this after these have been setup.
4983
4984
4985# Setup legacy variables that are still needed as alternative ways to refer to
4986# parts of the toolchain.
4987
4988
4989# Do some additional checks on the detected tools.
4990
4991
4992# Setup the JTReg Regression Test Harness.
4993
4994
4995#
4996# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4997# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4998#
4999# This code is free software; you can redistribute it and/or modify it
5000# under the terms of the GNU General Public License version 2 only, as
5001# published by the Free Software Foundation.  Oracle designates this
5002# particular file as subject to the "Classpath" exception as provided
5003# by Oracle in the LICENSE file that accompanied this code.
5004#
5005# This code is distributed in the hope that it will be useful, but WITHOUT
5006# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5007# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5008# version 2 for more details (a copy is included in the LICENSE file that
5009# accompanied this code).
5010#
5011# You should have received a copy of the GNU General Public License version
5012# 2 along with this work; if not, write to the Free Software Foundation,
5013# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5014#
5015# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5016# or visit www.oracle.com if you need additional information or have any
5017# questions.
5018#
5019
5020################################################################################
5021# The order of these defines the priority by which we try to find them.
5022VALID_VS_VERSIONS="2013 2012 2010"
5023
5024VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5025VS_VERSION_INTERNAL_2010=100
5026VS_MSVCR_2010=msvcr100.dll
5027# We don't use msvcp on Visual Studio 2010
5028#VS_MSVCP_2010=msvcp100.dll
5029VS_ENVVAR_2010="VS100COMNTOOLS"
5030VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5031VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5032VS_VS_PLATFORM_NAME_2010="v100"
5033VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5034
5035VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5036VS_VERSION_INTERNAL_2012=110
5037VS_MSVCR_2012=msvcr110.dll
5038VS_MSVCP_2012=msvcp110.dll
5039VS_ENVVAR_2012="VS110COMNTOOLS"
5040VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5041VS_SDK_INSTALLDIR_2012=
5042VS_VS_PLATFORM_NAME_2012="v110"
5043VS_SDK_PLATFORM_NAME_2012=
5044
5045VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5046VS_VERSION_INTERNAL_2013=120
5047VS_MSVCR_2013=msvcr120.dll
5048VS_MSVCP_2013=msvcp120.dll
5049VS_ENVVAR_2013="VS120COMNTOOLS"
5050VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5051VS_SDK_INSTALLDIR_2013=
5052VS_VS_PLATFORM_NAME_2013="v120"
5053VS_SDK_PLATFORM_NAME_2013=
5054
5055################################################################################
5056
5057
5058
5059################################################################################
5060
5061
5062
5063################################################################################
5064# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5065# build environment and assigns it to VS_ENV_CMD
5066
5067
5068################################################################################
5069
5070
5071
5072################################################################################
5073# Check if the VS env variables were setup prior to running configure.
5074# If not, then find vcvarsall.bat and run it automatically, and integrate
5075# the set env variables into the spec file.
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090# This line needs to be here, verbatim, after all includes and the dummy hook
5091# definitions. It is replaced with custom functionality when building
5092# custom sources.
5093#CUSTOM_AUTOCONF_INCLUDE
5094
5095# Do not change or remove the following line, it is needed for consistency checks:
5096DATE_WHEN_GENERATED=1479992729
5097
5098###############################################################################
5099#
5100# Initialization / Boot-strapping
5101#
5102# The bootstrapping process needs to solve the "chicken or the egg" problem,
5103# thus it jumps back and forth, each time gaining something needed later on.
5104#
5105###############################################################################
5106
5107# If we are requested to print additional help, do that and then exit.
5108# This must be the very first call.
5109
5110  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5111
5112    # Print available toolchains
5113    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5114    $PRINTF "Which are valid to use depends on the build platform.\n"
5115    for toolchain in $VALID_TOOLCHAINS_all; do
5116      # Use indirect variable referencing
5117      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5118      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5119      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5120    done
5121    $PRINTF "\n"
5122
5123    # Print available jvm features
5124    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5125    $PRINTF "Which are valid to use depends on the target platform.\n  "
5126    $PRINTF "%s " $VALID_JVM_FEATURES
5127    $PRINTF "\n"
5128
5129    # And now exit directly
5130    exit 0
5131  fi
5132
5133
5134# Basic initialization that must happen first of all in the normal process.
5135
5136  # Save the original command line. This is passed to us by the wrapper configure script.
5137
5138  # Save the path variable before it gets changed
5139  ORIGINAL_PATH="$PATH"
5140
5141  DATE_WHEN_CONFIGURED=`LANG=C date`
5142
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5144$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5146$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5147
5148
5149  # Start with tools that do not need have cross compilation support
5150  # and can be expected to be found in the default PATH. These tools are
5151  # used by configure.
5152
5153  # First are all the simple required tools.
5154
5155
5156
5157  # Publish this variable in the help.
5158
5159
5160  if [ -z "${BASENAME+x}" ]; then
5161    # The variable is not set by user, try to locate tool using the code snippet
5162    for ac_prog in basename
5163do
5164  # Extract the first word of "$ac_prog", so it can be a program name with args.
5165set dummy $ac_prog; ac_word=$2
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
5168if ${ac_cv_path_BASENAME+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171  case $BASENAME in
5172  [\\/]* | ?:[\\/]*)
5173  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5174  ;;
5175  *)
5176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  test -z "$as_dir" && as_dir=.
5181    for ac_exec_ext in '' $ac_executable_extensions; do
5182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191  ;;
5192esac
5193fi
5194BASENAME=$ac_cv_path_BASENAME
5195if test -n "$BASENAME"; then
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5197$as_echo "$BASENAME" >&6; }
5198else
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203
5204  test -n "$BASENAME" && break
5205done
5206
5207  else
5208    # The variable is set, but is it from the command line or the environment?
5209
5210    # Try to remove the string !BASENAME! from our list.
5211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213      # If it failed, the variable was not from the command line. Ignore it,
5214      # but warn the user (except for BASH, which is always set by the calling BASH).
5215      if test "xBASENAME" != xBASH; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5217$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5218      fi
5219      # Try to locate tool using the code snippet
5220      for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265    else
5266      # If it succeeded, then it was overridden by the user. We will use it
5267      # for the tool.
5268
5269      # First remove it from the list of overridden variables, so we can test
5270      # for unknown variables in the end.
5271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272
5273      # Check if we try to supply an empty value
5274      if test "x$BASENAME" = x; then
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5276$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5278$as_echo_n "checking for BASENAME... " >&6; }
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5280$as_echo "disabled" >&6; }
5281      else
5282        # Check if the provided tool contains a complete path.
5283        tool_specified="$BASENAME"
5284        tool_basename="${tool_specified##*/}"
5285        if test "x$tool_basename" = "x$tool_specified"; then
5286          # A command without a complete path is provided, search $PATH.
5287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5288$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5289          # Extract the first word of "$tool_basename", so it can be a program name with args.
5290set dummy $tool_basename; ac_word=$2
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5292$as_echo_n "checking for $ac_word... " >&6; }
5293if ${ac_cv_path_BASENAME+:} false; then :
5294  $as_echo_n "(cached) " >&6
5295else
5296  case $BASENAME in
5297  [\\/]* | ?:[\\/]*)
5298  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5299  ;;
5300  *)
5301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304  IFS=$as_save_IFS
5305  test -z "$as_dir" && as_dir=.
5306    for ac_exec_ext in '' $ac_executable_extensions; do
5307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5308    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310    break 2
5311  fi
5312done
5313  done
5314IFS=$as_save_IFS
5315
5316  ;;
5317esac
5318fi
5319BASENAME=$ac_cv_path_BASENAME
5320if test -n "$BASENAME"; then
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5322$as_echo "$BASENAME" >&6; }
5323else
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
5326fi
5327
5328
5329          if test "x$BASENAME" = x; then
5330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5331          fi
5332        else
5333          # Otherwise we believe it is a complete path. Use it as it is.
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5335$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5337$as_echo_n "checking for BASENAME... " >&6; }
5338          if test ! -x "$tool_specified"; then
5339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5340$as_echo "not found" >&6; }
5341            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5342          fi
5343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5344$as_echo "$tool_specified" >&6; }
5345        fi
5346      fi
5347    fi
5348
5349  fi
5350
5351
5352
5353  if test "x$BASENAME" = x; then
5354    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5355  fi
5356
5357
5358
5359
5360
5361  # Publish this variable in the help.
5362
5363
5364  if [ -z "${BASH+x}" ]; then
5365    # The variable is not set by user, try to locate tool using the code snippet
5366    for ac_prog in bash
5367do
5368  # Extract the first word of "$ac_prog", so it can be a program name with args.
5369set dummy $ac_prog; ac_word=$2
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371$as_echo_n "checking for $ac_word... " >&6; }
5372if ${ac_cv_path_BASH+:} false; then :
5373  $as_echo_n "(cached) " >&6
5374else
5375  case $BASH in
5376  [\\/]* | ?:[\\/]*)
5377  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5378  ;;
5379  *)
5380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381for as_dir in $PATH
5382do
5383  IFS=$as_save_IFS
5384  test -z "$as_dir" && as_dir=.
5385    for ac_exec_ext in '' $ac_executable_extensions; do
5386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5387    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389    break 2
5390  fi
5391done
5392  done
5393IFS=$as_save_IFS
5394
5395  ;;
5396esac
5397fi
5398BASH=$ac_cv_path_BASH
5399if test -n "$BASH"; then
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5401$as_echo "$BASH" >&6; }
5402else
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406
5407
5408  test -n "$BASH" && break
5409done
5410
5411  else
5412    # The variable is set, but is it from the command line or the environment?
5413
5414    # Try to remove the string !BASH! from our list.
5415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5417      # If it failed, the variable was not from the command line. Ignore it,
5418      # but warn the user (except for BASH, which is always set by the calling BASH).
5419      if test "xBASH" != xBASH; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5421$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5422      fi
5423      # Try to locate tool using the code snippet
5424      for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469    else
5470      # If it succeeded, then it was overridden by the user. We will use it
5471      # for the tool.
5472
5473      # First remove it from the list of overridden variables, so we can test
5474      # for unknown variables in the end.
5475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5476
5477      # Check if we try to supply an empty value
5478      if test "x$BASH" = x; then
5479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5480$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5482$as_echo_n "checking for BASH... " >&6; }
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5484$as_echo "disabled" >&6; }
5485      else
5486        # Check if the provided tool contains a complete path.
5487        tool_specified="$BASH"
5488        tool_basename="${tool_specified##*/}"
5489        if test "x$tool_basename" = "x$tool_specified"; then
5490          # A command without a complete path is provided, search $PATH.
5491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5492$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5493          # Extract the first word of "$tool_basename", so it can be a program name with args.
5494set dummy $tool_basename; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if ${ac_cv_path_BASH+:} false; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $BASH in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523BASH=$ac_cv_path_BASH
5524if test -n "$BASH"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5526$as_echo "$BASH" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533          if test "x$BASH" = x; then
5534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5535          fi
5536        else
5537          # Otherwise we believe it is a complete path. Use it as it is.
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5539$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5541$as_echo_n "checking for BASH... " >&6; }
5542          if test ! -x "$tool_specified"; then
5543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5544$as_echo "not found" >&6; }
5545            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5546          fi
5547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5548$as_echo "$tool_specified" >&6; }
5549        fi
5550      fi
5551    fi
5552
5553  fi
5554
5555
5556
5557  if test "x$BASH" = x; then
5558    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5559  fi
5560
5561
5562
5563
5564
5565  # Publish this variable in the help.
5566
5567
5568  if [ -z "${CAT+x}" ]; then
5569    # The variable is not set by user, try to locate tool using the code snippet
5570    for ac_prog in cat
5571do
5572  # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_path_CAT+:} false; then :
5577  $as_echo_n "(cached) " >&6
5578else
5579  case $CAT in
5580  [\\/]* | ?:[\\/]*)
5581  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5582  ;;
5583  *)
5584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585for as_dir in $PATH
5586do
5587  IFS=$as_save_IFS
5588  test -z "$as_dir" && as_dir=.
5589    for ac_exec_ext in '' $ac_executable_extensions; do
5590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5591    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593    break 2
5594  fi
5595done
5596  done
5597IFS=$as_save_IFS
5598
5599  ;;
5600esac
5601fi
5602CAT=$ac_cv_path_CAT
5603if test -n "$CAT"; then
5604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5605$as_echo "$CAT" >&6; }
5606else
5607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609fi
5610
5611
5612  test -n "$CAT" && break
5613done
5614
5615  else
5616    # The variable is set, but is it from the command line or the environment?
5617
5618    # Try to remove the string !CAT! from our list.
5619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5621      # If it failed, the variable was not from the command line. Ignore it,
5622      # but warn the user (except for BASH, which is always set by the calling BASH).
5623      if test "xCAT" != xBASH; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5625$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5626      fi
5627      # Try to locate tool using the code snippet
5628      for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673    else
5674      # If it succeeded, then it was overridden by the user. We will use it
5675      # for the tool.
5676
5677      # First remove it from the list of overridden variables, so we can test
5678      # for unknown variables in the end.
5679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5680
5681      # Check if we try to supply an empty value
5682      if test "x$CAT" = x; then
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5684$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5686$as_echo_n "checking for CAT... " >&6; }
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5688$as_echo "disabled" >&6; }
5689      else
5690        # Check if the provided tool contains a complete path.
5691        tool_specified="$CAT"
5692        tool_basename="${tool_specified##*/}"
5693        if test "x$tool_basename" = "x$tool_specified"; then
5694          # A command without a complete path is provided, search $PATH.
5695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5697          # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CAT+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CAT in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CAT=$ac_cv_path_CAT
5728if test -n "$CAT"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5730$as_echo "$CAT" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737          if test "x$CAT" = x; then
5738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739          fi
5740        else
5741          # Otherwise we believe it is a complete path. Use it as it is.
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5745$as_echo_n "checking for CAT... " >&6; }
5746          if test ! -x "$tool_specified"; then
5747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5750          fi
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753        fi
5754      fi
5755    fi
5756
5757  fi
5758
5759
5760
5761  if test "x$CAT" = x; then
5762    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5763  fi
5764
5765
5766
5767
5768
5769  # Publish this variable in the help.
5770
5771
5772  if [ -z "${CHMOD+x}" ]; then
5773    # The variable is not set by user, try to locate tool using the code snippet
5774    for ac_prog in chmod
5775do
5776  # Extract the first word of "$ac_prog", so it can be a program name with args.
5777set dummy $ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CHMOD+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CHMOD in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CHMOD=$ac_cv_path_CHMOD
5807if test -n "$CHMOD"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5809$as_echo "$CHMOD" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816  test -n "$CHMOD" && break
5817done
5818
5819  else
5820    # The variable is set, but is it from the command line or the environment?
5821
5822    # Try to remove the string !CHMOD! from our list.
5823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5825      # If it failed, the variable was not from the command line. Ignore it,
5826      # but warn the user (except for BASH, which is always set by the calling BASH).
5827      if test "xCHMOD" != xBASH; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5829$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5830      fi
5831      # Try to locate tool using the code snippet
5832      for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877    else
5878      # If it succeeded, then it was overridden by the user. We will use it
5879      # for the tool.
5880
5881      # First remove it from the list of overridden variables, so we can test
5882      # for unknown variables in the end.
5883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5884
5885      # Check if we try to supply an empty value
5886      if test "x$CHMOD" = x; then
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5888$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5890$as_echo_n "checking for CHMOD... " >&6; }
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5892$as_echo "disabled" >&6; }
5893      else
5894        # Check if the provided tool contains a complete path.
5895        tool_specified="$CHMOD"
5896        tool_basename="${tool_specified##*/}"
5897        if test "x$tool_basename" = "x$tool_specified"; then
5898          # A command without a complete path is provided, search $PATH.
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5900$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5901          # Extract the first word of "$tool_basename", so it can be a program name with args.
5902set dummy $tool_basename; ac_word=$2
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if ${ac_cv_path_CHMOD+:} false; then :
5906  $as_echo_n "(cached) " >&6
5907else
5908  case $CHMOD in
5909  [\\/]* | ?:[\\/]*)
5910  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5911  ;;
5912  *)
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_exec_ext in '' $ac_executable_extensions; do
5919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5920    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922    break 2
5923  fi
5924done
5925  done
5926IFS=$as_save_IFS
5927
5928  ;;
5929esac
5930fi
5931CHMOD=$ac_cv_path_CHMOD
5932if test -n "$CHMOD"; then
5933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5934$as_echo "$CHMOD" >&6; }
5935else
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937$as_echo "no" >&6; }
5938fi
5939
5940
5941          if test "x$CHMOD" = x; then
5942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5943          fi
5944        else
5945          # Otherwise we believe it is a complete path. Use it as it is.
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5947$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5949$as_echo_n "checking for CHMOD... " >&6; }
5950          if test ! -x "$tool_specified"; then
5951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5952$as_echo "not found" >&6; }
5953            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5954          fi
5955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5956$as_echo "$tool_specified" >&6; }
5957        fi
5958      fi
5959    fi
5960
5961  fi
5962
5963
5964
5965  if test "x$CHMOD" = x; then
5966    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5967  fi
5968
5969
5970
5971
5972
5973  # Publish this variable in the help.
5974
5975
5976  if [ -z "${CMP+x}" ]; then
5977    # The variable is not set by user, try to locate tool using the code snippet
5978    for ac_prog in cmp
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_path_CMP+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  case $CMP in
5988  [\\/]* | ?:[\\/]*)
5989  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5990  ;;
5991  *)
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007  ;;
6008esac
6009fi
6010CMP=$ac_cv_path_CMP
6011if test -n "$CMP"; then
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6013$as_echo "$CMP" >&6; }
6014else
6015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020  test -n "$CMP" && break
6021done
6022
6023  else
6024    # The variable is set, but is it from the command line or the environment?
6025
6026    # Try to remove the string !CMP! from our list.
6027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6029      # If it failed, the variable was not from the command line. Ignore it,
6030      # but warn the user (except for BASH, which is always set by the calling BASH).
6031      if test "xCMP" != xBASH; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6033$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6034      fi
6035      # Try to locate tool using the code snippet
6036      for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081    else
6082      # If it succeeded, then it was overridden by the user. We will use it
6083      # for the tool.
6084
6085      # First remove it from the list of overridden variables, so we can test
6086      # for unknown variables in the end.
6087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6088
6089      # Check if we try to supply an empty value
6090      if test "x$CMP" = x; then
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6092$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6094$as_echo_n "checking for CMP... " >&6; }
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6096$as_echo "disabled" >&6; }
6097      else
6098        # Check if the provided tool contains a complete path.
6099        tool_specified="$CMP"
6100        tool_basename="${tool_specified##*/}"
6101        if test "x$tool_basename" = "x$tool_specified"; then
6102          # A command without a complete path is provided, search $PATH.
6103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6104$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6105          # Extract the first word of "$tool_basename", so it can be a program name with args.
6106set dummy $tool_basename; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_path_CMP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  case $CMP in
6113  [\\/]* | ?:[\\/]*)
6114  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6115  ;;
6116  *)
6117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118for as_dir in $PATH
6119do
6120  IFS=$as_save_IFS
6121  test -z "$as_dir" && as_dir=.
6122    for ac_exec_ext in '' $ac_executable_extensions; do
6123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126    break 2
6127  fi
6128done
6129  done
6130IFS=$as_save_IFS
6131
6132  ;;
6133esac
6134fi
6135CMP=$ac_cv_path_CMP
6136if test -n "$CMP"; then
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6138$as_echo "$CMP" >&6; }
6139else
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145          if test "x$CMP" = x; then
6146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6147          fi
6148        else
6149          # Otherwise we believe it is a complete path. Use it as it is.
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6151$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6153$as_echo_n "checking for CMP... " >&6; }
6154          if test ! -x "$tool_specified"; then
6155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6156$as_echo "not found" >&6; }
6157            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6158          fi
6159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6160$as_echo "$tool_specified" >&6; }
6161        fi
6162      fi
6163    fi
6164
6165  fi
6166
6167
6168
6169  if test "x$CMP" = x; then
6170    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6171  fi
6172
6173
6174
6175
6176
6177  # Publish this variable in the help.
6178
6179
6180  if [ -z "${COMM+x}" ]; then
6181    # The variable is not set by user, try to locate tool using the code snippet
6182    for ac_prog in comm
6183do
6184  # Extract the first word of "$ac_prog", so it can be a program name with args.
6185set dummy $ac_prog; ac_word=$2
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187$as_echo_n "checking for $ac_word... " >&6; }
6188if ${ac_cv_path_COMM+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  case $COMM in
6192  [\\/]* | ?:[\\/]*)
6193  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6194  ;;
6195  *)
6196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199  IFS=$as_save_IFS
6200  test -z "$as_dir" && as_dir=.
6201    for ac_exec_ext in '' $ac_executable_extensions; do
6202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205    break 2
6206  fi
6207done
6208  done
6209IFS=$as_save_IFS
6210
6211  ;;
6212esac
6213fi
6214COMM=$ac_cv_path_COMM
6215if test -n "$COMM"; then
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6217$as_echo "$COMM" >&6; }
6218else
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224  test -n "$COMM" && break
6225done
6226
6227  else
6228    # The variable is set, but is it from the command line or the environment?
6229
6230    # Try to remove the string !COMM! from our list.
6231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6233      # If it failed, the variable was not from the command line. Ignore it,
6234      # but warn the user (except for BASH, which is always set by the calling BASH).
6235      if test "xCOMM" != xBASH; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6237$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6238      fi
6239      # Try to locate tool using the code snippet
6240      for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285    else
6286      # If it succeeded, then it was overridden by the user. We will use it
6287      # for the tool.
6288
6289      # First remove it from the list of overridden variables, so we can test
6290      # for unknown variables in the end.
6291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6292
6293      # Check if we try to supply an empty value
6294      if test "x$COMM" = x; then
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6296$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6298$as_echo_n "checking for COMM... " >&6; }
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6300$as_echo "disabled" >&6; }
6301      else
6302        # Check if the provided tool contains a complete path.
6303        tool_specified="$COMM"
6304        tool_basename="${tool_specified##*/}"
6305        if test "x$tool_basename" = "x$tool_specified"; then
6306          # A command without a complete path is provided, search $PATH.
6307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6308$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6309          # Extract the first word of "$tool_basename", so it can be a program name with args.
6310set dummy $tool_basename; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_path_COMM+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  case $COMM in
6317  [\\/]* | ?:[\\/]*)
6318  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6319  ;;
6320  *)
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_exec_ext in '' $ac_executable_extensions; do
6327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330    break 2
6331  fi
6332done
6333  done
6334IFS=$as_save_IFS
6335
6336  ;;
6337esac
6338fi
6339COMM=$ac_cv_path_COMM
6340if test -n "$COMM"; then
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6342$as_echo "$COMM" >&6; }
6343else
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
6348
6349          if test "x$COMM" = x; then
6350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351          fi
6352        else
6353          # Otherwise we believe it is a complete path. Use it as it is.
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6355$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6357$as_echo_n "checking for COMM... " >&6; }
6358          if test ! -x "$tool_specified"; then
6359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360$as_echo "not found" >&6; }
6361            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6362          fi
6363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364$as_echo "$tool_specified" >&6; }
6365        fi
6366      fi
6367    fi
6368
6369  fi
6370
6371
6372
6373  if test "x$COMM" = x; then
6374    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6375  fi
6376
6377
6378
6379
6380
6381  # Publish this variable in the help.
6382
6383
6384  if [ -z "${CP+x}" ]; then
6385    # The variable is not set by user, try to locate tool using the code snippet
6386    for ac_prog in cp
6387do
6388  # Extract the first word of "$ac_prog", so it can be a program name with args.
6389set dummy $ac_prog; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_CP+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $CP in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418CP=$ac_cv_path_CP
6419if test -n "$CP"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6421$as_echo "$CP" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428  test -n "$CP" && break
6429done
6430
6431  else
6432    # The variable is set, but is it from the command line or the environment?
6433
6434    # Try to remove the string !CP! from our list.
6435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437      # If it failed, the variable was not from the command line. Ignore it,
6438      # but warn the user (except for BASH, which is always set by the calling BASH).
6439      if test "xCP" != xBASH; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6441$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6442      fi
6443      # Try to locate tool using the code snippet
6444      for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489    else
6490      # If it succeeded, then it was overridden by the user. We will use it
6491      # for the tool.
6492
6493      # First remove it from the list of overridden variables, so we can test
6494      # for unknown variables in the end.
6495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496
6497      # Check if we try to supply an empty value
6498      if test "x$CP" = x; then
6499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6500$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6502$as_echo_n "checking for CP... " >&6; }
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6504$as_echo "disabled" >&6; }
6505      else
6506        # Check if the provided tool contains a complete path.
6507        tool_specified="$CP"
6508        tool_basename="${tool_specified##*/}"
6509        if test "x$tool_basename" = "x$tool_specified"; then
6510          # A command without a complete path is provided, search $PATH.
6511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6512$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6513          # Extract the first word of "$tool_basename", so it can be a program name with args.
6514set dummy $tool_basename; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_CP+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $CP in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543CP=$ac_cv_path_CP
6544if test -n "$CP"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6546$as_echo "$CP" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553          if test "x$CP" = x; then
6554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6555          fi
6556        else
6557          # Otherwise we believe it is a complete path. Use it as it is.
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6559$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6561$as_echo_n "checking for CP... " >&6; }
6562          if test ! -x "$tool_specified"; then
6563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6564$as_echo "not found" >&6; }
6565            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6566          fi
6567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6568$as_echo "$tool_specified" >&6; }
6569        fi
6570      fi
6571    fi
6572
6573  fi
6574
6575
6576
6577  if test "x$CP" = x; then
6578    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6579  fi
6580
6581
6582
6583
6584
6585  # Publish this variable in the help.
6586
6587
6588  if [ -z "${CUT+x}" ]; then
6589    # The variable is not set by user, try to locate tool using the code snippet
6590    for ac_prog in cut
6591do
6592  # Extract the first word of "$ac_prog", so it can be a program name with args.
6593set dummy $ac_prog; ac_word=$2
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595$as_echo_n "checking for $ac_word... " >&6; }
6596if ${ac_cv_path_CUT+:} false; then :
6597  $as_echo_n "(cached) " >&6
6598else
6599  case $CUT in
6600  [\\/]* | ?:[\\/]*)
6601  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6602  ;;
6603  *)
6604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605for as_dir in $PATH
6606do
6607  IFS=$as_save_IFS
6608  test -z "$as_dir" && as_dir=.
6609    for ac_exec_ext in '' $ac_executable_extensions; do
6610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613    break 2
6614  fi
6615done
6616  done
6617IFS=$as_save_IFS
6618
6619  ;;
6620esac
6621fi
6622CUT=$ac_cv_path_CUT
6623if test -n "$CUT"; then
6624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6625$as_echo "$CUT" >&6; }
6626else
6627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628$as_echo "no" >&6; }
6629fi
6630
6631
6632  test -n "$CUT" && break
6633done
6634
6635  else
6636    # The variable is set, but is it from the command line or the environment?
6637
6638    # Try to remove the string !CUT! from our list.
6639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6641      # If it failed, the variable was not from the command line. Ignore it,
6642      # but warn the user (except for BASH, which is always set by the calling BASH).
6643      if test "xCUT" != xBASH; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6645$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6646      fi
6647      # Try to locate tool using the code snippet
6648      for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693    else
6694      # If it succeeded, then it was overridden by the user. We will use it
6695      # for the tool.
6696
6697      # First remove it from the list of overridden variables, so we can test
6698      # for unknown variables in the end.
6699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6700
6701      # Check if we try to supply an empty value
6702      if test "x$CUT" = x; then
6703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6704$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6706$as_echo_n "checking for CUT... " >&6; }
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6708$as_echo "disabled" >&6; }
6709      else
6710        # Check if the provided tool contains a complete path.
6711        tool_specified="$CUT"
6712        tool_basename="${tool_specified##*/}"
6713        if test "x$tool_basename" = "x$tool_specified"; then
6714          # A command without a complete path is provided, search $PATH.
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6716$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6717          # Extract the first word of "$tool_basename", so it can be a program name with args.
6718set dummy $tool_basename; ac_word=$2
6719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720$as_echo_n "checking for $ac_word... " >&6; }
6721if ${ac_cv_path_CUT+:} false; then :
6722  $as_echo_n "(cached) " >&6
6723else
6724  case $CUT in
6725  [\\/]* | ?:[\\/]*)
6726  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6727  ;;
6728  *)
6729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732  IFS=$as_save_IFS
6733  test -z "$as_dir" && as_dir=.
6734    for ac_exec_ext in '' $ac_executable_extensions; do
6735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6736    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738    break 2
6739  fi
6740done
6741  done
6742IFS=$as_save_IFS
6743
6744  ;;
6745esac
6746fi
6747CUT=$ac_cv_path_CUT
6748if test -n "$CUT"; then
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6750$as_echo "$CUT" >&6; }
6751else
6752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753$as_echo "no" >&6; }
6754fi
6755
6756
6757          if test "x$CUT" = x; then
6758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6759          fi
6760        else
6761          # Otherwise we believe it is a complete path. Use it as it is.
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6763$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6765$as_echo_n "checking for CUT... " >&6; }
6766          if test ! -x "$tool_specified"; then
6767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6768$as_echo "not found" >&6; }
6769            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6770          fi
6771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6772$as_echo "$tool_specified" >&6; }
6773        fi
6774      fi
6775    fi
6776
6777  fi
6778
6779
6780
6781  if test "x$CUT" = x; then
6782    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6783  fi
6784
6785
6786
6787
6788
6789  # Publish this variable in the help.
6790
6791
6792  if [ -z "${DATE+x}" ]; then
6793    # The variable is not set by user, try to locate tool using the code snippet
6794    for ac_prog in date
6795do
6796  # Extract the first word of "$ac_prog", so it can be a program name with args.
6797set dummy $ac_prog; ac_word=$2
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799$as_echo_n "checking for $ac_word... " >&6; }
6800if ${ac_cv_path_DATE+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  case $DATE in
6804  [\\/]* | ?:[\\/]*)
6805  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6806  ;;
6807  *)
6808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6809for as_dir in $PATH
6810do
6811  IFS=$as_save_IFS
6812  test -z "$as_dir" && as_dir=.
6813    for ac_exec_ext in '' $ac_executable_extensions; do
6814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6815    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6817    break 2
6818  fi
6819done
6820  done
6821IFS=$as_save_IFS
6822
6823  ;;
6824esac
6825fi
6826DATE=$ac_cv_path_DATE
6827if test -n "$DATE"; then
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6829$as_echo "$DATE" >&6; }
6830else
6831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6832$as_echo "no" >&6; }
6833fi
6834
6835
6836  test -n "$DATE" && break
6837done
6838
6839  else
6840    # The variable is set, but is it from the command line or the environment?
6841
6842    # Try to remove the string !DATE! from our list.
6843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6845      # If it failed, the variable was not from the command line. Ignore it,
6846      # but warn the user (except for BASH, which is always set by the calling BASH).
6847      if test "xDATE" != xBASH; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6849$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6850      fi
6851      # Try to locate tool using the code snippet
6852      for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897    else
6898      # If it succeeded, then it was overridden by the user. We will use it
6899      # for the tool.
6900
6901      # First remove it from the list of overridden variables, so we can test
6902      # for unknown variables in the end.
6903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6904
6905      # Check if we try to supply an empty value
6906      if test "x$DATE" = x; then
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6908$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6910$as_echo_n "checking for DATE... " >&6; }
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6912$as_echo "disabled" >&6; }
6913      else
6914        # Check if the provided tool contains a complete path.
6915        tool_specified="$DATE"
6916        tool_basename="${tool_specified##*/}"
6917        if test "x$tool_basename" = "x$tool_specified"; then
6918          # A command without a complete path is provided, search $PATH.
6919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6920$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6921          # Extract the first word of "$tool_basename", so it can be a program name with args.
6922set dummy $tool_basename; ac_word=$2
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924$as_echo_n "checking for $ac_word... " >&6; }
6925if ${ac_cv_path_DATE+:} false; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  case $DATE in
6929  [\\/]* | ?:[\\/]*)
6930  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6931  ;;
6932  *)
6933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934for as_dir in $PATH
6935do
6936  IFS=$as_save_IFS
6937  test -z "$as_dir" && as_dir=.
6938    for ac_exec_ext in '' $ac_executable_extensions; do
6939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942    break 2
6943  fi
6944done
6945  done
6946IFS=$as_save_IFS
6947
6948  ;;
6949esac
6950fi
6951DATE=$ac_cv_path_DATE
6952if test -n "$DATE"; then
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6954$as_echo "$DATE" >&6; }
6955else
6956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957$as_echo "no" >&6; }
6958fi
6959
6960
6961          if test "x$DATE" = x; then
6962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6963          fi
6964        else
6965          # Otherwise we believe it is a complete path. Use it as it is.
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6967$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6969$as_echo_n "checking for DATE... " >&6; }
6970          if test ! -x "$tool_specified"; then
6971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6972$as_echo "not found" >&6; }
6973            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6974          fi
6975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6976$as_echo "$tool_specified" >&6; }
6977        fi
6978      fi
6979    fi
6980
6981  fi
6982
6983
6984
6985  if test "x$DATE" = x; then
6986    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6987  fi
6988
6989
6990
6991
6992
6993  # Publish this variable in the help.
6994
6995
6996  if [ -z "${DIFF+x}" ]; then
6997    # The variable is not set by user, try to locate tool using the code snippet
6998    for ac_prog in gdiff diff
6999do
7000  # Extract the first word of "$ac_prog", so it can be a program name with args.
7001set dummy $ac_prog; ac_word=$2
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003$as_echo_n "checking for $ac_word... " >&6; }
7004if ${ac_cv_path_DIFF+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  case $DIFF in
7008  [\\/]* | ?:[\\/]*)
7009  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7010  ;;
7011  *)
7012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013for as_dir in $PATH
7014do
7015  IFS=$as_save_IFS
7016  test -z "$as_dir" && as_dir=.
7017    for ac_exec_ext in '' $ac_executable_extensions; do
7018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021    break 2
7022  fi
7023done
7024  done
7025IFS=$as_save_IFS
7026
7027  ;;
7028esac
7029fi
7030DIFF=$ac_cv_path_DIFF
7031if test -n "$DIFF"; then
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7033$as_echo "$DIFF" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038
7039
7040  test -n "$DIFF" && break
7041done
7042
7043  else
7044    # The variable is set, but is it from the command line or the environment?
7045
7046    # Try to remove the string !DIFF! from our list.
7047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7049      # If it failed, the variable was not from the command line. Ignore it,
7050      # but warn the user (except for BASH, which is always set by the calling BASH).
7051      if test "xDIFF" != xBASH; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7053$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7054      fi
7055      # Try to locate tool using the code snippet
7056      for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101    else
7102      # If it succeeded, then it was overridden by the user. We will use it
7103      # for the tool.
7104
7105      # First remove it from the list of overridden variables, so we can test
7106      # for unknown variables in the end.
7107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7108
7109      # Check if we try to supply an empty value
7110      if test "x$DIFF" = x; then
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7112$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7114$as_echo_n "checking for DIFF... " >&6; }
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7116$as_echo "disabled" >&6; }
7117      else
7118        # Check if the provided tool contains a complete path.
7119        tool_specified="$DIFF"
7120        tool_basename="${tool_specified##*/}"
7121        if test "x$tool_basename" = "x$tool_specified"; then
7122          # A command without a complete path is provided, search $PATH.
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7125          # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_DIFF+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $DIFF in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155DIFF=$ac_cv_path_DIFF
7156if test -n "$DIFF"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7158$as_echo "$DIFF" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165          if test "x$DIFF" = x; then
7166            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167          fi
7168        else
7169          # Otherwise we believe it is a complete path. Use it as it is.
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7173$as_echo_n "checking for DIFF... " >&6; }
7174          if test ! -x "$tool_specified"; then
7175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7178          fi
7179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181        fi
7182      fi
7183    fi
7184
7185  fi
7186
7187
7188
7189  if test "x$DIFF" = x; then
7190    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if [ -z "${DIRNAME+x}" ]; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in dirname
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_DIRNAME+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $DIRNAME in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234DIRNAME=$ac_cv_path_DIRNAME
7235if test -n "$DIRNAME"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7237$as_echo "$DIRNAME" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$DIRNAME" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !DIRNAME! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xDIRNAME" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if we try to supply an empty value
7314      if test "x$DIRNAME" = x; then
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7316$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7318$as_echo_n "checking for DIRNAME... " >&6; }
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7320$as_echo "disabled" >&6; }
7321      else
7322        # Check if the provided tool contains a complete path.
7323        tool_specified="$DIRNAME"
7324        tool_basename="${tool_specified##*/}"
7325        if test "x$tool_basename" = "x$tool_specified"; then
7326          # A command without a complete path is provided, search $PATH.
7327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7328$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7329          # Extract the first word of "$tool_basename", so it can be a program name with args.
7330set dummy $tool_basename; ac_word=$2
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332$as_echo_n "checking for $ac_word... " >&6; }
7333if ${ac_cv_path_DIRNAME+:} false; then :
7334  $as_echo_n "(cached) " >&6
7335else
7336  case $DIRNAME in
7337  [\\/]* | ?:[\\/]*)
7338  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7339  ;;
7340  *)
7341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342for as_dir in $PATH
7343do
7344  IFS=$as_save_IFS
7345  test -z "$as_dir" && as_dir=.
7346    for ac_exec_ext in '' $ac_executable_extensions; do
7347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350    break 2
7351  fi
7352done
7353  done
7354IFS=$as_save_IFS
7355
7356  ;;
7357esac
7358fi
7359DIRNAME=$ac_cv_path_DIRNAME
7360if test -n "$DIRNAME"; then
7361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7362$as_echo "$DIRNAME" >&6; }
7363else
7364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365$as_echo "no" >&6; }
7366fi
7367
7368
7369          if test "x$DIRNAME" = x; then
7370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7371          fi
7372        else
7373          # Otherwise we believe it is a complete path. Use it as it is.
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7375$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7377$as_echo_n "checking for DIRNAME... " >&6; }
7378          if test ! -x "$tool_specified"; then
7379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7380$as_echo "not found" >&6; }
7381            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7382          fi
7383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7384$as_echo "$tool_specified" >&6; }
7385        fi
7386      fi
7387    fi
7388
7389  fi
7390
7391
7392
7393  if test "x$DIRNAME" = x; then
7394    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7395  fi
7396
7397
7398
7399
7400
7401  # Publish this variable in the help.
7402
7403
7404  if [ -z "${ECHO+x}" ]; then
7405    # The variable is not set by user, try to locate tool using the code snippet
7406    for ac_prog in echo
7407do
7408  # Extract the first word of "$ac_prog", so it can be a program name with args.
7409set dummy $ac_prog; ac_word=$2
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
7412if ${ac_cv_path_ECHO+:} false; then :
7413  $as_echo_n "(cached) " >&6
7414else
7415  case $ECHO in
7416  [\\/]* | ?:[\\/]*)
7417  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7418  ;;
7419  *)
7420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421for as_dir in $PATH
7422do
7423  IFS=$as_save_IFS
7424  test -z "$as_dir" && as_dir=.
7425    for ac_exec_ext in '' $ac_executable_extensions; do
7426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7427    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7429    break 2
7430  fi
7431done
7432  done
7433IFS=$as_save_IFS
7434
7435  ;;
7436esac
7437fi
7438ECHO=$ac_cv_path_ECHO
7439if test -n "$ECHO"; then
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7441$as_echo "$ECHO" >&6; }
7442else
7443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444$as_echo "no" >&6; }
7445fi
7446
7447
7448  test -n "$ECHO" && break
7449done
7450
7451  else
7452    # The variable is set, but is it from the command line or the environment?
7453
7454    # Try to remove the string !ECHO! from our list.
7455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7457      # If it failed, the variable was not from the command line. Ignore it,
7458      # but warn the user (except for BASH, which is always set by the calling BASH).
7459      if test "xECHO" != xBASH; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7461$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7462      fi
7463      # Try to locate tool using the code snippet
7464      for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509    else
7510      # If it succeeded, then it was overridden by the user. We will use it
7511      # for the tool.
7512
7513      # First remove it from the list of overridden variables, so we can test
7514      # for unknown variables in the end.
7515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7516
7517      # Check if we try to supply an empty value
7518      if test "x$ECHO" = x; then
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7520$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7522$as_echo_n "checking for ECHO... " >&6; }
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7524$as_echo "disabled" >&6; }
7525      else
7526        # Check if the provided tool contains a complete path.
7527        tool_specified="$ECHO"
7528        tool_basename="${tool_specified##*/}"
7529        if test "x$tool_basename" = "x$tool_specified"; then
7530          # A command without a complete path is provided, search $PATH.
7531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7532$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7533          # Extract the first word of "$tool_basename", so it can be a program name with args.
7534set dummy $tool_basename; ac_word=$2
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
7537if ${ac_cv_path_ECHO+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  case $ECHO in
7541  [\\/]* | ?:[\\/]*)
7542  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7543  ;;
7544  *)
7545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548  IFS=$as_save_IFS
7549  test -z "$as_dir" && as_dir=.
7550    for ac_exec_ext in '' $ac_executable_extensions; do
7551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554    break 2
7555  fi
7556done
7557  done
7558IFS=$as_save_IFS
7559
7560  ;;
7561esac
7562fi
7563ECHO=$ac_cv_path_ECHO
7564if test -n "$ECHO"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7566$as_echo "$ECHO" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573          if test "x$ECHO" = x; then
7574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7575          fi
7576        else
7577          # Otherwise we believe it is a complete path. Use it as it is.
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7579$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7581$as_echo_n "checking for ECHO... " >&6; }
7582          if test ! -x "$tool_specified"; then
7583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7584$as_echo "not found" >&6; }
7585            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7586          fi
7587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7588$as_echo "$tool_specified" >&6; }
7589        fi
7590      fi
7591    fi
7592
7593  fi
7594
7595
7596
7597  if test "x$ECHO" = x; then
7598    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7599  fi
7600
7601
7602
7603
7604
7605  # Publish this variable in the help.
7606
7607
7608  if [ -z "${EXPR+x}" ]; then
7609    # The variable is not set by user, try to locate tool using the code snippet
7610    for ac_prog in expr
7611do
7612  # Extract the first word of "$ac_prog", so it can be a program name with args.
7613set dummy $ac_prog; ac_word=$2
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615$as_echo_n "checking for $ac_word... " >&6; }
7616if ${ac_cv_path_EXPR+:} false; then :
7617  $as_echo_n "(cached) " >&6
7618else
7619  case $EXPR in
7620  [\\/]* | ?:[\\/]*)
7621  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7622  ;;
7623  *)
7624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625for as_dir in $PATH
7626do
7627  IFS=$as_save_IFS
7628  test -z "$as_dir" && as_dir=.
7629    for ac_exec_ext in '' $ac_executable_extensions; do
7630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7631    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633    break 2
7634  fi
7635done
7636  done
7637IFS=$as_save_IFS
7638
7639  ;;
7640esac
7641fi
7642EXPR=$ac_cv_path_EXPR
7643if test -n "$EXPR"; then
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7645$as_echo "$EXPR" >&6; }
7646else
7647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651
7652  test -n "$EXPR" && break
7653done
7654
7655  else
7656    # The variable is set, but is it from the command line or the environment?
7657
7658    # Try to remove the string !EXPR! from our list.
7659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7661      # If it failed, the variable was not from the command line. Ignore it,
7662      # but warn the user (except for BASH, which is always set by the calling BASH).
7663      if test "xEXPR" != xBASH; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7665$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7666      fi
7667      # Try to locate tool using the code snippet
7668      for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713    else
7714      # If it succeeded, then it was overridden by the user. We will use it
7715      # for the tool.
7716
7717      # First remove it from the list of overridden variables, so we can test
7718      # for unknown variables in the end.
7719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7720
7721      # Check if we try to supply an empty value
7722      if test "x$EXPR" = x; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7724$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7726$as_echo_n "checking for EXPR... " >&6; }
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7728$as_echo "disabled" >&6; }
7729      else
7730        # Check if the provided tool contains a complete path.
7731        tool_specified="$EXPR"
7732        tool_basename="${tool_specified##*/}"
7733        if test "x$tool_basename" = "x$tool_specified"; then
7734          # A command without a complete path is provided, search $PATH.
7735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7736$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7737          # Extract the first word of "$tool_basename", so it can be a program name with args.
7738set dummy $tool_basename; ac_word=$2
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740$as_echo_n "checking for $ac_word... " >&6; }
7741if ${ac_cv_path_EXPR+:} false; then :
7742  $as_echo_n "(cached) " >&6
7743else
7744  case $EXPR in
7745  [\\/]* | ?:[\\/]*)
7746  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7747  ;;
7748  *)
7749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750for as_dir in $PATH
7751do
7752  IFS=$as_save_IFS
7753  test -z "$as_dir" && as_dir=.
7754    for ac_exec_ext in '' $ac_executable_extensions; do
7755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758    break 2
7759  fi
7760done
7761  done
7762IFS=$as_save_IFS
7763
7764  ;;
7765esac
7766fi
7767EXPR=$ac_cv_path_EXPR
7768if test -n "$EXPR"; then
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7770$as_echo "$EXPR" >&6; }
7771else
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773$as_echo "no" >&6; }
7774fi
7775
7776
7777          if test "x$EXPR" = x; then
7778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7779          fi
7780        else
7781          # Otherwise we believe it is a complete path. Use it as it is.
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7783$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7785$as_echo_n "checking for EXPR... " >&6; }
7786          if test ! -x "$tool_specified"; then
7787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7788$as_echo "not found" >&6; }
7789            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7790          fi
7791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7792$as_echo "$tool_specified" >&6; }
7793        fi
7794      fi
7795    fi
7796
7797  fi
7798
7799
7800
7801  if test "x$EXPR" = x; then
7802    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7803  fi
7804
7805
7806
7807
7808
7809  # Publish this variable in the help.
7810
7811
7812  if [ -z "${FILE+x}" ]; then
7813    # The variable is not set by user, try to locate tool using the code snippet
7814    for ac_prog in file
7815do
7816  # Extract the first word of "$ac_prog", so it can be a program name with args.
7817set dummy $ac_prog; ac_word=$2
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819$as_echo_n "checking for $ac_word... " >&6; }
7820if ${ac_cv_path_FILE+:} false; then :
7821  $as_echo_n "(cached) " >&6
7822else
7823  case $FILE in
7824  [\\/]* | ?:[\\/]*)
7825  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7826  ;;
7827  *)
7828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829for as_dir in $PATH
7830do
7831  IFS=$as_save_IFS
7832  test -z "$as_dir" && as_dir=.
7833    for ac_exec_ext in '' $ac_executable_extensions; do
7834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7835    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7837    break 2
7838  fi
7839done
7840  done
7841IFS=$as_save_IFS
7842
7843  ;;
7844esac
7845fi
7846FILE=$ac_cv_path_FILE
7847if test -n "$FILE"; then
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7849$as_echo "$FILE" >&6; }
7850else
7851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7852$as_echo "no" >&6; }
7853fi
7854
7855
7856  test -n "$FILE" && break
7857done
7858
7859  else
7860    # The variable is set, but is it from the command line or the environment?
7861
7862    # Try to remove the string !FILE! from our list.
7863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7865      # If it failed, the variable was not from the command line. Ignore it,
7866      # but warn the user (except for BASH, which is always set by the calling BASH).
7867      if test "xFILE" != xBASH; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7869$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7870      fi
7871      # Try to locate tool using the code snippet
7872      for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917    else
7918      # If it succeeded, then it was overridden by the user. We will use it
7919      # for the tool.
7920
7921      # First remove it from the list of overridden variables, so we can test
7922      # for unknown variables in the end.
7923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7924
7925      # Check if we try to supply an empty value
7926      if test "x$FILE" = x; then
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7928$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7930$as_echo_n "checking for FILE... " >&6; }
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7932$as_echo "disabled" >&6; }
7933      else
7934        # Check if the provided tool contains a complete path.
7935        tool_specified="$FILE"
7936        tool_basename="${tool_specified##*/}"
7937        if test "x$tool_basename" = "x$tool_specified"; then
7938          # A command without a complete path is provided, search $PATH.
7939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7940$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7941          # Extract the first word of "$tool_basename", so it can be a program name with args.
7942set dummy $tool_basename; ac_word=$2
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944$as_echo_n "checking for $ac_word... " >&6; }
7945if ${ac_cv_path_FILE+:} false; then :
7946  $as_echo_n "(cached) " >&6
7947else
7948  case $FILE in
7949  [\\/]* | ?:[\\/]*)
7950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7951  ;;
7952  *)
7953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954for as_dir in $PATH
7955do
7956  IFS=$as_save_IFS
7957  test -z "$as_dir" && as_dir=.
7958    for ac_exec_ext in '' $ac_executable_extensions; do
7959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962    break 2
7963  fi
7964done
7965  done
7966IFS=$as_save_IFS
7967
7968  ;;
7969esac
7970fi
7971FILE=$ac_cv_path_FILE
7972if test -n "$FILE"; then
7973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7974$as_echo "$FILE" >&6; }
7975else
7976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7977$as_echo "no" >&6; }
7978fi
7979
7980
7981          if test "x$FILE" = x; then
7982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7983          fi
7984        else
7985          # Otherwise we believe it is a complete path. Use it as it is.
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7987$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7989$as_echo_n "checking for FILE... " >&6; }
7990          if test ! -x "$tool_specified"; then
7991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7992$as_echo "not found" >&6; }
7993            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7994          fi
7995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7996$as_echo "$tool_specified" >&6; }
7997        fi
7998      fi
7999    fi
8000
8001  fi
8002
8003
8004
8005  if test "x$FILE" = x; then
8006    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8007  fi
8008
8009
8010
8011
8012
8013  # Publish this variable in the help.
8014
8015
8016  if [ -z "${FIND+x}" ]; then
8017    # The variable is not set by user, try to locate tool using the code snippet
8018    for ac_prog in find
8019do
8020  # Extract the first word of "$ac_prog", so it can be a program name with args.
8021set dummy $ac_prog; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if ${ac_cv_path_FIND+:} false; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  case $FIND in
8028  [\\/]* | ?:[\\/]*)
8029  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8030  ;;
8031  *)
8032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047  ;;
8048esac
8049fi
8050FIND=$ac_cv_path_FIND
8051if test -n "$FIND"; then
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8053$as_echo "$FIND" >&6; }
8054else
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057fi
8058
8059
8060  test -n "$FIND" && break
8061done
8062
8063  else
8064    # The variable is set, but is it from the command line or the environment?
8065
8066    # Try to remove the string !FIND! from our list.
8067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8069      # If it failed, the variable was not from the command line. Ignore it,
8070      # but warn the user (except for BASH, which is always set by the calling BASH).
8071      if test "xFIND" != xBASH; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8073$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8074      fi
8075      # Try to locate tool using the code snippet
8076      for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121    else
8122      # If it succeeded, then it was overridden by the user. We will use it
8123      # for the tool.
8124
8125      # First remove it from the list of overridden variables, so we can test
8126      # for unknown variables in the end.
8127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8128
8129      # Check if we try to supply an empty value
8130      if test "x$FIND" = x; then
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8132$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8134$as_echo_n "checking for FIND... " >&6; }
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8136$as_echo "disabled" >&6; }
8137      else
8138        # Check if the provided tool contains a complete path.
8139        tool_specified="$FIND"
8140        tool_basename="${tool_specified##*/}"
8141        if test "x$tool_basename" = "x$tool_specified"; then
8142          # A command without a complete path is provided, search $PATH.
8143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8144$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8145          # Extract the first word of "$tool_basename", so it can be a program name with args.
8146set dummy $tool_basename; ac_word=$2
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if ${ac_cv_path_FIND+:} false; then :
8150  $as_echo_n "(cached) " >&6
8151else
8152  case $FIND in
8153  [\\/]* | ?:[\\/]*)
8154  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8155  ;;
8156  *)
8157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160  IFS=$as_save_IFS
8161  test -z "$as_dir" && as_dir=.
8162    for ac_exec_ext in '' $ac_executable_extensions; do
8163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8164    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166    break 2
8167  fi
8168done
8169  done
8170IFS=$as_save_IFS
8171
8172  ;;
8173esac
8174fi
8175FIND=$ac_cv_path_FIND
8176if test -n "$FIND"; then
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8178$as_echo "$FIND" >&6; }
8179else
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
8182fi
8183
8184
8185          if test "x$FIND" = x; then
8186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8187          fi
8188        else
8189          # Otherwise we believe it is a complete path. Use it as it is.
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8191$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8193$as_echo_n "checking for FIND... " >&6; }
8194          if test ! -x "$tool_specified"; then
8195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8196$as_echo "not found" >&6; }
8197            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8198          fi
8199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8200$as_echo "$tool_specified" >&6; }
8201        fi
8202      fi
8203    fi
8204
8205  fi
8206
8207
8208
8209  if test "x$FIND" = x; then
8210    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8211  fi
8212
8213
8214
8215
8216
8217  # Publish this variable in the help.
8218
8219
8220  if [ -z "${HEAD+x}" ]; then
8221    # The variable is not set by user, try to locate tool using the code snippet
8222    for ac_prog in head
8223do
8224  # Extract the first word of "$ac_prog", so it can be a program name with args.
8225set dummy $ac_prog; ac_word=$2
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227$as_echo_n "checking for $ac_word... " >&6; }
8228if ${ac_cv_path_HEAD+:} false; then :
8229  $as_echo_n "(cached) " >&6
8230else
8231  case $HEAD in
8232  [\\/]* | ?:[\\/]*)
8233  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8234  ;;
8235  *)
8236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241    for ac_exec_ext in '' $ac_executable_extensions; do
8242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245    break 2
8246  fi
8247done
8248  done
8249IFS=$as_save_IFS
8250
8251  ;;
8252esac
8253fi
8254HEAD=$ac_cv_path_HEAD
8255if test -n "$HEAD"; then
8256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8257$as_echo "$HEAD" >&6; }
8258else
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
8261fi
8262
8263
8264  test -n "$HEAD" && break
8265done
8266
8267  else
8268    # The variable is set, but is it from the command line or the environment?
8269
8270    # Try to remove the string !HEAD! from our list.
8271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8273      # If it failed, the variable was not from the command line. Ignore it,
8274      # but warn the user (except for BASH, which is always set by the calling BASH).
8275      if test "xHEAD" != xBASH; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8277$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8278      fi
8279      # Try to locate tool using the code snippet
8280      for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325    else
8326      # If it succeeded, then it was overridden by the user. We will use it
8327      # for the tool.
8328
8329      # First remove it from the list of overridden variables, so we can test
8330      # for unknown variables in the end.
8331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8332
8333      # Check if we try to supply an empty value
8334      if test "x$HEAD" = x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8336$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8338$as_echo_n "checking for HEAD... " >&6; }
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8340$as_echo "disabled" >&6; }
8341      else
8342        # Check if the provided tool contains a complete path.
8343        tool_specified="$HEAD"
8344        tool_basename="${tool_specified##*/}"
8345        if test "x$tool_basename" = "x$tool_specified"; then
8346          # A command without a complete path is provided, search $PATH.
8347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8348$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8349          # Extract the first word of "$tool_basename", so it can be a program name with args.
8350set dummy $tool_basename; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
8353if ${ac_cv_path_HEAD+:} false; then :
8354  $as_echo_n "(cached) " >&6
8355else
8356  case $HEAD in
8357  [\\/]* | ?:[\\/]*)
8358  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8359  ;;
8360  *)
8361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364  IFS=$as_save_IFS
8365  test -z "$as_dir" && as_dir=.
8366    for ac_exec_ext in '' $ac_executable_extensions; do
8367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370    break 2
8371  fi
8372done
8373  done
8374IFS=$as_save_IFS
8375
8376  ;;
8377esac
8378fi
8379HEAD=$ac_cv_path_HEAD
8380if test -n "$HEAD"; then
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8382$as_echo "$HEAD" >&6; }
8383else
8384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
8386fi
8387
8388
8389          if test "x$HEAD" = x; then
8390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8391          fi
8392        else
8393          # Otherwise we believe it is a complete path. Use it as it is.
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8395$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8397$as_echo_n "checking for HEAD... " >&6; }
8398          if test ! -x "$tool_specified"; then
8399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8400$as_echo "not found" >&6; }
8401            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8402          fi
8403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8404$as_echo "$tool_specified" >&6; }
8405        fi
8406      fi
8407    fi
8408
8409  fi
8410
8411
8412
8413  if test "x$HEAD" = x; then
8414    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8415  fi
8416
8417
8418
8419
8420
8421  # Publish this variable in the help.
8422
8423
8424  if [ -z "${GUNZIP+x}" ]; then
8425    # The variable is not set by user, try to locate tool using the code snippet
8426    for ac_prog in gunzip
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_GUNZIP+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $GUNZIP in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458GUNZIP=$ac_cv_path_GUNZIP
8459if test -n "$GUNZIP"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8461$as_echo "$GUNZIP" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$GUNZIP" && break
8469done
8470
8471  else
8472    # The variable is set, but is it from the command line or the environment?
8473
8474    # Try to remove the string !GUNZIP! from our list.
8475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8477      # If it failed, the variable was not from the command line. Ignore it,
8478      # but warn the user (except for BASH, which is always set by the calling BASH).
8479      if test "xGUNZIP" != xBASH; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8481$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8482      fi
8483      # Try to locate tool using the code snippet
8484      for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529    else
8530      # If it succeeded, then it was overridden by the user. We will use it
8531      # for the tool.
8532
8533      # First remove it from the list of overridden variables, so we can test
8534      # for unknown variables in the end.
8535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8536
8537      # Check if we try to supply an empty value
8538      if test "x$GUNZIP" = x; then
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8540$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8542$as_echo_n "checking for GUNZIP... " >&6; }
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8544$as_echo "disabled" >&6; }
8545      else
8546        # Check if the provided tool contains a complete path.
8547        tool_specified="$GUNZIP"
8548        tool_basename="${tool_specified##*/}"
8549        if test "x$tool_basename" = "x$tool_specified"; then
8550          # A command without a complete path is provided, search $PATH.
8551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8552$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8553          # Extract the first word of "$tool_basename", so it can be a program name with args.
8554set dummy $tool_basename; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_GUNZIP+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $GUNZIP in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583GUNZIP=$ac_cv_path_GUNZIP
8584if test -n "$GUNZIP"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8586$as_echo "$GUNZIP" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593          if test "x$GUNZIP" = x; then
8594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8595          fi
8596        else
8597          # Otherwise we believe it is a complete path. Use it as it is.
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8599$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8601$as_echo_n "checking for GUNZIP... " >&6; }
8602          if test ! -x "$tool_specified"; then
8603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8604$as_echo "not found" >&6; }
8605            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8606          fi
8607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8608$as_echo "$tool_specified" >&6; }
8609        fi
8610      fi
8611    fi
8612
8613  fi
8614
8615
8616
8617  if test "x$GUNZIP" = x; then
8618    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8619  fi
8620
8621
8622
8623
8624
8625  # Publish this variable in the help.
8626
8627
8628  if [ -z "${GZIP+x}" ]; then
8629    # The variable is not set by user, try to locate tool using the code snippet
8630    for ac_prog in pigz gzip
8631do
8632  # Extract the first word of "$ac_prog", so it can be a program name with args.
8633set dummy $ac_prog; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_GZIP+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $GZIP in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662GZIP=$ac_cv_path_GZIP
8663if test -n "$GZIP"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8665$as_echo "$GZIP" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672  test -n "$GZIP" && break
8673done
8674
8675  else
8676    # The variable is set, but is it from the command line or the environment?
8677
8678    # Try to remove the string !GZIP! from our list.
8679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8681      # If it failed, the variable was not from the command line. Ignore it,
8682      # but warn the user (except for BASH, which is always set by the calling BASH).
8683      if test "xGZIP" != xBASH; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8685$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8686      fi
8687      # Try to locate tool using the code snippet
8688      for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733    else
8734      # If it succeeded, then it was overridden by the user. We will use it
8735      # for the tool.
8736
8737      # First remove it from the list of overridden variables, so we can test
8738      # for unknown variables in the end.
8739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8740
8741      # Check if we try to supply an empty value
8742      if test "x$GZIP" = x; then
8743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8744$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8746$as_echo_n "checking for GZIP... " >&6; }
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8748$as_echo "disabled" >&6; }
8749      else
8750        # Check if the provided tool contains a complete path.
8751        tool_specified="$GZIP"
8752        tool_basename="${tool_specified##*/}"
8753        if test "x$tool_basename" = "x$tool_specified"; then
8754          # A command without a complete path is provided, search $PATH.
8755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8756$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8757          # Extract the first word of "$tool_basename", so it can be a program name with args.
8758set dummy $tool_basename; ac_word=$2
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8760$as_echo_n "checking for $ac_word... " >&6; }
8761if ${ac_cv_path_GZIP+:} false; then :
8762  $as_echo_n "(cached) " >&6
8763else
8764  case $GZIP in
8765  [\\/]* | ?:[\\/]*)
8766  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8767  ;;
8768  *)
8769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770for as_dir in $PATH
8771do
8772  IFS=$as_save_IFS
8773  test -z "$as_dir" && as_dir=.
8774    for ac_exec_ext in '' $ac_executable_extensions; do
8775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778    break 2
8779  fi
8780done
8781  done
8782IFS=$as_save_IFS
8783
8784  ;;
8785esac
8786fi
8787GZIP=$ac_cv_path_GZIP
8788if test -n "$GZIP"; then
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8790$as_echo "$GZIP" >&6; }
8791else
8792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
8794fi
8795
8796
8797          if test "x$GZIP" = x; then
8798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8799          fi
8800        else
8801          # Otherwise we believe it is a complete path. Use it as it is.
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8803$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8805$as_echo_n "checking for GZIP... " >&6; }
8806          if test ! -x "$tool_specified"; then
8807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8808$as_echo "not found" >&6; }
8809            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8810          fi
8811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8812$as_echo "$tool_specified" >&6; }
8813        fi
8814      fi
8815    fi
8816
8817  fi
8818
8819
8820
8821  if test "x$GZIP" = x; then
8822    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8823  fi
8824
8825
8826
8827
8828
8829  # Publish this variable in the help.
8830
8831
8832  if [ -z "${LN+x}" ]; then
8833    # The variable is not set by user, try to locate tool using the code snippet
8834    for ac_prog in ln
8835do
8836  # Extract the first word of "$ac_prog", so it can be a program name with args.
8837set dummy $ac_prog; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_path_LN+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  case $LN in
8844  [\\/]* | ?:[\\/]*)
8845  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8846  ;;
8847  *)
8848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851  IFS=$as_save_IFS
8852  test -z "$as_dir" && as_dir=.
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863  ;;
8864esac
8865fi
8866LN=$ac_cv_path_LN
8867if test -n "$LN"; then
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8869$as_echo "$LN" >&6; }
8870else
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
8873fi
8874
8875
8876  test -n "$LN" && break
8877done
8878
8879  else
8880    # The variable is set, but is it from the command line or the environment?
8881
8882    # Try to remove the string !LN! from our list.
8883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8885      # If it failed, the variable was not from the command line. Ignore it,
8886      # but warn the user (except for BASH, which is always set by the calling BASH).
8887      if test "xLN" != xBASH; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8889$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8890      fi
8891      # Try to locate tool using the code snippet
8892      for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937    else
8938      # If it succeeded, then it was overridden by the user. We will use it
8939      # for the tool.
8940
8941      # First remove it from the list of overridden variables, so we can test
8942      # for unknown variables in the end.
8943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8944
8945      # Check if we try to supply an empty value
8946      if test "x$LN" = x; then
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8948$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8950$as_echo_n "checking for LN... " >&6; }
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8952$as_echo "disabled" >&6; }
8953      else
8954        # Check if the provided tool contains a complete path.
8955        tool_specified="$LN"
8956        tool_basename="${tool_specified##*/}"
8957        if test "x$tool_basename" = "x$tool_specified"; then
8958          # A command without a complete path is provided, search $PATH.
8959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8960$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8961          # Extract the first word of "$tool_basename", so it can be a program name with args.
8962set dummy $tool_basename; ac_word=$2
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8964$as_echo_n "checking for $ac_word... " >&6; }
8965if ${ac_cv_path_LN+:} false; then :
8966  $as_echo_n "(cached) " >&6
8967else
8968  case $LN in
8969  [\\/]* | ?:[\\/]*)
8970  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8971  ;;
8972  *)
8973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8974for as_dir in $PATH
8975do
8976  IFS=$as_save_IFS
8977  test -z "$as_dir" && as_dir=.
8978    for ac_exec_ext in '' $ac_executable_extensions; do
8979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8980    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8982    break 2
8983  fi
8984done
8985  done
8986IFS=$as_save_IFS
8987
8988  ;;
8989esac
8990fi
8991LN=$ac_cv_path_LN
8992if test -n "$LN"; then
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8994$as_echo "$LN" >&6; }
8995else
8996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997$as_echo "no" >&6; }
8998fi
8999
9000
9001          if test "x$LN" = x; then
9002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9003          fi
9004        else
9005          # Otherwise we believe it is a complete path. Use it as it is.
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9007$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9009$as_echo_n "checking for LN... " >&6; }
9010          if test ! -x "$tool_specified"; then
9011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9012$as_echo "not found" >&6; }
9013            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9014          fi
9015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9016$as_echo "$tool_specified" >&6; }
9017        fi
9018      fi
9019    fi
9020
9021  fi
9022
9023
9024
9025  if test "x$LN" = x; then
9026    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9027  fi
9028
9029
9030
9031
9032
9033  # Publish this variable in the help.
9034
9035
9036  if [ -z "${LS+x}" ]; then
9037    # The variable is not set by user, try to locate tool using the code snippet
9038    for ac_prog in ls
9039do
9040  # Extract the first word of "$ac_prog", so it can be a program name with args.
9041set dummy $ac_prog; ac_word=$2
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043$as_echo_n "checking for $ac_word... " >&6; }
9044if ${ac_cv_path_LS+:} false; then :
9045  $as_echo_n "(cached) " >&6
9046else
9047  case $LS in
9048  [\\/]* | ?:[\\/]*)
9049  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9050  ;;
9051  *)
9052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  test -z "$as_dir" && as_dir=.
9057    for ac_exec_ext in '' $ac_executable_extensions; do
9058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061    break 2
9062  fi
9063done
9064  done
9065IFS=$as_save_IFS
9066
9067  ;;
9068esac
9069fi
9070LS=$ac_cv_path_LS
9071if test -n "$LS"; then
9072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9073$as_echo "$LS" >&6; }
9074else
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076$as_echo "no" >&6; }
9077fi
9078
9079
9080  test -n "$LS" && break
9081done
9082
9083  else
9084    # The variable is set, but is it from the command line or the environment?
9085
9086    # Try to remove the string !LS! from our list.
9087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9089      # If it failed, the variable was not from the command line. Ignore it,
9090      # but warn the user (except for BASH, which is always set by the calling BASH).
9091      if test "xLS" != xBASH; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9093$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9094      fi
9095      # Try to locate tool using the code snippet
9096      for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141    else
9142      # If it succeeded, then it was overridden by the user. We will use it
9143      # for the tool.
9144
9145      # First remove it from the list of overridden variables, so we can test
9146      # for unknown variables in the end.
9147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9148
9149      # Check if we try to supply an empty value
9150      if test "x$LS" = x; then
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9152$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9154$as_echo_n "checking for LS... " >&6; }
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9156$as_echo "disabled" >&6; }
9157      else
9158        # Check if the provided tool contains a complete path.
9159        tool_specified="$LS"
9160        tool_basename="${tool_specified##*/}"
9161        if test "x$tool_basename" = "x$tool_specified"; then
9162          # A command without a complete path is provided, search $PATH.
9163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9164$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9165          # Extract the first word of "$tool_basename", so it can be a program name with args.
9166set dummy $tool_basename; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_LS+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $LS in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195LS=$ac_cv_path_LS
9196if test -n "$LS"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9198$as_echo "$LS" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205          if test "x$LS" = x; then
9206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9207          fi
9208        else
9209          # Otherwise we believe it is a complete path. Use it as it is.
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9211$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9213$as_echo_n "checking for LS... " >&6; }
9214          if test ! -x "$tool_specified"; then
9215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9216$as_echo "not found" >&6; }
9217            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9218          fi
9219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9220$as_echo "$tool_specified" >&6; }
9221        fi
9222      fi
9223    fi
9224
9225  fi
9226
9227
9228
9229  if test "x$LS" = x; then
9230    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9231  fi
9232
9233
9234
9235
9236
9237  # Publish this variable in the help.
9238
9239
9240  if [ -z "${MKDIR+x}" ]; then
9241    # The variable is not set by user, try to locate tool using the code snippet
9242    for ac_prog in mkdir
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if ${ac_cv_path_MKDIR+:} false; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $MKDIR in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274MKDIR=$ac_cv_path_MKDIR
9275if test -n "$MKDIR"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9277$as_echo "$MKDIR" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$MKDIR" && break
9285done
9286
9287  else
9288    # The variable is set, but is it from the command line or the environment?
9289
9290    # Try to remove the string !MKDIR! from our list.
9291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9293      # If it failed, the variable was not from the command line. Ignore it,
9294      # but warn the user (except for BASH, which is always set by the calling BASH).
9295      if test "xMKDIR" != xBASH; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9297$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9298      fi
9299      # Try to locate tool using the code snippet
9300      for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345    else
9346      # If it succeeded, then it was overridden by the user. We will use it
9347      # for the tool.
9348
9349      # First remove it from the list of overridden variables, so we can test
9350      # for unknown variables in the end.
9351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9352
9353      # Check if we try to supply an empty value
9354      if test "x$MKDIR" = x; then
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9356$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9358$as_echo_n "checking for MKDIR... " >&6; }
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9360$as_echo "disabled" >&6; }
9361      else
9362        # Check if the provided tool contains a complete path.
9363        tool_specified="$MKDIR"
9364        tool_basename="${tool_specified##*/}"
9365        if test "x$tool_basename" = "x$tool_specified"; then
9366          # A command without a complete path is provided, search $PATH.
9367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9369          # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_MKDIR+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $MKDIR in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399MKDIR=$ac_cv_path_MKDIR
9400if test -n "$MKDIR"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9402$as_echo "$MKDIR" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409          if test "x$MKDIR" = x; then
9410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411          fi
9412        else
9413          # Otherwise we believe it is a complete path. Use it as it is.
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9417$as_echo_n "checking for MKDIR... " >&6; }
9418          if test ! -x "$tool_specified"; then
9419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9422          fi
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425        fi
9426      fi
9427    fi
9428
9429  fi
9430
9431
9432
9433  if test "x$MKDIR" = x; then
9434    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9435  fi
9436
9437
9438
9439
9440
9441  # Publish this variable in the help.
9442
9443
9444  if [ -z "${MKTEMP+x}" ]; then
9445    # The variable is not set by user, try to locate tool using the code snippet
9446    for ac_prog in mktemp
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_MKTEMP+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $MKTEMP in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478MKTEMP=$ac_cv_path_MKTEMP
9479if test -n "$MKTEMP"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9481$as_echo "$MKTEMP" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$MKTEMP" && break
9489done
9490
9491  else
9492    # The variable is set, but is it from the command line or the environment?
9493
9494    # Try to remove the string !MKTEMP! from our list.
9495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497      # If it failed, the variable was not from the command line. Ignore it,
9498      # but warn the user (except for BASH, which is always set by the calling BASH).
9499      if test "xMKTEMP" != xBASH; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9501$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9502      fi
9503      # Try to locate tool using the code snippet
9504      for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549    else
9550      # If it succeeded, then it was overridden by the user. We will use it
9551      # for the tool.
9552
9553      # First remove it from the list of overridden variables, so we can test
9554      # for unknown variables in the end.
9555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556
9557      # Check if we try to supply an empty value
9558      if test "x$MKTEMP" = x; then
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9560$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9562$as_echo_n "checking for MKTEMP... " >&6; }
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9564$as_echo "disabled" >&6; }
9565      else
9566        # Check if the provided tool contains a complete path.
9567        tool_specified="$MKTEMP"
9568        tool_basename="${tool_specified##*/}"
9569        if test "x$tool_basename" = "x$tool_specified"; then
9570          # A command without a complete path is provided, search $PATH.
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9572$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9573          # Extract the first word of "$tool_basename", so it can be a program name with args.
9574set dummy $tool_basename; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_MKTEMP+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $MKTEMP in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603MKTEMP=$ac_cv_path_MKTEMP
9604if test -n "$MKTEMP"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9606$as_echo "$MKTEMP" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613          if test "x$MKTEMP" = x; then
9614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615          fi
9616        else
9617          # Otherwise we believe it is a complete path. Use it as it is.
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9619$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9621$as_echo_n "checking for MKTEMP... " >&6; }
9622          if test ! -x "$tool_specified"; then
9623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624$as_echo "not found" >&6; }
9625            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9626          fi
9627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628$as_echo "$tool_specified" >&6; }
9629        fi
9630      fi
9631    fi
9632
9633  fi
9634
9635
9636
9637  if test "x$MKTEMP" = x; then
9638    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9639  fi
9640
9641
9642
9643
9644
9645  # Publish this variable in the help.
9646
9647
9648  if [ -z "${MV+x}" ]; then
9649    # The variable is not set by user, try to locate tool using the code snippet
9650    for ac_prog in mv
9651do
9652  # Extract the first word of "$ac_prog", so it can be a program name with args.
9653set dummy $ac_prog; ac_word=$2
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655$as_echo_n "checking for $ac_word... " >&6; }
9656if ${ac_cv_path_MV+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  case $MV in
9660  [\\/]* | ?:[\\/]*)
9661  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9662  ;;
9663  *)
9664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665for as_dir in $PATH
9666do
9667  IFS=$as_save_IFS
9668  test -z "$as_dir" && as_dir=.
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679  ;;
9680esac
9681fi
9682MV=$ac_cv_path_MV
9683if test -n "$MV"; then
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9685$as_echo "$MV" >&6; }
9686else
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689fi
9690
9691
9692  test -n "$MV" && break
9693done
9694
9695  else
9696    # The variable is set, but is it from the command line or the environment?
9697
9698    # Try to remove the string !MV! from our list.
9699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9701      # If it failed, the variable was not from the command line. Ignore it,
9702      # but warn the user (except for BASH, which is always set by the calling BASH).
9703      if test "xMV" != xBASH; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9705$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9706      fi
9707      # Try to locate tool using the code snippet
9708      for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753    else
9754      # If it succeeded, then it was overridden by the user. We will use it
9755      # for the tool.
9756
9757      # First remove it from the list of overridden variables, so we can test
9758      # for unknown variables in the end.
9759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9760
9761      # Check if we try to supply an empty value
9762      if test "x$MV" = x; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9764$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9766$as_echo_n "checking for MV... " >&6; }
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9768$as_echo "disabled" >&6; }
9769      else
9770        # Check if the provided tool contains a complete path.
9771        tool_specified="$MV"
9772        tool_basename="${tool_specified##*/}"
9773        if test "x$tool_basename" = "x$tool_specified"; then
9774          # A command without a complete path is provided, search $PATH.
9775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9776$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9777          # Extract the first word of "$tool_basename", so it can be a program name with args.
9778set dummy $tool_basename; ac_word=$2
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9780$as_echo_n "checking for $ac_word... " >&6; }
9781if ${ac_cv_path_MV+:} false; then :
9782  $as_echo_n "(cached) " >&6
9783else
9784  case $MV in
9785  [\\/]* | ?:[\\/]*)
9786  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9787  ;;
9788  *)
9789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790for as_dir in $PATH
9791do
9792  IFS=$as_save_IFS
9793  test -z "$as_dir" && as_dir=.
9794    for ac_exec_ext in '' $ac_executable_extensions; do
9795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9796    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9798    break 2
9799  fi
9800done
9801  done
9802IFS=$as_save_IFS
9803
9804  ;;
9805esac
9806fi
9807MV=$ac_cv_path_MV
9808if test -n "$MV"; then
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9810$as_echo "$MV" >&6; }
9811else
9812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814fi
9815
9816
9817          if test "x$MV" = x; then
9818            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9819          fi
9820        else
9821          # Otherwise we believe it is a complete path. Use it as it is.
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9823$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9825$as_echo_n "checking for MV... " >&6; }
9826          if test ! -x "$tool_specified"; then
9827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9828$as_echo "not found" >&6; }
9829            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9830          fi
9831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9832$as_echo "$tool_specified" >&6; }
9833        fi
9834      fi
9835    fi
9836
9837  fi
9838
9839
9840
9841  if test "x$MV" = x; then
9842    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9843  fi
9844
9845
9846
9847
9848
9849  # Publish this variable in the help.
9850
9851
9852  if [ -z "${NAWK+x}" ]; then
9853    # The variable is not set by user, try to locate tool using the code snippet
9854    for ac_prog in nawk gawk awk
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_NAWK+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $NAWK in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886NAWK=$ac_cv_path_NAWK
9887if test -n "$NAWK"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9889$as_echo "$NAWK" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$NAWK" && break
9897done
9898
9899  else
9900    # The variable is set, but is it from the command line or the environment?
9901
9902    # Try to remove the string !NAWK! from our list.
9903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905      # If it failed, the variable was not from the command line. Ignore it,
9906      # but warn the user (except for BASH, which is always set by the calling BASH).
9907      if test "xNAWK" != xBASH; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9909$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9910      fi
9911      # Try to locate tool using the code snippet
9912      for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957    else
9958      # If it succeeded, then it was overridden by the user. We will use it
9959      # for the tool.
9960
9961      # First remove it from the list of overridden variables, so we can test
9962      # for unknown variables in the end.
9963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964
9965      # Check if we try to supply an empty value
9966      if test "x$NAWK" = x; then
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9968$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9970$as_echo_n "checking for NAWK... " >&6; }
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9972$as_echo "disabled" >&6; }
9973      else
9974        # Check if the provided tool contains a complete path.
9975        tool_specified="$NAWK"
9976        tool_basename="${tool_specified##*/}"
9977        if test "x$tool_basename" = "x$tool_specified"; then
9978          # A command without a complete path is provided, search $PATH.
9979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9980$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9981          # Extract the first word of "$tool_basename", so it can be a program name with args.
9982set dummy $tool_basename; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_NAWK+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $NAWK in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011NAWK=$ac_cv_path_NAWK
10012if test -n "$NAWK"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10014$as_echo "$NAWK" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021          if test "x$NAWK" = x; then
10022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10023          fi
10024        else
10025          # Otherwise we believe it is a complete path. Use it as it is.
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10027$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10029$as_echo_n "checking for NAWK... " >&6; }
10030          if test ! -x "$tool_specified"; then
10031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10032$as_echo "not found" >&6; }
10033            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10034          fi
10035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10036$as_echo "$tool_specified" >&6; }
10037        fi
10038      fi
10039    fi
10040
10041  fi
10042
10043
10044
10045  if test "x$NAWK" = x; then
10046    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10047  fi
10048
10049
10050
10051
10052
10053  # Publish this variable in the help.
10054
10055
10056  if [ -z "${PRINTF+x}" ]; then
10057    # The variable is not set by user, try to locate tool using the code snippet
10058    for ac_prog in printf
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if ${ac_cv_path_PRINTF+:} false; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $PRINTF in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090PRINTF=$ac_cv_path_PRINTF
10091if test -n "$PRINTF"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10093$as_echo "$PRINTF" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$PRINTF" && break
10101done
10102
10103  else
10104    # The variable is set, but is it from the command line or the environment?
10105
10106    # Try to remove the string !PRINTF! from our list.
10107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109      # If it failed, the variable was not from the command line. Ignore it,
10110      # but warn the user (except for BASH, which is always set by the calling BASH).
10111      if test "xPRINTF" != xBASH; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10113$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10114      fi
10115      # Try to locate tool using the code snippet
10116      for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161    else
10162      # If it succeeded, then it was overridden by the user. We will use it
10163      # for the tool.
10164
10165      # First remove it from the list of overridden variables, so we can test
10166      # for unknown variables in the end.
10167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168
10169      # Check if we try to supply an empty value
10170      if test "x$PRINTF" = x; then
10171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10172$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10174$as_echo_n "checking for PRINTF... " >&6; }
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10176$as_echo "disabled" >&6; }
10177      else
10178        # Check if the provided tool contains a complete path.
10179        tool_specified="$PRINTF"
10180        tool_basename="${tool_specified##*/}"
10181        if test "x$tool_basename" = "x$tool_specified"; then
10182          # A command without a complete path is provided, search $PATH.
10183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10184$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10185          # Extract the first word of "$tool_basename", so it can be a program name with args.
10186set dummy $tool_basename; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if ${ac_cv_path_PRINTF+:} false; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $PRINTF in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215PRINTF=$ac_cv_path_PRINTF
10216if test -n "$PRINTF"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10218$as_echo "$PRINTF" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225          if test "x$PRINTF" = x; then
10226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10227          fi
10228        else
10229          # Otherwise we believe it is a complete path. Use it as it is.
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10231$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10233$as_echo_n "checking for PRINTF... " >&6; }
10234          if test ! -x "$tool_specified"; then
10235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10236$as_echo "not found" >&6; }
10237            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10238          fi
10239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10240$as_echo "$tool_specified" >&6; }
10241        fi
10242      fi
10243    fi
10244
10245  fi
10246
10247
10248
10249  if test "x$PRINTF" = x; then
10250    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10251  fi
10252
10253
10254
10255
10256
10257  # Publish this variable in the help.
10258
10259
10260  if [ -z "${RM+x}" ]; then
10261    # The variable is not set by user, try to locate tool using the code snippet
10262    for ac_prog in rm
10263do
10264  # Extract the first word of "$ac_prog", so it can be a program name with args.
10265set dummy $ac_prog; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_RM+:} false; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  case $RM in
10272  [\\/]* | ?:[\\/]*)
10273  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10274  ;;
10275  *)
10276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291  ;;
10292esac
10293fi
10294RM=$ac_cv_path_RM
10295if test -n "$RM"; then
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10297$as_echo "$RM" >&6; }
10298else
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
10304  test -n "$RM" && break
10305done
10306
10307  else
10308    # The variable is set, but is it from the command line or the environment?
10309
10310    # Try to remove the string !RM! from our list.
10311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313      # If it failed, the variable was not from the command line. Ignore it,
10314      # but warn the user (except for BASH, which is always set by the calling BASH).
10315      if test "xRM" != xBASH; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10317$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10318      fi
10319      # Try to locate tool using the code snippet
10320      for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365    else
10366      # If it succeeded, then it was overridden by the user. We will use it
10367      # for the tool.
10368
10369      # First remove it from the list of overridden variables, so we can test
10370      # for unknown variables in the end.
10371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372
10373      # Check if we try to supply an empty value
10374      if test "x$RM" = x; then
10375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10376$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10378$as_echo_n "checking for RM... " >&6; }
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10380$as_echo "disabled" >&6; }
10381      else
10382        # Check if the provided tool contains a complete path.
10383        tool_specified="$RM"
10384        tool_basename="${tool_specified##*/}"
10385        if test "x$tool_basename" = "x$tool_specified"; then
10386          # A command without a complete path is provided, search $PATH.
10387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10388$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10389          # Extract the first word of "$tool_basename", so it can be a program name with args.
10390set dummy $tool_basename; ac_word=$2
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392$as_echo_n "checking for $ac_word... " >&6; }
10393if ${ac_cv_path_RM+:} false; then :
10394  $as_echo_n "(cached) " >&6
10395else
10396  case $RM in
10397  [\\/]* | ?:[\\/]*)
10398  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10399  ;;
10400  *)
10401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402for as_dir in $PATH
10403do
10404  IFS=$as_save_IFS
10405  test -z "$as_dir" && as_dir=.
10406    for ac_exec_ext in '' $ac_executable_extensions; do
10407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410    break 2
10411  fi
10412done
10413  done
10414IFS=$as_save_IFS
10415
10416  ;;
10417esac
10418fi
10419RM=$ac_cv_path_RM
10420if test -n "$RM"; then
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10422$as_echo "$RM" >&6; }
10423else
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
10426fi
10427
10428
10429          if test "x$RM" = x; then
10430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10431          fi
10432        else
10433          # Otherwise we believe it is a complete path. Use it as it is.
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10435$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10437$as_echo_n "checking for RM... " >&6; }
10438          if test ! -x "$tool_specified"; then
10439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10440$as_echo "not found" >&6; }
10441            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10442          fi
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10444$as_echo "$tool_specified" >&6; }
10445        fi
10446      fi
10447    fi
10448
10449  fi
10450
10451
10452
10453  if test "x$RM" = x; then
10454    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10455  fi
10456
10457
10458
10459
10460
10461  # Publish this variable in the help.
10462
10463
10464  if [ -z "${RMDIR+x}" ]; then
10465    # The variable is not set by user, try to locate tool using the code snippet
10466    for ac_prog in rmdir
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_RMDIR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $RMDIR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498RMDIR=$ac_cv_path_RMDIR
10499if test -n "$RMDIR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10501$as_echo "$RMDIR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$RMDIR" && break
10509done
10510
10511  else
10512    # The variable is set, but is it from the command line or the environment?
10513
10514    # Try to remove the string !RMDIR! from our list.
10515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517      # If it failed, the variable was not from the command line. Ignore it,
10518      # but warn the user (except for BASH, which is always set by the calling BASH).
10519      if test "xRMDIR" != xBASH; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10521$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10522      fi
10523      # Try to locate tool using the code snippet
10524      for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569    else
10570      # If it succeeded, then it was overridden by the user. We will use it
10571      # for the tool.
10572
10573      # First remove it from the list of overridden variables, so we can test
10574      # for unknown variables in the end.
10575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576
10577      # Check if we try to supply an empty value
10578      if test "x$RMDIR" = x; then
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10580$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10582$as_echo_n "checking for RMDIR... " >&6; }
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10584$as_echo "disabled" >&6; }
10585      else
10586        # Check if the provided tool contains a complete path.
10587        tool_specified="$RMDIR"
10588        tool_basename="${tool_specified##*/}"
10589        if test "x$tool_basename" = "x$tool_specified"; then
10590          # A command without a complete path is provided, search $PATH.
10591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10592$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10593          # Extract the first word of "$tool_basename", so it can be a program name with args.
10594set dummy $tool_basename; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if ${ac_cv_path_RMDIR+:} false; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $RMDIR in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623RMDIR=$ac_cv_path_RMDIR
10624if test -n "$RMDIR"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10626$as_echo "$RMDIR" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632
10633          if test "x$RMDIR" = x; then
10634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10635          fi
10636        else
10637          # Otherwise we believe it is a complete path. Use it as it is.
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10639$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10641$as_echo_n "checking for RMDIR... " >&6; }
10642          if test ! -x "$tool_specified"; then
10643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10644$as_echo "not found" >&6; }
10645            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10646          fi
10647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10648$as_echo "$tool_specified" >&6; }
10649        fi
10650      fi
10651    fi
10652
10653  fi
10654
10655
10656
10657  if test "x$RMDIR" = x; then
10658    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10659  fi
10660
10661
10662
10663
10664
10665  # Publish this variable in the help.
10666
10667
10668  if [ -z "${SH+x}" ]; then
10669    # The variable is not set by user, try to locate tool using the code snippet
10670    for ac_prog in sh
10671do
10672  # Extract the first word of "$ac_prog", so it can be a program name with args.
10673set dummy $ac_prog; ac_word=$2
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675$as_echo_n "checking for $ac_word... " >&6; }
10676if ${ac_cv_path_SH+:} false; then :
10677  $as_echo_n "(cached) " >&6
10678else
10679  case $SH in
10680  [\\/]* | ?:[\\/]*)
10681  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10682  ;;
10683  *)
10684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699  ;;
10700esac
10701fi
10702SH=$ac_cv_path_SH
10703if test -n "$SH"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10705$as_echo "$SH" >&6; }
10706else
10707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712  test -n "$SH" && break
10713done
10714
10715  else
10716    # The variable is set, but is it from the command line or the environment?
10717
10718    # Try to remove the string !SH! from our list.
10719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10721      # If it failed, the variable was not from the command line. Ignore it,
10722      # but warn the user (except for BASH, which is always set by the calling BASH).
10723      if test "xSH" != xBASH; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10725$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10726      fi
10727      # Try to locate tool using the code snippet
10728      for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773    else
10774      # If it succeeded, then it was overridden by the user. We will use it
10775      # for the tool.
10776
10777      # First remove it from the list of overridden variables, so we can test
10778      # for unknown variables in the end.
10779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10780
10781      # Check if we try to supply an empty value
10782      if test "x$SH" = x; then
10783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10784$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10786$as_echo_n "checking for SH... " >&6; }
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10788$as_echo "disabled" >&6; }
10789      else
10790        # Check if the provided tool contains a complete path.
10791        tool_specified="$SH"
10792        tool_basename="${tool_specified##*/}"
10793        if test "x$tool_basename" = "x$tool_specified"; then
10794          # A command without a complete path is provided, search $PATH.
10795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10796$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10797          # Extract the first word of "$tool_basename", so it can be a program name with args.
10798set dummy $tool_basename; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_SH+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $SH in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827SH=$ac_cv_path_SH
10828if test -n "$SH"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10830$as_echo "$SH" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837          if test "x$SH" = x; then
10838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10839          fi
10840        else
10841          # Otherwise we believe it is a complete path. Use it as it is.
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10843$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10845$as_echo_n "checking for SH... " >&6; }
10846          if test ! -x "$tool_specified"; then
10847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10848$as_echo "not found" >&6; }
10849            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10850          fi
10851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10852$as_echo "$tool_specified" >&6; }
10853        fi
10854      fi
10855    fi
10856
10857  fi
10858
10859
10860
10861  if test "x$SH" = x; then
10862    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10863  fi
10864
10865
10866
10867
10868
10869  # Publish this variable in the help.
10870
10871
10872  if [ -z "${SORT+x}" ]; then
10873    # The variable is not set by user, try to locate tool using the code snippet
10874    for ac_prog in sort
10875do
10876  # Extract the first word of "$ac_prog", so it can be a program name with args.
10877set dummy $ac_prog; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_SORT+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $SORT in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906SORT=$ac_cv_path_SORT
10907if test -n "$SORT"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10909$as_echo "$SORT" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916  test -n "$SORT" && break
10917done
10918
10919  else
10920    # The variable is set, but is it from the command line or the environment?
10921
10922    # Try to remove the string !SORT! from our list.
10923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925      # If it failed, the variable was not from the command line. Ignore it,
10926      # but warn the user (except for BASH, which is always set by the calling BASH).
10927      if test "xSORT" != xBASH; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10929$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10930      fi
10931      # Try to locate tool using the code snippet
10932      for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977    else
10978      # If it succeeded, then it was overridden by the user. We will use it
10979      # for the tool.
10980
10981      # First remove it from the list of overridden variables, so we can test
10982      # for unknown variables in the end.
10983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984
10985      # Check if we try to supply an empty value
10986      if test "x$SORT" = x; then
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10988$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10990$as_echo_n "checking for SORT... " >&6; }
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10992$as_echo "disabled" >&6; }
10993      else
10994        # Check if the provided tool contains a complete path.
10995        tool_specified="$SORT"
10996        tool_basename="${tool_specified##*/}"
10997        if test "x$tool_basename" = "x$tool_specified"; then
10998          # A command without a complete path is provided, search $PATH.
10999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11000$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11001          # Extract the first word of "$tool_basename", so it can be a program name with args.
11002set dummy $tool_basename; ac_word=$2
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
11005if ${ac_cv_path_SORT+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $SORT in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11011  ;;
11012  *)
11013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014for as_dir in $PATH
11015do
11016  IFS=$as_save_IFS
11017  test -z "$as_dir" && as_dir=.
11018    for ac_exec_ext in '' $ac_executable_extensions; do
11019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022    break 2
11023  fi
11024done
11025  done
11026IFS=$as_save_IFS
11027
11028  ;;
11029esac
11030fi
11031SORT=$ac_cv_path_SORT
11032if test -n "$SORT"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11034$as_echo "$SORT" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041          if test "x$SORT" = x; then
11042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11043          fi
11044        else
11045          # Otherwise we believe it is a complete path. Use it as it is.
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11047$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11049$as_echo_n "checking for SORT... " >&6; }
11050          if test ! -x "$tool_specified"; then
11051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11052$as_echo "not found" >&6; }
11053            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11054          fi
11055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11056$as_echo "$tool_specified" >&6; }
11057        fi
11058      fi
11059    fi
11060
11061  fi
11062
11063
11064
11065  if test "x$SORT" = x; then
11066    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11067  fi
11068
11069
11070
11071
11072
11073  # Publish this variable in the help.
11074
11075
11076  if [ -z "${TAIL+x}" ]; then
11077    # The variable is not set by user, try to locate tool using the code snippet
11078    for ac_prog in tail
11079do
11080  # Extract the first word of "$ac_prog", so it can be a program name with args.
11081set dummy $ac_prog; ac_word=$2
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11083$as_echo_n "checking for $ac_word... " >&6; }
11084if ${ac_cv_path_TAIL+:} false; then :
11085  $as_echo_n "(cached) " >&6
11086else
11087  case $TAIL in
11088  [\\/]* | ?:[\\/]*)
11089  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11090  ;;
11091  *)
11092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11093for as_dir in $PATH
11094do
11095  IFS=$as_save_IFS
11096  test -z "$as_dir" && as_dir=.
11097    for ac_exec_ext in '' $ac_executable_extensions; do
11098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11099    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11101    break 2
11102  fi
11103done
11104  done
11105IFS=$as_save_IFS
11106
11107  ;;
11108esac
11109fi
11110TAIL=$ac_cv_path_TAIL
11111if test -n "$TAIL"; then
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11113$as_echo "$TAIL" >&6; }
11114else
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117fi
11118
11119
11120  test -n "$TAIL" && break
11121done
11122
11123  else
11124    # The variable is set, but is it from the command line or the environment?
11125
11126    # Try to remove the string !TAIL! from our list.
11127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11129      # If it failed, the variable was not from the command line. Ignore it,
11130      # but warn the user (except for BASH, which is always set by the calling BASH).
11131      if test "xTAIL" != xBASH; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11133$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11134      fi
11135      # Try to locate tool using the code snippet
11136      for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181    else
11182      # If it succeeded, then it was overridden by the user. We will use it
11183      # for the tool.
11184
11185      # First remove it from the list of overridden variables, so we can test
11186      # for unknown variables in the end.
11187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11188
11189      # Check if we try to supply an empty value
11190      if test "x$TAIL" = x; then
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11192$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11194$as_echo_n "checking for TAIL... " >&6; }
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11196$as_echo "disabled" >&6; }
11197      else
11198        # Check if the provided tool contains a complete path.
11199        tool_specified="$TAIL"
11200        tool_basename="${tool_specified##*/}"
11201        if test "x$tool_basename" = "x$tool_specified"; then
11202          # A command without a complete path is provided, search $PATH.
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11204$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11205          # Extract the first word of "$tool_basename", so it can be a program name with args.
11206set dummy $tool_basename; ac_word=$2
11207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208$as_echo_n "checking for $ac_word... " >&6; }
11209if ${ac_cv_path_TAIL+:} false; then :
11210  $as_echo_n "(cached) " >&6
11211else
11212  case $TAIL in
11213  [\\/]* | ?:[\\/]*)
11214  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11215  ;;
11216  *)
11217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218for as_dir in $PATH
11219do
11220  IFS=$as_save_IFS
11221  test -z "$as_dir" && as_dir=.
11222    for ac_exec_ext in '' $ac_executable_extensions; do
11223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226    break 2
11227  fi
11228done
11229  done
11230IFS=$as_save_IFS
11231
11232  ;;
11233esac
11234fi
11235TAIL=$ac_cv_path_TAIL
11236if test -n "$TAIL"; then
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11238$as_echo "$TAIL" >&6; }
11239else
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242fi
11243
11244
11245          if test "x$TAIL" = x; then
11246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11247          fi
11248        else
11249          # Otherwise we believe it is a complete path. Use it as it is.
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11251$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11253$as_echo_n "checking for TAIL... " >&6; }
11254          if test ! -x "$tool_specified"; then
11255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11256$as_echo "not found" >&6; }
11257            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11258          fi
11259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11260$as_echo "$tool_specified" >&6; }
11261        fi
11262      fi
11263    fi
11264
11265  fi
11266
11267
11268
11269  if test "x$TAIL" = x; then
11270    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11271  fi
11272
11273
11274
11275
11276
11277  # Publish this variable in the help.
11278
11279
11280  if [ -z "${TAR+x}" ]; then
11281    # The variable is not set by user, try to locate tool using the code snippet
11282    for ac_prog in gtar tar
11283do
11284  # Extract the first word of "$ac_prog", so it can be a program name with args.
11285set dummy $ac_prog; ac_word=$2
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11287$as_echo_n "checking for $ac_word... " >&6; }
11288if ${ac_cv_path_TAR+:} false; then :
11289  $as_echo_n "(cached) " >&6
11290else
11291  case $TAR in
11292  [\\/]* | ?:[\\/]*)
11293  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11294  ;;
11295  *)
11296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11297for as_dir in $PATH
11298do
11299  IFS=$as_save_IFS
11300  test -z "$as_dir" && as_dir=.
11301    for ac_exec_ext in '' $ac_executable_extensions; do
11302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11303    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11305    break 2
11306  fi
11307done
11308  done
11309IFS=$as_save_IFS
11310
11311  ;;
11312esac
11313fi
11314TAR=$ac_cv_path_TAR
11315if test -n "$TAR"; then
11316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11317$as_echo "$TAR" >&6; }
11318else
11319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
11321fi
11322
11323
11324  test -n "$TAR" && break
11325done
11326
11327  else
11328    # The variable is set, but is it from the command line or the environment?
11329
11330    # Try to remove the string !TAR! from our list.
11331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11333      # If it failed, the variable was not from the command line. Ignore it,
11334      # but warn the user (except for BASH, which is always set by the calling BASH).
11335      if test "xTAR" != xBASH; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11337$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11338      fi
11339      # Try to locate tool using the code snippet
11340      for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385    else
11386      # If it succeeded, then it was overridden by the user. We will use it
11387      # for the tool.
11388
11389      # First remove it from the list of overridden variables, so we can test
11390      # for unknown variables in the end.
11391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11392
11393      # Check if we try to supply an empty value
11394      if test "x$TAR" = x; then
11395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11396$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11398$as_echo_n "checking for TAR... " >&6; }
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11400$as_echo "disabled" >&6; }
11401      else
11402        # Check if the provided tool contains a complete path.
11403        tool_specified="$TAR"
11404        tool_basename="${tool_specified##*/}"
11405        if test "x$tool_basename" = "x$tool_specified"; then
11406          # A command without a complete path is provided, search $PATH.
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11408$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11409          # Extract the first word of "$tool_basename", so it can be a program name with args.
11410set dummy $tool_basename; ac_word=$2
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412$as_echo_n "checking for $ac_word... " >&6; }
11413if ${ac_cv_path_TAR+:} false; then :
11414  $as_echo_n "(cached) " >&6
11415else
11416  case $TAR in
11417  [\\/]* | ?:[\\/]*)
11418  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11419  ;;
11420  *)
11421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422for as_dir in $PATH
11423do
11424  IFS=$as_save_IFS
11425  test -z "$as_dir" && as_dir=.
11426    for ac_exec_ext in '' $ac_executable_extensions; do
11427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430    break 2
11431  fi
11432done
11433  done
11434IFS=$as_save_IFS
11435
11436  ;;
11437esac
11438fi
11439TAR=$ac_cv_path_TAR
11440if test -n "$TAR"; then
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11442$as_echo "$TAR" >&6; }
11443else
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
11446fi
11447
11448
11449          if test "x$TAR" = x; then
11450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11451          fi
11452        else
11453          # Otherwise we believe it is a complete path. Use it as it is.
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11455$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11457$as_echo_n "checking for TAR... " >&6; }
11458          if test ! -x "$tool_specified"; then
11459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11460$as_echo "not found" >&6; }
11461            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11462          fi
11463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11464$as_echo "$tool_specified" >&6; }
11465        fi
11466      fi
11467    fi
11468
11469  fi
11470
11471
11472
11473  if test "x$TAR" = x; then
11474    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11475  fi
11476
11477
11478
11479
11480
11481  # Publish this variable in the help.
11482
11483
11484  if [ -z "${TEE+x}" ]; then
11485    # The variable is not set by user, try to locate tool using the code snippet
11486    for ac_prog in tee
11487do
11488  # Extract the first word of "$ac_prog", so it can be a program name with args.
11489set dummy $ac_prog; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_path_TEE+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  case $TEE in
11496  [\\/]* | ?:[\\/]*)
11497  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11498  ;;
11499  *)
11500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515  ;;
11516esac
11517fi
11518TEE=$ac_cv_path_TEE
11519if test -n "$TEE"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11521$as_echo "$TEE" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$TEE" && break
11529done
11530
11531  else
11532    # The variable is set, but is it from the command line or the environment?
11533
11534    # Try to remove the string !TEE! from our list.
11535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11537      # If it failed, the variable was not from the command line. Ignore it,
11538      # but warn the user (except for BASH, which is always set by the calling BASH).
11539      if test "xTEE" != xBASH; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11541$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11542      fi
11543      # Try to locate tool using the code snippet
11544      for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589    else
11590      # If it succeeded, then it was overridden by the user. We will use it
11591      # for the tool.
11592
11593      # First remove it from the list of overridden variables, so we can test
11594      # for unknown variables in the end.
11595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11596
11597      # Check if we try to supply an empty value
11598      if test "x$TEE" = x; then
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11600$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11602$as_echo_n "checking for TEE... " >&6; }
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11604$as_echo "disabled" >&6; }
11605      else
11606        # Check if the provided tool contains a complete path.
11607        tool_specified="$TEE"
11608        tool_basename="${tool_specified##*/}"
11609        if test "x$tool_basename" = "x$tool_specified"; then
11610          # A command without a complete path is provided, search $PATH.
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11612$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11613          # Extract the first word of "$tool_basename", so it can be a program name with args.
11614set dummy $tool_basename; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if ${ac_cv_path_TEE+:} false; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $TEE in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643TEE=$ac_cv_path_TEE
11644if test -n "$TEE"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11646$as_echo "$TEE" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653          if test "x$TEE" = x; then
11654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11655          fi
11656        else
11657          # Otherwise we believe it is a complete path. Use it as it is.
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11659$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11661$as_echo_n "checking for TEE... " >&6; }
11662          if test ! -x "$tool_specified"; then
11663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11664$as_echo "not found" >&6; }
11665            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11666          fi
11667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11668$as_echo "$tool_specified" >&6; }
11669        fi
11670      fi
11671    fi
11672
11673  fi
11674
11675
11676
11677  if test "x$TEE" = x; then
11678    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11679  fi
11680
11681
11682
11683
11684
11685  # Publish this variable in the help.
11686
11687
11688  if [ -z "${TOUCH+x}" ]; then
11689    # The variable is not set by user, try to locate tool using the code snippet
11690    for ac_prog in touch
11691do
11692  # Extract the first word of "$ac_prog", so it can be a program name with args.
11693set dummy $ac_prog; ac_word=$2
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11695$as_echo_n "checking for $ac_word... " >&6; }
11696if ${ac_cv_path_TOUCH+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  case $TOUCH in
11700  [\\/]* | ?:[\\/]*)
11701  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11702  ;;
11703  *)
11704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705for as_dir in $PATH
11706do
11707  IFS=$as_save_IFS
11708  test -z "$as_dir" && as_dir=.
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11711    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11713    break 2
11714  fi
11715done
11716  done
11717IFS=$as_save_IFS
11718
11719  ;;
11720esac
11721fi
11722TOUCH=$ac_cv_path_TOUCH
11723if test -n "$TOUCH"; then
11724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11725$as_echo "$TOUCH" >&6; }
11726else
11727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
11729fi
11730
11731
11732  test -n "$TOUCH" && break
11733done
11734
11735  else
11736    # The variable is set, but is it from the command line or the environment?
11737
11738    # Try to remove the string !TOUCH! from our list.
11739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11741      # If it failed, the variable was not from the command line. Ignore it,
11742      # but warn the user (except for BASH, which is always set by the calling BASH).
11743      if test "xTOUCH" != xBASH; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11745$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11746      fi
11747      # Try to locate tool using the code snippet
11748      for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793    else
11794      # If it succeeded, then it was overridden by the user. We will use it
11795      # for the tool.
11796
11797      # First remove it from the list of overridden variables, so we can test
11798      # for unknown variables in the end.
11799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11800
11801      # Check if we try to supply an empty value
11802      if test "x$TOUCH" = x; then
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11804$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11806$as_echo_n "checking for TOUCH... " >&6; }
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11808$as_echo "disabled" >&6; }
11809      else
11810        # Check if the provided tool contains a complete path.
11811        tool_specified="$TOUCH"
11812        tool_basename="${tool_specified##*/}"
11813        if test "x$tool_basename" = "x$tool_specified"; then
11814          # A command without a complete path is provided, search $PATH.
11815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11816$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11817          # Extract the first word of "$tool_basename", so it can be a program name with args.
11818set dummy $tool_basename; ac_word=$2
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11820$as_echo_n "checking for $ac_word... " >&6; }
11821if ${ac_cv_path_TOUCH+:} false; then :
11822  $as_echo_n "(cached) " >&6
11823else
11824  case $TOUCH in
11825  [\\/]* | ?:[\\/]*)
11826  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11827  ;;
11828  *)
11829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832  IFS=$as_save_IFS
11833  test -z "$as_dir" && as_dir=.
11834    for ac_exec_ext in '' $ac_executable_extensions; do
11835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11836    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11838    break 2
11839  fi
11840done
11841  done
11842IFS=$as_save_IFS
11843
11844  ;;
11845esac
11846fi
11847TOUCH=$ac_cv_path_TOUCH
11848if test -n "$TOUCH"; then
11849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11850$as_echo "$TOUCH" >&6; }
11851else
11852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
11854fi
11855
11856
11857          if test "x$TOUCH" = x; then
11858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11859          fi
11860        else
11861          # Otherwise we believe it is a complete path. Use it as it is.
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11863$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11865$as_echo_n "checking for TOUCH... " >&6; }
11866          if test ! -x "$tool_specified"; then
11867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11868$as_echo "not found" >&6; }
11869            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11870          fi
11871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11872$as_echo "$tool_specified" >&6; }
11873        fi
11874      fi
11875    fi
11876
11877  fi
11878
11879
11880
11881  if test "x$TOUCH" = x; then
11882    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11883  fi
11884
11885
11886
11887
11888
11889  # Publish this variable in the help.
11890
11891
11892  if [ -z "${TR+x}" ]; then
11893    # The variable is not set by user, try to locate tool using the code snippet
11894    for ac_prog in tr
11895do
11896  # Extract the first word of "$ac_prog", so it can be a program name with args.
11897set dummy $ac_prog; ac_word=$2
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
11900if ${ac_cv_path_TR+:} false; then :
11901  $as_echo_n "(cached) " >&6
11902else
11903  case $TR in
11904  [\\/]* | ?:[\\/]*)
11905  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11906  ;;
11907  *)
11908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909for as_dir in $PATH
11910do
11911  IFS=$as_save_IFS
11912  test -z "$as_dir" && as_dir=.
11913    for ac_exec_ext in '' $ac_executable_extensions; do
11914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11915    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11917    break 2
11918  fi
11919done
11920  done
11921IFS=$as_save_IFS
11922
11923  ;;
11924esac
11925fi
11926TR=$ac_cv_path_TR
11927if test -n "$TR"; then
11928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11929$as_echo "$TR" >&6; }
11930else
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
11933fi
11934
11935
11936  test -n "$TR" && break
11937done
11938
11939  else
11940    # The variable is set, but is it from the command line or the environment?
11941
11942    # Try to remove the string !TR! from our list.
11943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11945      # If it failed, the variable was not from the command line. Ignore it,
11946      # but warn the user (except for BASH, which is always set by the calling BASH).
11947      if test "xTR" != xBASH; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11949$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11950      fi
11951      # Try to locate tool using the code snippet
11952      for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997    else
11998      # If it succeeded, then it was overridden by the user. We will use it
11999      # for the tool.
12000
12001      # First remove it from the list of overridden variables, so we can test
12002      # for unknown variables in the end.
12003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12004
12005      # Check if we try to supply an empty value
12006      if test "x$TR" = x; then
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12008$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12010$as_echo_n "checking for TR... " >&6; }
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12012$as_echo "disabled" >&6; }
12013      else
12014        # Check if the provided tool contains a complete path.
12015        tool_specified="$TR"
12016        tool_basename="${tool_specified##*/}"
12017        if test "x$tool_basename" = "x$tool_specified"; then
12018          # A command without a complete path is provided, search $PATH.
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12021          # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_TR+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $TR in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051TR=$ac_cv_path_TR
12052if test -n "$TR"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12054$as_echo "$TR" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061          if test "x$TR" = x; then
12062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063          fi
12064        else
12065          # Otherwise we believe it is a complete path. Use it as it is.
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12069$as_echo_n "checking for TR... " >&6; }
12070          if test ! -x "$tool_specified"; then
12071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12074          fi
12075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077        fi
12078      fi
12079    fi
12080
12081  fi
12082
12083
12084
12085  if test "x$TR" = x; then
12086    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12087  fi
12088
12089
12090
12091
12092
12093  # Publish this variable in the help.
12094
12095
12096  if [ -z "${UNAME+x}" ]; then
12097    # The variable is not set by user, try to locate tool using the code snippet
12098    for ac_prog in uname
12099do
12100  # Extract the first word of "$ac_prog", so it can be a program name with args.
12101set dummy $ac_prog; ac_word=$2
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12103$as_echo_n "checking for $ac_word... " >&6; }
12104if ${ac_cv_path_UNAME+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  case $UNAME in
12108  [\\/]* | ?:[\\/]*)
12109  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12110  ;;
12111  *)
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12119    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12121    break 2
12122  fi
12123done
12124  done
12125IFS=$as_save_IFS
12126
12127  ;;
12128esac
12129fi
12130UNAME=$ac_cv_path_UNAME
12131if test -n "$UNAME"; then
12132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12133$as_echo "$UNAME" >&6; }
12134else
12135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12136$as_echo "no" >&6; }
12137fi
12138
12139
12140  test -n "$UNAME" && break
12141done
12142
12143  else
12144    # The variable is set, but is it from the command line or the environment?
12145
12146    # Try to remove the string !UNAME! from our list.
12147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12149      # If it failed, the variable was not from the command line. Ignore it,
12150      # but warn the user (except for BASH, which is always set by the calling BASH).
12151      if test "xUNAME" != xBASH; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12153$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12154      fi
12155      # Try to locate tool using the code snippet
12156      for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201    else
12202      # If it succeeded, then it was overridden by the user. We will use it
12203      # for the tool.
12204
12205      # First remove it from the list of overridden variables, so we can test
12206      # for unknown variables in the end.
12207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12208
12209      # Check if we try to supply an empty value
12210      if test "x$UNAME" = x; then
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12212$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12214$as_echo_n "checking for UNAME... " >&6; }
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12216$as_echo "disabled" >&6; }
12217      else
12218        # Check if the provided tool contains a complete path.
12219        tool_specified="$UNAME"
12220        tool_basename="${tool_specified##*/}"
12221        if test "x$tool_basename" = "x$tool_specified"; then
12222          # A command without a complete path is provided, search $PATH.
12223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12224$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12225          # Extract the first word of "$tool_basename", so it can be a program name with args.
12226set dummy $tool_basename; ac_word=$2
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228$as_echo_n "checking for $ac_word... " >&6; }
12229if ${ac_cv_path_UNAME+:} false; then :
12230  $as_echo_n "(cached) " >&6
12231else
12232  case $UNAME in
12233  [\\/]* | ?:[\\/]*)
12234  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12235  ;;
12236  *)
12237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    for ac_exec_ext in '' $ac_executable_extensions; do
12243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12244    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12246    break 2
12247  fi
12248done
12249  done
12250IFS=$as_save_IFS
12251
12252  ;;
12253esac
12254fi
12255UNAME=$ac_cv_path_UNAME
12256if test -n "$UNAME"; then
12257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12258$as_echo "$UNAME" >&6; }
12259else
12260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
12262fi
12263
12264
12265          if test "x$UNAME" = x; then
12266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12267          fi
12268        else
12269          # Otherwise we believe it is a complete path. Use it as it is.
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12271$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12273$as_echo_n "checking for UNAME... " >&6; }
12274          if test ! -x "$tool_specified"; then
12275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12276$as_echo "not found" >&6; }
12277            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12278          fi
12279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12280$as_echo "$tool_specified" >&6; }
12281        fi
12282      fi
12283    fi
12284
12285  fi
12286
12287
12288
12289  if test "x$UNAME" = x; then
12290    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12291  fi
12292
12293
12294
12295
12296
12297  # Publish this variable in the help.
12298
12299
12300  if [ -z "${UNIQ+x}" ]; then
12301    # The variable is not set by user, try to locate tool using the code snippet
12302    for ac_prog in uniq
12303do
12304  # Extract the first word of "$ac_prog", so it can be a program name with args.
12305set dummy $ac_prog; ac_word=$2
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12307$as_echo_n "checking for $ac_word... " >&6; }
12308if ${ac_cv_path_UNIQ+:} false; then :
12309  $as_echo_n "(cached) " >&6
12310else
12311  case $UNIQ in
12312  [\\/]* | ?:[\\/]*)
12313  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12314  ;;
12315  *)
12316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325    break 2
12326  fi
12327done
12328  done
12329IFS=$as_save_IFS
12330
12331  ;;
12332esac
12333fi
12334UNIQ=$ac_cv_path_UNIQ
12335if test -n "$UNIQ"; then
12336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12337$as_echo "$UNIQ" >&6; }
12338else
12339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340$as_echo "no" >&6; }
12341fi
12342
12343
12344  test -n "$UNIQ" && break
12345done
12346
12347  else
12348    # The variable is set, but is it from the command line or the environment?
12349
12350    # Try to remove the string !UNIQ! from our list.
12351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12353      # If it failed, the variable was not from the command line. Ignore it,
12354      # but warn the user (except for BASH, which is always set by the calling BASH).
12355      if test "xUNIQ" != xBASH; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12357$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12358      fi
12359      # Try to locate tool using the code snippet
12360      for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405    else
12406      # If it succeeded, then it was overridden by the user. We will use it
12407      # for the tool.
12408
12409      # First remove it from the list of overridden variables, so we can test
12410      # for unknown variables in the end.
12411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12412
12413      # Check if we try to supply an empty value
12414      if test "x$UNIQ" = x; then
12415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12416$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12418$as_echo_n "checking for UNIQ... " >&6; }
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12420$as_echo "disabled" >&6; }
12421      else
12422        # Check if the provided tool contains a complete path.
12423        tool_specified="$UNIQ"
12424        tool_basename="${tool_specified##*/}"
12425        if test "x$tool_basename" = "x$tool_specified"; then
12426          # A command without a complete path is provided, search $PATH.
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12428$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12429          # Extract the first word of "$tool_basename", so it can be a program name with args.
12430set dummy $tool_basename; ac_word=$2
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432$as_echo_n "checking for $ac_word... " >&6; }
12433if ${ac_cv_path_UNIQ+:} false; then :
12434  $as_echo_n "(cached) " >&6
12435else
12436  case $UNIQ in
12437  [\\/]* | ?:[\\/]*)
12438  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12439  ;;
12440  *)
12441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12442for as_dir in $PATH
12443do
12444  IFS=$as_save_IFS
12445  test -z "$as_dir" && as_dir=.
12446    for ac_exec_ext in '' $ac_executable_extensions; do
12447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12448    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12450    break 2
12451  fi
12452done
12453  done
12454IFS=$as_save_IFS
12455
12456  ;;
12457esac
12458fi
12459UNIQ=$ac_cv_path_UNIQ
12460if test -n "$UNIQ"; then
12461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12462$as_echo "$UNIQ" >&6; }
12463else
12464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12465$as_echo "no" >&6; }
12466fi
12467
12468
12469          if test "x$UNIQ" = x; then
12470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12471          fi
12472        else
12473          # Otherwise we believe it is a complete path. Use it as it is.
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12475$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12477$as_echo_n "checking for UNIQ... " >&6; }
12478          if test ! -x "$tool_specified"; then
12479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12480$as_echo "not found" >&6; }
12481            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12482          fi
12483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12484$as_echo "$tool_specified" >&6; }
12485        fi
12486      fi
12487    fi
12488
12489  fi
12490
12491
12492
12493  if test "x$UNIQ" = x; then
12494    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12495  fi
12496
12497
12498
12499
12500
12501  # Publish this variable in the help.
12502
12503
12504  if [ -z "${WC+x}" ]; then
12505    # The variable is not set by user, try to locate tool using the code snippet
12506    for ac_prog in wc
12507do
12508  # Extract the first word of "$ac_prog", so it can be a program name with args.
12509set dummy $ac_prog; ac_word=$2
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511$as_echo_n "checking for $ac_word... " >&6; }
12512if ${ac_cv_path_WC+:} false; then :
12513  $as_echo_n "(cached) " >&6
12514else
12515  case $WC in
12516  [\\/]* | ?:[\\/]*)
12517  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12518  ;;
12519  *)
12520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521for as_dir in $PATH
12522do
12523  IFS=$as_save_IFS
12524  test -z "$as_dir" && as_dir=.
12525    for ac_exec_ext in '' $ac_executable_extensions; do
12526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529    break 2
12530  fi
12531done
12532  done
12533IFS=$as_save_IFS
12534
12535  ;;
12536esac
12537fi
12538WC=$ac_cv_path_WC
12539if test -n "$WC"; then
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12541$as_echo "$WC" >&6; }
12542else
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544$as_echo "no" >&6; }
12545fi
12546
12547
12548  test -n "$WC" && break
12549done
12550
12551  else
12552    # The variable is set, but is it from the command line or the environment?
12553
12554    # Try to remove the string !WC! from our list.
12555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557      # If it failed, the variable was not from the command line. Ignore it,
12558      # but warn the user (except for BASH, which is always set by the calling BASH).
12559      if test "xWC" != xBASH; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12561$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12562      fi
12563      # Try to locate tool using the code snippet
12564      for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609    else
12610      # If it succeeded, then it was overridden by the user. We will use it
12611      # for the tool.
12612
12613      # First remove it from the list of overridden variables, so we can test
12614      # for unknown variables in the end.
12615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616
12617      # Check if we try to supply an empty value
12618      if test "x$WC" = x; then
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12620$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12622$as_echo_n "checking for WC... " >&6; }
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12624$as_echo "disabled" >&6; }
12625      else
12626        # Check if the provided tool contains a complete path.
12627        tool_specified="$WC"
12628        tool_basename="${tool_specified##*/}"
12629        if test "x$tool_basename" = "x$tool_specified"; then
12630          # A command without a complete path is provided, search $PATH.
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12632$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12633          # Extract the first word of "$tool_basename", so it can be a program name with args.
12634set dummy $tool_basename; ac_word=$2
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12636$as_echo_n "checking for $ac_word... " >&6; }
12637if ${ac_cv_path_WC+:} false; then :
12638  $as_echo_n "(cached) " >&6
12639else
12640  case $WC in
12641  [\\/]* | ?:[\\/]*)
12642  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12643  ;;
12644  *)
12645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646for as_dir in $PATH
12647do
12648  IFS=$as_save_IFS
12649  test -z "$as_dir" && as_dir=.
12650    for ac_exec_ext in '' $ac_executable_extensions; do
12651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12652    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12654    break 2
12655  fi
12656done
12657  done
12658IFS=$as_save_IFS
12659
12660  ;;
12661esac
12662fi
12663WC=$ac_cv_path_WC
12664if test -n "$WC"; then
12665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12666$as_echo "$WC" >&6; }
12667else
12668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669$as_echo "no" >&6; }
12670fi
12671
12672
12673          if test "x$WC" = x; then
12674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12675          fi
12676        else
12677          # Otherwise we believe it is a complete path. Use it as it is.
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12679$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12681$as_echo_n "checking for WC... " >&6; }
12682          if test ! -x "$tool_specified"; then
12683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12684$as_echo "not found" >&6; }
12685            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12686          fi
12687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12688$as_echo "$tool_specified" >&6; }
12689        fi
12690      fi
12691    fi
12692
12693  fi
12694
12695
12696
12697  if test "x$WC" = x; then
12698    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12699  fi
12700
12701
12702
12703
12704
12705  # Publish this variable in the help.
12706
12707
12708  if [ -z "${WHICH+x}" ]; then
12709    # The variable is not set by user, try to locate tool using the code snippet
12710    for ac_prog in which
12711do
12712  # Extract the first word of "$ac_prog", so it can be a program name with args.
12713set dummy $ac_prog; ac_word=$2
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715$as_echo_n "checking for $ac_word... " >&6; }
12716if ${ac_cv_path_WHICH+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  case $WHICH in
12720  [\\/]* | ?:[\\/]*)
12721  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12722  ;;
12723  *)
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_exec_ext in '' $ac_executable_extensions; do
12730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733    break 2
12734  fi
12735done
12736  done
12737IFS=$as_save_IFS
12738
12739  ;;
12740esac
12741fi
12742WHICH=$ac_cv_path_WHICH
12743if test -n "$WHICH"; then
12744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12745$as_echo "$WHICH" >&6; }
12746else
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749fi
12750
12751
12752  test -n "$WHICH" && break
12753done
12754
12755  else
12756    # The variable is set, but is it from the command line or the environment?
12757
12758    # Try to remove the string !WHICH! from our list.
12759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12761      # If it failed, the variable was not from the command line. Ignore it,
12762      # but warn the user (except for BASH, which is always set by the calling BASH).
12763      if test "xWHICH" != xBASH; then
12764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12765$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12766      fi
12767      # Try to locate tool using the code snippet
12768      for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813    else
12814      # If it succeeded, then it was overridden by the user. We will use it
12815      # for the tool.
12816
12817      # First remove it from the list of overridden variables, so we can test
12818      # for unknown variables in the end.
12819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12820
12821      # Check if we try to supply an empty value
12822      if test "x$WHICH" = x; then
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12824$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12826$as_echo_n "checking for WHICH... " >&6; }
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12828$as_echo "disabled" >&6; }
12829      else
12830        # Check if the provided tool contains a complete path.
12831        tool_specified="$WHICH"
12832        tool_basename="${tool_specified##*/}"
12833        if test "x$tool_basename" = "x$tool_specified"; then
12834          # A command without a complete path is provided, search $PATH.
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12837          # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_WHICH+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $WHICH in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867WHICH=$ac_cv_path_WHICH
12868if test -n "$WHICH"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12870$as_echo "$WHICH" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877          if test "x$WHICH" = x; then
12878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879          fi
12880        else
12881          # Otherwise we believe it is a complete path. Use it as it is.
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12885$as_echo_n "checking for WHICH... " >&6; }
12886          if test ! -x "$tool_specified"; then
12887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12890          fi
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893        fi
12894      fi
12895    fi
12896
12897  fi
12898
12899
12900
12901  if test "x$WHICH" = x; then
12902    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12903  fi
12904
12905
12906
12907
12908
12909  # Publish this variable in the help.
12910
12911
12912  if [ -z "${XARGS+x}" ]; then
12913    # The variable is not set by user, try to locate tool using the code snippet
12914    for ac_prog in xargs
12915do
12916  # Extract the first word of "$ac_prog", so it can be a program name with args.
12917set dummy $ac_prog; ac_word=$2
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12919$as_echo_n "checking for $ac_word... " >&6; }
12920if ${ac_cv_path_XARGS+:} false; then :
12921  $as_echo_n "(cached) " >&6
12922else
12923  case $XARGS in
12924  [\\/]* | ?:[\\/]*)
12925  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12926  ;;
12927  *)
12928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12929for as_dir in $PATH
12930do
12931  IFS=$as_save_IFS
12932  test -z "$as_dir" && as_dir=.
12933    for ac_exec_ext in '' $ac_executable_extensions; do
12934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12935    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12937    break 2
12938  fi
12939done
12940  done
12941IFS=$as_save_IFS
12942
12943  ;;
12944esac
12945fi
12946XARGS=$ac_cv_path_XARGS
12947if test -n "$XARGS"; then
12948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12949$as_echo "$XARGS" >&6; }
12950else
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952$as_echo "no" >&6; }
12953fi
12954
12955
12956  test -n "$XARGS" && break
12957done
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !XARGS! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xXARGS" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017    else
13018      # If it succeeded, then it was overridden by the user. We will use it
13019      # for the tool.
13020
13021      # First remove it from the list of overridden variables, so we can test
13022      # for unknown variables in the end.
13023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13024
13025      # Check if we try to supply an empty value
13026      if test "x$XARGS" = x; then
13027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13028$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13030$as_echo_n "checking for XARGS... " >&6; }
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13032$as_echo "disabled" >&6; }
13033      else
13034        # Check if the provided tool contains a complete path.
13035        tool_specified="$XARGS"
13036        tool_basename="${tool_specified##*/}"
13037        if test "x$tool_basename" = "x$tool_specified"; then
13038          # A command without a complete path is provided, search $PATH.
13039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13040$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13041          # Extract the first word of "$tool_basename", so it can be a program name with args.
13042set dummy $tool_basename; ac_word=$2
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044$as_echo_n "checking for $ac_word... " >&6; }
13045if ${ac_cv_path_XARGS+:} false; then :
13046  $as_echo_n "(cached) " >&6
13047else
13048  case $XARGS in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054for as_dir in $PATH
13055do
13056  IFS=$as_save_IFS
13057  test -z "$as_dir" && as_dir=.
13058    for ac_exec_ext in '' $ac_executable_extensions; do
13059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062    break 2
13063  fi
13064done
13065  done
13066IFS=$as_save_IFS
13067
13068  ;;
13069esac
13070fi
13071XARGS=$ac_cv_path_XARGS
13072if test -n "$XARGS"; then
13073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13074$as_echo "$XARGS" >&6; }
13075else
13076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
13078fi
13079
13080
13081          if test "x$XARGS" = x; then
13082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083          fi
13084        else
13085          # Otherwise we believe it is a complete path. Use it as it is.
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13087$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13089$as_echo_n "checking for XARGS... " >&6; }
13090          if test ! -x "$tool_specified"; then
13091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092$as_echo "not found" >&6; }
13093            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13094          fi
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096$as_echo "$tool_specified" >&6; }
13097        fi
13098      fi
13099    fi
13100
13101  fi
13102
13103
13104
13105  if test "x$XARGS" = x; then
13106    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13107  fi
13108
13109
13110
13111  # Then required tools that require some special treatment.
13112
13113
13114  # Publish this variable in the help.
13115
13116
13117  if [ -z "${AWK+x}" ]; then
13118    # The variable is not set by user, try to locate tool using the code snippet
13119    for ac_prog in gawk mawk nawk awk
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_prog_AWK+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  if test -n "$AWK"; then
13129  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13130else
13131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132for as_dir in $PATH
13133do
13134  IFS=$as_save_IFS
13135  test -z "$as_dir" && as_dir=.
13136    for ac_exec_ext in '' $ac_executable_extensions; do
13137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138    ac_cv_prog_AWK="$ac_prog"
13139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140    break 2
13141  fi
13142done
13143  done
13144IFS=$as_save_IFS
13145
13146fi
13147fi
13148AWK=$ac_cv_prog_AWK
13149if test -n "$AWK"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13151$as_echo "$AWK" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$AWK" && break
13159done
13160
13161  else
13162    # The variable is set, but is it from the command line or the environment?
13163
13164    # Try to remove the string !AWK! from our list.
13165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167      # If it failed, the variable was not from the command line. Ignore it,
13168      # but warn the user (except for BASH, which is always set by the calling BASH).
13169      if test "xAWK" != xBASH; then
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13171$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13172      fi
13173      # Try to locate tool using the code snippet
13174      for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216    else
13217      # If it succeeded, then it was overridden by the user. We will use it
13218      # for the tool.
13219
13220      # First remove it from the list of overridden variables, so we can test
13221      # for unknown variables in the end.
13222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13223
13224      # Check if we try to supply an empty value
13225      if test "x$AWK" = x; then
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13227$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13229$as_echo_n "checking for AWK... " >&6; }
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13231$as_echo "disabled" >&6; }
13232      else
13233        # Check if the provided tool contains a complete path.
13234        tool_specified="$AWK"
13235        tool_basename="${tool_specified##*/}"
13236        if test "x$tool_basename" = "x$tool_specified"; then
13237          # A command without a complete path is provided, search $PATH.
13238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13240          # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_AWK+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $AWK in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270AWK=$ac_cv_path_AWK
13271if test -n "$AWK"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273$as_echo "$AWK" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280          if test "x$AWK" = x; then
13281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282          fi
13283        else
13284          # Otherwise we believe it is a complete path. Use it as it is.
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13288$as_echo_n "checking for AWK... " >&6; }
13289          if test ! -x "$tool_specified"; then
13290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13293          fi
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296        fi
13297      fi
13298    fi
13299
13300  fi
13301
13302
13303  if test "x$AWK" = x; then
13304    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13305  fi
13306
13307
13308
13309
13310  # Publish this variable in the help.
13311
13312
13313  if [ -z "${GREP+x}" ]; then
13314    # The variable is not set by user, try to locate tool using the code snippet
13315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13316$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13317if ${ac_cv_path_GREP+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test -z "$GREP"; then
13321  ac_path_GREP_found=false
13322  # Loop through the user's path and test for each of PROGNAME-LIST
13323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13325do
13326  IFS=$as_save_IFS
13327  test -z "$as_dir" && as_dir=.
13328    for ac_prog in grep ggrep; do
13329    for ac_exec_ext in '' $ac_executable_extensions; do
13330      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13331      as_fn_executable_p "$ac_path_GREP" || continue
13332# Check for GNU ac_path_GREP and select it if it is found.
13333  # Check for GNU $ac_path_GREP
13334case `"$ac_path_GREP" --version 2>&1` in
13335*GNU*)
13336  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13337*)
13338  ac_count=0
13339  $as_echo_n 0123456789 >"conftest.in"
13340  while :
13341  do
13342    cat "conftest.in" "conftest.in" >"conftest.tmp"
13343    mv "conftest.tmp" "conftest.in"
13344    cp "conftest.in" "conftest.nl"
13345    $as_echo 'GREP' >> "conftest.nl"
13346    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13347    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13348    as_fn_arith $ac_count + 1 && ac_count=$as_val
13349    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13350      # Best one so far, save it but keep looking for a better one
13351      ac_cv_path_GREP="$ac_path_GREP"
13352      ac_path_GREP_max=$ac_count
13353    fi
13354    # 10*(2^10) chars as input seems more than enough
13355    test $ac_count -gt 10 && break
13356  done
13357  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13358esac
13359
13360      $ac_path_GREP_found && break 3
13361    done
13362  done
13363  done
13364IFS=$as_save_IFS
13365  if test -z "$ac_cv_path_GREP"; then
13366    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13367  fi
13368else
13369  ac_cv_path_GREP=$GREP
13370fi
13371
13372fi
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13374$as_echo "$ac_cv_path_GREP" >&6; }
13375 GREP="$ac_cv_path_GREP"
13376
13377
13378  else
13379    # The variable is set, but is it from the command line or the environment?
13380
13381    # Try to remove the string !GREP! from our list.
13382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384      # If it failed, the variable was not from the command line. Ignore it,
13385      # but warn the user (except for BASH, which is always set by the calling BASH).
13386      if test "xGREP" != xBASH; then
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13388$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13389      fi
13390      # Try to locate tool using the code snippet
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13393if ${ac_cv_path_GREP+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test -z "$GREP"; then
13397  ac_path_GREP_found=false
13398  # Loop through the user's path and test for each of PROGNAME-LIST
13399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13401do
13402  IFS=$as_save_IFS
13403  test -z "$as_dir" && as_dir=.
13404    for ac_prog in grep ggrep; do
13405    for ac_exec_ext in '' $ac_executable_extensions; do
13406      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13407      as_fn_executable_p "$ac_path_GREP" || continue
13408# Check for GNU ac_path_GREP and select it if it is found.
13409  # Check for GNU $ac_path_GREP
13410case `"$ac_path_GREP" --version 2>&1` in
13411*GNU*)
13412  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13413*)
13414  ac_count=0
13415  $as_echo_n 0123456789 >"conftest.in"
13416  while :
13417  do
13418    cat "conftest.in" "conftest.in" >"conftest.tmp"
13419    mv "conftest.tmp" "conftest.in"
13420    cp "conftest.in" "conftest.nl"
13421    $as_echo 'GREP' >> "conftest.nl"
13422    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13423    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13424    as_fn_arith $ac_count + 1 && ac_count=$as_val
13425    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13426      # Best one so far, save it but keep looking for a better one
13427      ac_cv_path_GREP="$ac_path_GREP"
13428      ac_path_GREP_max=$ac_count
13429    fi
13430    # 10*(2^10) chars as input seems more than enough
13431    test $ac_count -gt 10 && break
13432  done
13433  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13434esac
13435
13436      $ac_path_GREP_found && break 3
13437    done
13438  done
13439  done
13440IFS=$as_save_IFS
13441  if test -z "$ac_cv_path_GREP"; then
13442    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13443  fi
13444else
13445  ac_cv_path_GREP=$GREP
13446fi
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13450$as_echo "$ac_cv_path_GREP" >&6; }
13451 GREP="$ac_cv_path_GREP"
13452
13453
13454    else
13455      # If it succeeded, then it was overridden by the user. We will use it
13456      # for the tool.
13457
13458      # First remove it from the list of overridden variables, so we can test
13459      # for unknown variables in the end.
13460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13461
13462      # Check if we try to supply an empty value
13463      if test "x$GREP" = x; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13465$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13467$as_echo_n "checking for GREP... " >&6; }
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13469$as_echo "disabled" >&6; }
13470      else
13471        # Check if the provided tool contains a complete path.
13472        tool_specified="$GREP"
13473        tool_basename="${tool_specified##*/}"
13474        if test "x$tool_basename" = "x$tool_specified"; then
13475          # A command without a complete path is provided, search $PATH.
13476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13477$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13478          # Extract the first word of "$tool_basename", so it can be a program name with args.
13479set dummy $tool_basename; ac_word=$2
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13481$as_echo_n "checking for $ac_word... " >&6; }
13482if ${ac_cv_path_GREP+:} false; then :
13483  $as_echo_n "(cached) " >&6
13484else
13485  case $GREP in
13486  [\\/]* | ?:[\\/]*)
13487  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13488  ;;
13489  *)
13490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13491for as_dir in $PATH
13492do
13493  IFS=$as_save_IFS
13494  test -z "$as_dir" && as_dir=.
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13499    break 2
13500  fi
13501done
13502  done
13503IFS=$as_save_IFS
13504
13505  ;;
13506esac
13507fi
13508GREP=$ac_cv_path_GREP
13509if test -n "$GREP"; then
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13511$as_echo "$GREP" >&6; }
13512else
13513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
13515fi
13516
13517
13518          if test "x$GREP" = x; then
13519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13520          fi
13521        else
13522          # Otherwise we believe it is a complete path. Use it as it is.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13524$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13526$as_echo_n "checking for GREP... " >&6; }
13527          if test ! -x "$tool_specified"; then
13528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13529$as_echo "not found" >&6; }
13530            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13531          fi
13532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13533$as_echo "$tool_specified" >&6; }
13534        fi
13535      fi
13536    fi
13537
13538  fi
13539
13540
13541  if test "x$GREP" = x; then
13542    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13543  fi
13544
13545
13546
13547
13548  # Publish this variable in the help.
13549
13550
13551  if [ -z "${EGREP+x}" ]; then
13552    # The variable is not set by user, try to locate tool using the code snippet
13553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13554$as_echo_n "checking for egrep... " >&6; }
13555if ${ac_cv_path_EGREP+:} false; then :
13556  $as_echo_n "(cached) " >&6
13557else
13558  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13559   then ac_cv_path_EGREP="$GREP -E"
13560   else
13561     if test -z "$EGREP"; then
13562  ac_path_EGREP_found=false
13563  # Loop through the user's path and test for each of PROGNAME-LIST
13564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13566do
13567  IFS=$as_save_IFS
13568  test -z "$as_dir" && as_dir=.
13569    for ac_prog in egrep; do
13570    for ac_exec_ext in '' $ac_executable_extensions; do
13571      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13572      as_fn_executable_p "$ac_path_EGREP" || continue
13573# Check for GNU ac_path_EGREP and select it if it is found.
13574  # Check for GNU $ac_path_EGREP
13575case `"$ac_path_EGREP" --version 2>&1` in
13576*GNU*)
13577  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13578*)
13579  ac_count=0
13580  $as_echo_n 0123456789 >"conftest.in"
13581  while :
13582  do
13583    cat "conftest.in" "conftest.in" >"conftest.tmp"
13584    mv "conftest.tmp" "conftest.in"
13585    cp "conftest.in" "conftest.nl"
13586    $as_echo 'EGREP' >> "conftest.nl"
13587    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13588    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13589    as_fn_arith $ac_count + 1 && ac_count=$as_val
13590    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13591      # Best one so far, save it but keep looking for a better one
13592      ac_cv_path_EGREP="$ac_path_EGREP"
13593      ac_path_EGREP_max=$ac_count
13594    fi
13595    # 10*(2^10) chars as input seems more than enough
13596    test $ac_count -gt 10 && break
13597  done
13598  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13599esac
13600
13601      $ac_path_EGREP_found && break 3
13602    done
13603  done
13604  done
13605IFS=$as_save_IFS
13606  if test -z "$ac_cv_path_EGREP"; then
13607    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13608  fi
13609else
13610  ac_cv_path_EGREP=$EGREP
13611fi
13612
13613   fi
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13616$as_echo "$ac_cv_path_EGREP" >&6; }
13617 EGREP="$ac_cv_path_EGREP"
13618
13619
13620  else
13621    # The variable is set, but is it from the command line or the environment?
13622
13623    # Try to remove the string !EGREP! from our list.
13624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13626      # If it failed, the variable was not from the command line. Ignore it,
13627      # but warn the user (except for BASH, which is always set by the calling BASH).
13628      if test "xEGREP" != xBASH; then
13629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13630$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13631      fi
13632      # Try to locate tool using the code snippet
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13634$as_echo_n "checking for egrep... " >&6; }
13635if ${ac_cv_path_EGREP+:} false; then :
13636  $as_echo_n "(cached) " >&6
13637else
13638  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13639   then ac_cv_path_EGREP="$GREP -E"
13640   else
13641     if test -z "$EGREP"; then
13642  ac_path_EGREP_found=false
13643  # Loop through the user's path and test for each of PROGNAME-LIST
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_prog in egrep; do
13650    for ac_exec_ext in '' $ac_executable_extensions; do
13651      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13652      as_fn_executable_p "$ac_path_EGREP" || continue
13653# Check for GNU ac_path_EGREP and select it if it is found.
13654  # Check for GNU $ac_path_EGREP
13655case `"$ac_path_EGREP" --version 2>&1` in
13656*GNU*)
13657  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13658*)
13659  ac_count=0
13660  $as_echo_n 0123456789 >"conftest.in"
13661  while :
13662  do
13663    cat "conftest.in" "conftest.in" >"conftest.tmp"
13664    mv "conftest.tmp" "conftest.in"
13665    cp "conftest.in" "conftest.nl"
13666    $as_echo 'EGREP' >> "conftest.nl"
13667    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13669    as_fn_arith $ac_count + 1 && ac_count=$as_val
13670    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13671      # Best one so far, save it but keep looking for a better one
13672      ac_cv_path_EGREP="$ac_path_EGREP"
13673      ac_path_EGREP_max=$ac_count
13674    fi
13675    # 10*(2^10) chars as input seems more than enough
13676    test $ac_count -gt 10 && break
13677  done
13678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13679esac
13680
13681      $ac_path_EGREP_found && break 3
13682    done
13683  done
13684  done
13685IFS=$as_save_IFS
13686  if test -z "$ac_cv_path_EGREP"; then
13687    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13688  fi
13689else
13690  ac_cv_path_EGREP=$EGREP
13691fi
13692
13693   fi
13694fi
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13696$as_echo "$ac_cv_path_EGREP" >&6; }
13697 EGREP="$ac_cv_path_EGREP"
13698
13699
13700    else
13701      # If it succeeded, then it was overridden by the user. We will use it
13702      # for the tool.
13703
13704      # First remove it from the list of overridden variables, so we can test
13705      # for unknown variables in the end.
13706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13707
13708      # Check if we try to supply an empty value
13709      if test "x$EGREP" = x; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13711$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13713$as_echo_n "checking for EGREP... " >&6; }
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13715$as_echo "disabled" >&6; }
13716      else
13717        # Check if the provided tool contains a complete path.
13718        tool_specified="$EGREP"
13719        tool_basename="${tool_specified##*/}"
13720        if test "x$tool_basename" = "x$tool_specified"; then
13721          # A command without a complete path is provided, search $PATH.
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13723$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13724          # Extract the first word of "$tool_basename", so it can be a program name with args.
13725set dummy $tool_basename; ac_word=$2
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13727$as_echo_n "checking for $ac_word... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  case $EGREP in
13732  [\\/]* | ?:[\\/]*)
13733  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13734  ;;
13735  *)
13736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13737for as_dir in $PATH
13738do
13739  IFS=$as_save_IFS
13740  test -z "$as_dir" && as_dir=.
13741    for ac_exec_ext in '' $ac_executable_extensions; do
13742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13743    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13745    break 2
13746  fi
13747done
13748  done
13749IFS=$as_save_IFS
13750
13751  ;;
13752esac
13753fi
13754EGREP=$ac_cv_path_EGREP
13755if test -n "$EGREP"; then
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13757$as_echo "$EGREP" >&6; }
13758else
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760$as_echo "no" >&6; }
13761fi
13762
13763
13764          if test "x$EGREP" = x; then
13765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13766          fi
13767        else
13768          # Otherwise we believe it is a complete path. Use it as it is.
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13770$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13772$as_echo_n "checking for EGREP... " >&6; }
13773          if test ! -x "$tool_specified"; then
13774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13775$as_echo "not found" >&6; }
13776            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13777          fi
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13779$as_echo "$tool_specified" >&6; }
13780        fi
13781      fi
13782    fi
13783
13784  fi
13785
13786
13787  if test "x$EGREP" = x; then
13788    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13789  fi
13790
13791
13792
13793
13794  # Publish this variable in the help.
13795
13796
13797  if [ -z "${FGREP+x}" ]; then
13798    # The variable is not set by user, try to locate tool using the code snippet
13799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13800$as_echo_n "checking for fgrep... " >&6; }
13801if ${ac_cv_path_FGREP+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13805   then ac_cv_path_FGREP="$GREP -F"
13806   else
13807     if test -z "$FGREP"; then
13808  ac_path_FGREP_found=false
13809  # Loop through the user's path and test for each of PROGNAME-LIST
13810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13812do
13813  IFS=$as_save_IFS
13814  test -z "$as_dir" && as_dir=.
13815    for ac_prog in fgrep; do
13816    for ac_exec_ext in '' $ac_executable_extensions; do
13817      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13818      as_fn_executable_p "$ac_path_FGREP" || continue
13819# Check for GNU ac_path_FGREP and select it if it is found.
13820  # Check for GNU $ac_path_FGREP
13821case `"$ac_path_FGREP" --version 2>&1` in
13822*GNU*)
13823  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13824*)
13825  ac_count=0
13826  $as_echo_n 0123456789 >"conftest.in"
13827  while :
13828  do
13829    cat "conftest.in" "conftest.in" >"conftest.tmp"
13830    mv "conftest.tmp" "conftest.in"
13831    cp "conftest.in" "conftest.nl"
13832    $as_echo 'FGREP' >> "conftest.nl"
13833    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13834    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13835    as_fn_arith $ac_count + 1 && ac_count=$as_val
13836    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13837      # Best one so far, save it but keep looking for a better one
13838      ac_cv_path_FGREP="$ac_path_FGREP"
13839      ac_path_FGREP_max=$ac_count
13840    fi
13841    # 10*(2^10) chars as input seems more than enough
13842    test $ac_count -gt 10 && break
13843  done
13844  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13845esac
13846
13847      $ac_path_FGREP_found && break 3
13848    done
13849  done
13850  done
13851IFS=$as_save_IFS
13852  if test -z "$ac_cv_path_FGREP"; then
13853    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13854  fi
13855else
13856  ac_cv_path_FGREP=$FGREP
13857fi
13858
13859   fi
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13862$as_echo "$ac_cv_path_FGREP" >&6; }
13863 FGREP="$ac_cv_path_FGREP"
13864
13865
13866  else
13867    # The variable is set, but is it from the command line or the environment?
13868
13869    # Try to remove the string !FGREP! from our list.
13870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13872      # If it failed, the variable was not from the command line. Ignore it,
13873      # but warn the user (except for BASH, which is always set by the calling BASH).
13874      if test "xFGREP" != xBASH; then
13875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13876$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13877      fi
13878      # Try to locate tool using the code snippet
13879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13880$as_echo_n "checking for fgrep... " >&6; }
13881if ${ac_cv_path_FGREP+:} false; then :
13882  $as_echo_n "(cached) " >&6
13883else
13884  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13885   then ac_cv_path_FGREP="$GREP -F"
13886   else
13887     if test -z "$FGREP"; then
13888  ac_path_FGREP_found=false
13889  # Loop through the user's path and test for each of PROGNAME-LIST
13890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13892do
13893  IFS=$as_save_IFS
13894  test -z "$as_dir" && as_dir=.
13895    for ac_prog in fgrep; do
13896    for ac_exec_ext in '' $ac_executable_extensions; do
13897      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13898      as_fn_executable_p "$ac_path_FGREP" || continue
13899# Check for GNU ac_path_FGREP and select it if it is found.
13900  # Check for GNU $ac_path_FGREP
13901case `"$ac_path_FGREP" --version 2>&1` in
13902*GNU*)
13903  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13904*)
13905  ac_count=0
13906  $as_echo_n 0123456789 >"conftest.in"
13907  while :
13908  do
13909    cat "conftest.in" "conftest.in" >"conftest.tmp"
13910    mv "conftest.tmp" "conftest.in"
13911    cp "conftest.in" "conftest.nl"
13912    $as_echo 'FGREP' >> "conftest.nl"
13913    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13915    as_fn_arith $ac_count + 1 && ac_count=$as_val
13916    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13917      # Best one so far, save it but keep looking for a better one
13918      ac_cv_path_FGREP="$ac_path_FGREP"
13919      ac_path_FGREP_max=$ac_count
13920    fi
13921    # 10*(2^10) chars as input seems more than enough
13922    test $ac_count -gt 10 && break
13923  done
13924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13925esac
13926
13927      $ac_path_FGREP_found && break 3
13928    done
13929  done
13930  done
13931IFS=$as_save_IFS
13932  if test -z "$ac_cv_path_FGREP"; then
13933    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13934  fi
13935else
13936  ac_cv_path_FGREP=$FGREP
13937fi
13938
13939   fi
13940fi
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13942$as_echo "$ac_cv_path_FGREP" >&6; }
13943 FGREP="$ac_cv_path_FGREP"
13944
13945
13946    else
13947      # If it succeeded, then it was overridden by the user. We will use it
13948      # for the tool.
13949
13950      # First remove it from the list of overridden variables, so we can test
13951      # for unknown variables in the end.
13952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13953
13954      # Check if we try to supply an empty value
13955      if test "x$FGREP" = x; then
13956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13957$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13959$as_echo_n "checking for FGREP... " >&6; }
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13961$as_echo "disabled" >&6; }
13962      else
13963        # Check if the provided tool contains a complete path.
13964        tool_specified="$FGREP"
13965        tool_basename="${tool_specified##*/}"
13966        if test "x$tool_basename" = "x$tool_specified"; then
13967          # A command without a complete path is provided, search $PATH.
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13969$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13970          # Extract the first word of "$tool_basename", so it can be a program name with args.
13971set dummy $tool_basename; ac_word=$2
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13973$as_echo_n "checking for $ac_word... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  case $FGREP in
13978  [\\/]* | ?:[\\/]*)
13979  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13980  ;;
13981  *)
13982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13983for as_dir in $PATH
13984do
13985  IFS=$as_save_IFS
13986  test -z "$as_dir" && as_dir=.
13987    for ac_exec_ext in '' $ac_executable_extensions; do
13988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13989    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13991    break 2
13992  fi
13993done
13994  done
13995IFS=$as_save_IFS
13996
13997  ;;
13998esac
13999fi
14000FGREP=$ac_cv_path_FGREP
14001if test -n "$FGREP"; then
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14003$as_echo "$FGREP" >&6; }
14004else
14005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006$as_echo "no" >&6; }
14007fi
14008
14009
14010          if test "x$FGREP" = x; then
14011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14012          fi
14013        else
14014          # Otherwise we believe it is a complete path. Use it as it is.
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14016$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14018$as_echo_n "checking for FGREP... " >&6; }
14019          if test ! -x "$tool_specified"; then
14020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14021$as_echo "not found" >&6; }
14022            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14023          fi
14024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14025$as_echo "$tool_specified" >&6; }
14026        fi
14027      fi
14028    fi
14029
14030  fi
14031
14032
14033  if test "x$FGREP" = x; then
14034    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14035  fi
14036
14037
14038
14039
14040  # Publish this variable in the help.
14041
14042
14043  if [ -z "${SED+x}" ]; then
14044    # The variable is not set by user, try to locate tool using the code snippet
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14046$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14047if ${ac_cv_path_SED+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14051     for ac_i in 1 2 3 4 5 6 7; do
14052       ac_script="$ac_script$as_nl$ac_script"
14053     done
14054     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14055     { ac_script=; unset ac_script;}
14056     if test -z "$SED"; then
14057  ac_path_SED_found=false
14058  # Loop through the user's path and test for each of PROGNAME-LIST
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_prog in sed gsed; do
14065    for ac_exec_ext in '' $ac_executable_extensions; do
14066      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14067      as_fn_executable_p "$ac_path_SED" || continue
14068# Check for GNU ac_path_SED and select it if it is found.
14069  # Check for GNU $ac_path_SED
14070case `"$ac_path_SED" --version 2>&1` in
14071*GNU*)
14072  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14073*)
14074  ac_count=0
14075  $as_echo_n 0123456789 >"conftest.in"
14076  while :
14077  do
14078    cat "conftest.in" "conftest.in" >"conftest.tmp"
14079    mv "conftest.tmp" "conftest.in"
14080    cp "conftest.in" "conftest.nl"
14081    $as_echo '' >> "conftest.nl"
14082    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14084    as_fn_arith $ac_count + 1 && ac_count=$as_val
14085    if test $ac_count -gt ${ac_path_SED_max-0}; then
14086      # Best one so far, save it but keep looking for a better one
14087      ac_cv_path_SED="$ac_path_SED"
14088      ac_path_SED_max=$ac_count
14089    fi
14090    # 10*(2^10) chars as input seems more than enough
14091    test $ac_count -gt 10 && break
14092  done
14093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14094esac
14095
14096      $ac_path_SED_found && break 3
14097    done
14098  done
14099  done
14100IFS=$as_save_IFS
14101  if test -z "$ac_cv_path_SED"; then
14102    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14103  fi
14104else
14105  ac_cv_path_SED=$SED
14106fi
14107
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14110$as_echo "$ac_cv_path_SED" >&6; }
14111 SED="$ac_cv_path_SED"
14112  rm -f conftest.sed
14113
14114  else
14115    # The variable is set, but is it from the command line or the environment?
14116
14117    # Try to remove the string !SED! from our list.
14118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14120      # If it failed, the variable was not from the command line. Ignore it,
14121      # but warn the user (except for BASH, which is always set by the calling BASH).
14122      if test "xSED" != xBASH; then
14123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14124$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14125      fi
14126      # Try to locate tool using the code snippet
14127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14128$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14129if ${ac_cv_path_SED+:} false; then :
14130  $as_echo_n "(cached) " >&6
14131else
14132            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14133     for ac_i in 1 2 3 4 5 6 7; do
14134       ac_script="$ac_script$as_nl$ac_script"
14135     done
14136     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14137     { ac_script=; unset ac_script;}
14138     if test -z "$SED"; then
14139  ac_path_SED_found=false
14140  # Loop through the user's path and test for each of PROGNAME-LIST
14141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142for as_dir in $PATH
14143do
14144  IFS=$as_save_IFS
14145  test -z "$as_dir" && as_dir=.
14146    for ac_prog in sed gsed; do
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14149      as_fn_executable_p "$ac_path_SED" || continue
14150# Check for GNU ac_path_SED and select it if it is found.
14151  # Check for GNU $ac_path_SED
14152case `"$ac_path_SED" --version 2>&1` in
14153*GNU*)
14154  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14155*)
14156  ac_count=0
14157  $as_echo_n 0123456789 >"conftest.in"
14158  while :
14159  do
14160    cat "conftest.in" "conftest.in" >"conftest.tmp"
14161    mv "conftest.tmp" "conftest.in"
14162    cp "conftest.in" "conftest.nl"
14163    $as_echo '' >> "conftest.nl"
14164    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14166    as_fn_arith $ac_count + 1 && ac_count=$as_val
14167    if test $ac_count -gt ${ac_path_SED_max-0}; then
14168      # Best one so far, save it but keep looking for a better one
14169      ac_cv_path_SED="$ac_path_SED"
14170      ac_path_SED_max=$ac_count
14171    fi
14172    # 10*(2^10) chars as input seems more than enough
14173    test $ac_count -gt 10 && break
14174  done
14175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14176esac
14177
14178      $ac_path_SED_found && break 3
14179    done
14180  done
14181  done
14182IFS=$as_save_IFS
14183  if test -z "$ac_cv_path_SED"; then
14184    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14185  fi
14186else
14187  ac_cv_path_SED=$SED
14188fi
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14192$as_echo "$ac_cv_path_SED" >&6; }
14193 SED="$ac_cv_path_SED"
14194  rm -f conftest.sed
14195
14196    else
14197      # If it succeeded, then it was overridden by the user. We will use it
14198      # for the tool.
14199
14200      # First remove it from the list of overridden variables, so we can test
14201      # for unknown variables in the end.
14202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14203
14204      # Check if we try to supply an empty value
14205      if test "x$SED" = x; then
14206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14207$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14209$as_echo_n "checking for SED... " >&6; }
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14211$as_echo "disabled" >&6; }
14212      else
14213        # Check if the provided tool contains a complete path.
14214        tool_specified="$SED"
14215        tool_basename="${tool_specified##*/}"
14216        if test "x$tool_basename" = "x$tool_specified"; then
14217          # A command without a complete path is provided, search $PATH.
14218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14219$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14220          # Extract the first word of "$tool_basename", so it can be a program name with args.
14221set dummy $tool_basename; ac_word=$2
14222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14223$as_echo_n "checking for $ac_word... " >&6; }
14224if ${ac_cv_path_SED+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  case $SED in
14228  [\\/]* | ?:[\\/]*)
14229  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14230  ;;
14231  *)
14232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14233for as_dir in $PATH
14234do
14235  IFS=$as_save_IFS
14236  test -z "$as_dir" && as_dir=.
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14239    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14241    break 2
14242  fi
14243done
14244  done
14245IFS=$as_save_IFS
14246
14247  ;;
14248esac
14249fi
14250SED=$ac_cv_path_SED
14251if test -n "$SED"; then
14252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14253$as_echo "$SED" >&6; }
14254else
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256$as_echo "no" >&6; }
14257fi
14258
14259
14260          if test "x$SED" = x; then
14261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14262          fi
14263        else
14264          # Otherwise we believe it is a complete path. Use it as it is.
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14266$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14268$as_echo_n "checking for SED... " >&6; }
14269          if test ! -x "$tool_specified"; then
14270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14271$as_echo "not found" >&6; }
14272            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14273          fi
14274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14275$as_echo "$tool_specified" >&6; }
14276        fi
14277      fi
14278    fi
14279
14280  fi
14281
14282
14283  if test "x$SED" = x; then
14284    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14285  fi
14286
14287
14288
14289  # Always force rm.
14290  RM="$RM -f"
14291
14292  # pwd behaves differently on various platforms and some don't support the -L flag.
14293  # Always use the bash builtin pwd to get uniform behavior.
14294  THEPWDCMD=pwd
14295
14296  # These are not required on all platforms
14297
14298
14299  # Publish this variable in the help.
14300
14301
14302  if [ -z "${CYGPATH+x}" ]; then
14303    # The variable is not set by user, try to locate tool using the code snippet
14304    for ac_prog in cygpath
14305do
14306  # Extract the first word of "$ac_prog", so it can be a program name with args.
14307set dummy $ac_prog; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_CYGPATH+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $CYGPATH in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336CYGPATH=$ac_cv_path_CYGPATH
14337if test -n "$CYGPATH"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14339$as_echo "$CYGPATH" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346  test -n "$CYGPATH" && break
14347done
14348
14349  else
14350    # The variable is set, but is it from the command line or the environment?
14351
14352    # Try to remove the string !CYGPATH! from our list.
14353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14355      # If it failed, the variable was not from the command line. Ignore it,
14356      # but warn the user (except for BASH, which is always set by the calling BASH).
14357      if test "xCYGPATH" != xBASH; then
14358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14359$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14360      fi
14361      # Try to locate tool using the code snippet
14362      for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407    else
14408      # If it succeeded, then it was overridden by the user. We will use it
14409      # for the tool.
14410
14411      # First remove it from the list of overridden variables, so we can test
14412      # for unknown variables in the end.
14413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14414
14415      # Check if we try to supply an empty value
14416      if test "x$CYGPATH" = x; then
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14418$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14420$as_echo_n "checking for CYGPATH... " >&6; }
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14422$as_echo "disabled" >&6; }
14423      else
14424        # Check if the provided tool contains a complete path.
14425        tool_specified="$CYGPATH"
14426        tool_basename="${tool_specified##*/}"
14427        if test "x$tool_basename" = "x$tool_specified"; then
14428          # A command without a complete path is provided, search $PATH.
14429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14430$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14431          # Extract the first word of "$tool_basename", so it can be a program name with args.
14432set dummy $tool_basename; ac_word=$2
14433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14434$as_echo_n "checking for $ac_word... " >&6; }
14435if ${ac_cv_path_CYGPATH+:} false; then :
14436  $as_echo_n "(cached) " >&6
14437else
14438  case $CYGPATH in
14439  [\\/]* | ?:[\\/]*)
14440  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14441  ;;
14442  *)
14443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14444for as_dir in $PATH
14445do
14446  IFS=$as_save_IFS
14447  test -z "$as_dir" && as_dir=.
14448    for ac_exec_ext in '' $ac_executable_extensions; do
14449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14450    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14452    break 2
14453  fi
14454done
14455  done
14456IFS=$as_save_IFS
14457
14458  ;;
14459esac
14460fi
14461CYGPATH=$ac_cv_path_CYGPATH
14462if test -n "$CYGPATH"; then
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14464$as_echo "$CYGPATH" >&6; }
14465else
14466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467$as_echo "no" >&6; }
14468fi
14469
14470
14471          if test "x$CYGPATH" = x; then
14472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14473          fi
14474        else
14475          # Otherwise we believe it is a complete path. Use it as it is.
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14477$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14479$as_echo_n "checking for CYGPATH... " >&6; }
14480          if test ! -x "$tool_specified"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14482$as_echo "not found" >&6; }
14483            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14484          fi
14485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14486$as_echo "$tool_specified" >&6; }
14487        fi
14488      fi
14489    fi
14490
14491  fi
14492
14493
14494
14495
14496  # Publish this variable in the help.
14497
14498
14499  if [ -z "${READLINK+x}" ]; then
14500    # The variable is not set by user, try to locate tool using the code snippet
14501    for ac_prog in greadlink readlink
14502do
14503  # Extract the first word of "$ac_prog", so it can be a program name with args.
14504set dummy $ac_prog; ac_word=$2
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14506$as_echo_n "checking for $ac_word... " >&6; }
14507if ${ac_cv_path_READLINK+:} false; then :
14508  $as_echo_n "(cached) " >&6
14509else
14510  case $READLINK in
14511  [\\/]* | ?:[\\/]*)
14512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14513  ;;
14514  *)
14515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14516for as_dir in $PATH
14517do
14518  IFS=$as_save_IFS
14519  test -z "$as_dir" && as_dir=.
14520    for ac_exec_ext in '' $ac_executable_extensions; do
14521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14524    break 2
14525  fi
14526done
14527  done
14528IFS=$as_save_IFS
14529
14530  ;;
14531esac
14532fi
14533READLINK=$ac_cv_path_READLINK
14534if test -n "$READLINK"; then
14535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14536$as_echo "$READLINK" >&6; }
14537else
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
14540fi
14541
14542
14543  test -n "$READLINK" && break
14544done
14545
14546  else
14547    # The variable is set, but is it from the command line or the environment?
14548
14549    # Try to remove the string !READLINK! from our list.
14550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14552      # If it failed, the variable was not from the command line. Ignore it,
14553      # but warn the user (except for BASH, which is always set by the calling BASH).
14554      if test "xREADLINK" != xBASH; then
14555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14556$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14557      fi
14558      # Try to locate tool using the code snippet
14559      for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604    else
14605      # If it succeeded, then it was overridden by the user. We will use it
14606      # for the tool.
14607
14608      # First remove it from the list of overridden variables, so we can test
14609      # for unknown variables in the end.
14610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14611
14612      # Check if we try to supply an empty value
14613      if test "x$READLINK" = x; then
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14615$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14617$as_echo_n "checking for READLINK... " >&6; }
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14619$as_echo "disabled" >&6; }
14620      else
14621        # Check if the provided tool contains a complete path.
14622        tool_specified="$READLINK"
14623        tool_basename="${tool_specified##*/}"
14624        if test "x$tool_basename" = "x$tool_specified"; then
14625          # A command without a complete path is provided, search $PATH.
14626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14627$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14628          # Extract the first word of "$tool_basename", so it can be a program name with args.
14629set dummy $tool_basename; ac_word=$2
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14631$as_echo_n "checking for $ac_word... " >&6; }
14632if ${ac_cv_path_READLINK+:} false; then :
14633  $as_echo_n "(cached) " >&6
14634else
14635  case $READLINK in
14636  [\\/]* | ?:[\\/]*)
14637  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14638  ;;
14639  *)
14640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14641for as_dir in $PATH
14642do
14643  IFS=$as_save_IFS
14644  test -z "$as_dir" && as_dir=.
14645    for ac_exec_ext in '' $ac_executable_extensions; do
14646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14647    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14649    break 2
14650  fi
14651done
14652  done
14653IFS=$as_save_IFS
14654
14655  ;;
14656esac
14657fi
14658READLINK=$ac_cv_path_READLINK
14659if test -n "$READLINK"; then
14660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14661$as_echo "$READLINK" >&6; }
14662else
14663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664$as_echo "no" >&6; }
14665fi
14666
14667
14668          if test "x$READLINK" = x; then
14669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14670          fi
14671        else
14672          # Otherwise we believe it is a complete path. Use it as it is.
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14674$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14676$as_echo_n "checking for READLINK... " >&6; }
14677          if test ! -x "$tool_specified"; then
14678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14679$as_echo "not found" >&6; }
14680            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14681          fi
14682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14683$as_echo "$tool_specified" >&6; }
14684        fi
14685      fi
14686    fi
14687
14688  fi
14689
14690
14691
14692
14693  # Publish this variable in the help.
14694
14695
14696  if [ -z "${DF+x}" ]; then
14697    # The variable is not set by user, try to locate tool using the code snippet
14698    for ac_prog in df
14699do
14700  # Extract the first word of "$ac_prog", so it can be a program name with args.
14701set dummy $ac_prog; ac_word=$2
14702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703$as_echo_n "checking for $ac_word... " >&6; }
14704if ${ac_cv_path_DF+:} false; then :
14705  $as_echo_n "(cached) " >&6
14706else
14707  case $DF in
14708  [\\/]* | ?:[\\/]*)
14709  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14710  ;;
14711  *)
14712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713for as_dir in $PATH
14714do
14715  IFS=$as_save_IFS
14716  test -z "$as_dir" && as_dir=.
14717    for ac_exec_ext in '' $ac_executable_extensions; do
14718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721    break 2
14722  fi
14723done
14724  done
14725IFS=$as_save_IFS
14726
14727  ;;
14728esac
14729fi
14730DF=$ac_cv_path_DF
14731if test -n "$DF"; then
14732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14733$as_echo "$DF" >&6; }
14734else
14735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736$as_echo "no" >&6; }
14737fi
14738
14739
14740  test -n "$DF" && break
14741done
14742
14743  else
14744    # The variable is set, but is it from the command line or the environment?
14745
14746    # Try to remove the string !DF! from our list.
14747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14749      # If it failed, the variable was not from the command line. Ignore it,
14750      # but warn the user (except for BASH, which is always set by the calling BASH).
14751      if test "xDF" != xBASH; then
14752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14753$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14754      fi
14755      # Try to locate tool using the code snippet
14756      for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801    else
14802      # If it succeeded, then it was overridden by the user. We will use it
14803      # for the tool.
14804
14805      # First remove it from the list of overridden variables, so we can test
14806      # for unknown variables in the end.
14807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14808
14809      # Check if we try to supply an empty value
14810      if test "x$DF" = x; then
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14812$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14814$as_echo_n "checking for DF... " >&6; }
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14816$as_echo "disabled" >&6; }
14817      else
14818        # Check if the provided tool contains a complete path.
14819        tool_specified="$DF"
14820        tool_basename="${tool_specified##*/}"
14821        if test "x$tool_basename" = "x$tool_specified"; then
14822          # A command without a complete path is provided, search $PATH.
14823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14824$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14825          # Extract the first word of "$tool_basename", so it can be a program name with args.
14826set dummy $tool_basename; ac_word=$2
14827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14828$as_echo_n "checking for $ac_word... " >&6; }
14829if ${ac_cv_path_DF+:} false; then :
14830  $as_echo_n "(cached) " >&6
14831else
14832  case $DF in
14833  [\\/]* | ?:[\\/]*)
14834  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14835  ;;
14836  *)
14837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14838for as_dir in $PATH
14839do
14840  IFS=$as_save_IFS
14841  test -z "$as_dir" && as_dir=.
14842    for ac_exec_ext in '' $ac_executable_extensions; do
14843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14844    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14846    break 2
14847  fi
14848done
14849  done
14850IFS=$as_save_IFS
14851
14852  ;;
14853esac
14854fi
14855DF=$ac_cv_path_DF
14856if test -n "$DF"; then
14857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14858$as_echo "$DF" >&6; }
14859else
14860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861$as_echo "no" >&6; }
14862fi
14863
14864
14865          if test "x$DF" = x; then
14866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14867          fi
14868        else
14869          # Otherwise we believe it is a complete path. Use it as it is.
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14871$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14873$as_echo_n "checking for DF... " >&6; }
14874          if test ! -x "$tool_specified"; then
14875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14876$as_echo "not found" >&6; }
14877            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14878          fi
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14880$as_echo "$tool_specified" >&6; }
14881        fi
14882      fi
14883    fi
14884
14885  fi
14886
14887
14888
14889
14890  # Publish this variable in the help.
14891
14892
14893  if [ -z "${CPIO+x}" ]; then
14894    # The variable is not set by user, try to locate tool using the code snippet
14895    for ac_prog in cpio bsdcpio
14896do
14897  # Extract the first word of "$ac_prog", so it can be a program name with args.
14898set dummy $ac_prog; ac_word=$2
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14900$as_echo_n "checking for $ac_word... " >&6; }
14901if ${ac_cv_path_CPIO+:} false; then :
14902  $as_echo_n "(cached) " >&6
14903else
14904  case $CPIO in
14905  [\\/]* | ?:[\\/]*)
14906  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14907  ;;
14908  *)
14909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14910for as_dir in $PATH
14911do
14912  IFS=$as_save_IFS
14913  test -z "$as_dir" && as_dir=.
14914    for ac_exec_ext in '' $ac_executable_extensions; do
14915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14916    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14918    break 2
14919  fi
14920done
14921  done
14922IFS=$as_save_IFS
14923
14924  ;;
14925esac
14926fi
14927CPIO=$ac_cv_path_CPIO
14928if test -n "$CPIO"; then
14929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14930$as_echo "$CPIO" >&6; }
14931else
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14933$as_echo "no" >&6; }
14934fi
14935
14936
14937  test -n "$CPIO" && break
14938done
14939
14940  else
14941    # The variable is set, but is it from the command line or the environment?
14942
14943    # Try to remove the string !CPIO! from our list.
14944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14946      # If it failed, the variable was not from the command line. Ignore it,
14947      # but warn the user (except for BASH, which is always set by the calling BASH).
14948      if test "xCPIO" != xBASH; then
14949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14950$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14951      fi
14952      # Try to locate tool using the code snippet
14953      for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998    else
14999      # If it succeeded, then it was overridden by the user. We will use it
15000      # for the tool.
15001
15002      # First remove it from the list of overridden variables, so we can test
15003      # for unknown variables in the end.
15004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15005
15006      # Check if we try to supply an empty value
15007      if test "x$CPIO" = x; then
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15009$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15011$as_echo_n "checking for CPIO... " >&6; }
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15013$as_echo "disabled" >&6; }
15014      else
15015        # Check if the provided tool contains a complete path.
15016        tool_specified="$CPIO"
15017        tool_basename="${tool_specified##*/}"
15018        if test "x$tool_basename" = "x$tool_specified"; then
15019          # A command without a complete path is provided, search $PATH.
15020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15021$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15022          # Extract the first word of "$tool_basename", so it can be a program name with args.
15023set dummy $tool_basename; ac_word=$2
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15025$as_echo_n "checking for $ac_word... " >&6; }
15026if ${ac_cv_path_CPIO+:} false; then :
15027  $as_echo_n "(cached) " >&6
15028else
15029  case $CPIO in
15030  [\\/]* | ?:[\\/]*)
15031  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15032  ;;
15033  *)
15034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035for as_dir in $PATH
15036do
15037  IFS=$as_save_IFS
15038  test -z "$as_dir" && as_dir=.
15039    for ac_exec_ext in '' $ac_executable_extensions; do
15040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15041    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15043    break 2
15044  fi
15045done
15046  done
15047IFS=$as_save_IFS
15048
15049  ;;
15050esac
15051fi
15052CPIO=$ac_cv_path_CPIO
15053if test -n "$CPIO"; then
15054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15055$as_echo "$CPIO" >&6; }
15056else
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15058$as_echo "no" >&6; }
15059fi
15060
15061
15062          if test "x$CPIO" = x; then
15063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15064          fi
15065        else
15066          # Otherwise we believe it is a complete path. Use it as it is.
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15068$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15070$as_echo_n "checking for CPIO... " >&6; }
15071          if test ! -x "$tool_specified"; then
15072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15073$as_echo "not found" >&6; }
15074            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15075          fi
15076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15077$as_echo "$tool_specified" >&6; }
15078        fi
15079      fi
15080    fi
15081
15082  fi
15083
15084
15085
15086
15087  # Publish this variable in the help.
15088
15089
15090  if [ -z "${NICE+x}" ]; then
15091    # The variable is not set by user, try to locate tool using the code snippet
15092    for ac_prog in nice
15093do
15094  # Extract the first word of "$ac_prog", so it can be a program name with args.
15095set dummy $ac_prog; ac_word=$2
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097$as_echo_n "checking for $ac_word... " >&6; }
15098if ${ac_cv_path_NICE+:} false; then :
15099  $as_echo_n "(cached) " >&6
15100else
15101  case $NICE in
15102  [\\/]* | ?:[\\/]*)
15103  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15104  ;;
15105  *)
15106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15107for as_dir in $PATH
15108do
15109  IFS=$as_save_IFS
15110  test -z "$as_dir" && as_dir=.
15111    for ac_exec_ext in '' $ac_executable_extensions; do
15112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15113    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15115    break 2
15116  fi
15117done
15118  done
15119IFS=$as_save_IFS
15120
15121  ;;
15122esac
15123fi
15124NICE=$ac_cv_path_NICE
15125if test -n "$NICE"; then
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15127$as_echo "$NICE" >&6; }
15128else
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
15131fi
15132
15133
15134  test -n "$NICE" && break
15135done
15136
15137  else
15138    # The variable is set, but is it from the command line or the environment?
15139
15140    # Try to remove the string !NICE! from our list.
15141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15143      # If it failed, the variable was not from the command line. Ignore it,
15144      # but warn the user (except for BASH, which is always set by the calling BASH).
15145      if test "xNICE" != xBASH; then
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15147$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15148      fi
15149      # Try to locate tool using the code snippet
15150      for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195    else
15196      # If it succeeded, then it was overridden by the user. We will use it
15197      # for the tool.
15198
15199      # First remove it from the list of overridden variables, so we can test
15200      # for unknown variables in the end.
15201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15202
15203      # Check if we try to supply an empty value
15204      if test "x$NICE" = x; then
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15206$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15208$as_echo_n "checking for NICE... " >&6; }
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15210$as_echo "disabled" >&6; }
15211      else
15212        # Check if the provided tool contains a complete path.
15213        tool_specified="$NICE"
15214        tool_basename="${tool_specified##*/}"
15215        if test "x$tool_basename" = "x$tool_specified"; then
15216          # A command without a complete path is provided, search $PATH.
15217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15218$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15219          # Extract the first word of "$tool_basename", so it can be a program name with args.
15220set dummy $tool_basename; ac_word=$2
15221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15222$as_echo_n "checking for $ac_word... " >&6; }
15223if ${ac_cv_path_NICE+:} false; then :
15224  $as_echo_n "(cached) " >&6
15225else
15226  case $NICE in
15227  [\\/]* | ?:[\\/]*)
15228  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15229  ;;
15230  *)
15231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15232for as_dir in $PATH
15233do
15234  IFS=$as_save_IFS
15235  test -z "$as_dir" && as_dir=.
15236    for ac_exec_ext in '' $ac_executable_extensions; do
15237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15238    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15240    break 2
15241  fi
15242done
15243  done
15244IFS=$as_save_IFS
15245
15246  ;;
15247esac
15248fi
15249NICE=$ac_cv_path_NICE
15250if test -n "$NICE"; then
15251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15252$as_echo "$NICE" >&6; }
15253else
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255$as_echo "no" >&6; }
15256fi
15257
15258
15259          if test "x$NICE" = x; then
15260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15261          fi
15262        else
15263          # Otherwise we believe it is a complete path. Use it as it is.
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15265$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15267$as_echo_n "checking for NICE... " >&6; }
15268          if test ! -x "$tool_specified"; then
15269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15270$as_echo "not found" >&6; }
15271            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15272          fi
15273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15274$as_echo "$tool_specified" >&6; }
15275        fi
15276      fi
15277    fi
15278
15279  fi
15280
15281
15282
15283
15284# Now we can determine OpenJDK build and target platforms. This is required to
15285# have early on.
15286# Make sure we can run config.sub.
15287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15288  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15289
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15291$as_echo_n "checking build system type... " >&6; }
15292if ${ac_cv_build+:} false; then :
15293  $as_echo_n "(cached) " >&6
15294else
15295  ac_build_alias=$build_alias
15296test "x$ac_build_alias" = x &&
15297  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15298test "x$ac_build_alias" = x &&
15299  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15301  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15302
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15305$as_echo "$ac_cv_build" >&6; }
15306case $ac_cv_build in
15307*-*-*) ;;
15308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15309esac
15310build=$ac_cv_build
15311ac_save_IFS=$IFS; IFS='-'
15312set x $ac_cv_build
15313shift
15314build_cpu=$1
15315build_vendor=$2
15316shift; shift
15317# Remember, the first character of IFS is used to create $*,
15318# except with old shells:
15319build_os=$*
15320IFS=$ac_save_IFS
15321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15322
15323
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15325$as_echo_n "checking host system type... " >&6; }
15326if ${ac_cv_host+:} false; then :
15327  $as_echo_n "(cached) " >&6
15328else
15329  if test "x$host_alias" = x; then
15330  ac_cv_host=$ac_cv_build
15331else
15332  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15333    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15334fi
15335
15336fi
15337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15338$as_echo "$ac_cv_host" >&6; }
15339case $ac_cv_host in
15340*-*-*) ;;
15341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15342esac
15343host=$ac_cv_host
15344ac_save_IFS=$IFS; IFS='-'
15345set x $ac_cv_host
15346shift
15347host_cpu=$1
15348host_vendor=$2
15349shift; shift
15350# Remember, the first character of IFS is used to create $*,
15351# except with old shells:
15352host_os=$*
15353IFS=$ac_save_IFS
15354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15355
15356
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15358$as_echo_n "checking target system type... " >&6; }
15359if ${ac_cv_target+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test "x$target_alias" = x; then
15363  ac_cv_target=$ac_cv_host
15364else
15365  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15366    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15367fi
15368
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15371$as_echo "$ac_cv_target" >&6; }
15372case $ac_cv_target in
15373*-*-*) ;;
15374*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15375esac
15376target=$ac_cv_target
15377ac_save_IFS=$IFS; IFS='-'
15378set x $ac_cv_target
15379shift
15380target_cpu=$1
15381target_vendor=$2
15382shift; shift
15383# Remember, the first character of IFS is used to create $*,
15384# except with old shells:
15385target_os=$*
15386IFS=$ac_save_IFS
15387case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15388
15389
15390# The aliases save the names the user supplied, while $host etc.
15391# will get canonicalized.
15392test -n "$target_alias" &&
15393  test "$program_prefix$program_suffix$program_transform_name" = \
15394    NONENONEs,x,x, &&
15395  program_prefix=${target_alias}-
15396
15397  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15398  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15399  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15400  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15401  # to use the configure naming style.
15402
15403
15404
15405
15406
15407  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15408  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15409  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15410  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15411  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15412  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15413
15414
15415
15416  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15417
15418  case "$build_os" in
15419    *linux*)
15420      VAR_OS=linux
15421      VAR_OS_TYPE=unix
15422      ;;
15423    *solaris*)
15424      VAR_OS=solaris
15425      VAR_OS_TYPE=unix
15426      ;;
15427    *darwin*)
15428      VAR_OS=macosx
15429      VAR_OS_TYPE=unix
15430      ;;
15431    *bsd*)
15432      VAR_OS=bsd
15433      VAR_OS_TYPE=unix
15434      ;;
15435    *cygwin*)
15436      VAR_OS=windows
15437      VAR_OS_ENV=windows.cygwin
15438      ;;
15439    *mingw*)
15440      VAR_OS=windows
15441      VAR_OS_ENV=windows.msys
15442      ;;
15443    *aix*)
15444      VAR_OS=aix
15445      VAR_OS_TYPE=unix
15446      ;;
15447    *)
15448      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15449      ;;
15450  esac
15451
15452
15453  # First argument is the cpu name from the trip/quad
15454  case "$build_cpu" in
15455    x86_64)
15456      VAR_CPU=x86_64
15457      VAR_CPU_ARCH=x86
15458      VAR_CPU_BITS=64
15459      VAR_CPU_ENDIAN=little
15460      ;;
15461    i?86)
15462      VAR_CPU=x86
15463      VAR_CPU_ARCH=x86
15464      VAR_CPU_BITS=32
15465      VAR_CPU_ENDIAN=little
15466      ;;
15467    arm*)
15468      VAR_CPU=arm
15469      VAR_CPU_ARCH=arm
15470      VAR_CPU_BITS=32
15471      VAR_CPU_ENDIAN=little
15472      ;;
15473    aarch64)
15474      VAR_CPU=aarch64
15475      VAR_CPU_ARCH=aarch64
15476      VAR_CPU_BITS=64
15477      VAR_CPU_ENDIAN=little
15478      ;;
15479    powerpc)
15480      VAR_CPU=ppc
15481      VAR_CPU_ARCH=ppc
15482      VAR_CPU_BITS=32
15483      VAR_CPU_ENDIAN=big
15484      ;;
15485    powerpc64)
15486      VAR_CPU=ppc64
15487      VAR_CPU_ARCH=ppc
15488      VAR_CPU_BITS=64
15489      VAR_CPU_ENDIAN=big
15490      ;;
15491    powerpc64le)
15492      VAR_CPU=ppc64le
15493      VAR_CPU_ARCH=ppc
15494      VAR_CPU_BITS=64
15495      VAR_CPU_ENDIAN=little
15496      ;;
15497    s390)
15498      VAR_CPU=s390
15499      VAR_CPU_ARCH=s390
15500      VAR_CPU_BITS=32
15501      VAR_CPU_ENDIAN=big
15502      ;;
15503    s390x)
15504      VAR_CPU=s390x
15505      VAR_CPU_ARCH=s390
15506      VAR_CPU_BITS=64
15507      VAR_CPU_ENDIAN=big
15508      ;;
15509    sparc)
15510      VAR_CPU=sparc
15511      VAR_CPU_ARCH=sparc
15512      VAR_CPU_BITS=32
15513      VAR_CPU_ENDIAN=big
15514      ;;
15515    sparcv9|sparc64)
15516      VAR_CPU=sparcv9
15517      VAR_CPU_ARCH=sparc
15518      VAR_CPU_BITS=64
15519      VAR_CPU_ENDIAN=big
15520      ;;
15521    *)
15522      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15523      ;;
15524  esac
15525
15526  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15527  OPENJDK_BUILD_OS="$VAR_OS"
15528  if test "x$VAR_OS_TYPE" != x; then
15529    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15530  else
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15532  fi
15533  if test "x$VAR_OS_ENV" != x; then
15534    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15535  else
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15537  fi
15538  OPENJDK_BUILD_CPU="$VAR_CPU"
15539  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15540  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15541  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15542
15543
15544
15545
15546
15547
15548
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15551$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15553$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15554
15555  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15556
15557  case "$host_os" in
15558    *linux*)
15559      VAR_OS=linux
15560      VAR_OS_TYPE=unix
15561      ;;
15562    *solaris*)
15563      VAR_OS=solaris
15564      VAR_OS_TYPE=unix
15565      ;;
15566    *darwin*)
15567      VAR_OS=macosx
15568      VAR_OS_TYPE=unix
15569      ;;
15570    *bsd*)
15571      VAR_OS=bsd
15572      VAR_OS_TYPE=unix
15573      ;;
15574    *cygwin*)
15575      VAR_OS=windows
15576      VAR_OS_ENV=windows.cygwin
15577      ;;
15578    *mingw*)
15579      VAR_OS=windows
15580      VAR_OS_ENV=windows.msys
15581      ;;
15582    *aix*)
15583      VAR_OS=aix
15584      VAR_OS_TYPE=unix
15585      ;;
15586    *)
15587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15588      ;;
15589  esac
15590
15591
15592  # First argument is the cpu name from the trip/quad
15593  case "$host_cpu" in
15594    x86_64)
15595      VAR_CPU=x86_64
15596      VAR_CPU_ARCH=x86
15597      VAR_CPU_BITS=64
15598      VAR_CPU_ENDIAN=little
15599      ;;
15600    i?86)
15601      VAR_CPU=x86
15602      VAR_CPU_ARCH=x86
15603      VAR_CPU_BITS=32
15604      VAR_CPU_ENDIAN=little
15605      ;;
15606    arm*)
15607      VAR_CPU=arm
15608      VAR_CPU_ARCH=arm
15609      VAR_CPU_BITS=32
15610      VAR_CPU_ENDIAN=little
15611      ;;
15612    aarch64)
15613      VAR_CPU=aarch64
15614      VAR_CPU_ARCH=aarch64
15615      VAR_CPU_BITS=64
15616      VAR_CPU_ENDIAN=little
15617      ;;
15618    powerpc)
15619      VAR_CPU=ppc
15620      VAR_CPU_ARCH=ppc
15621      VAR_CPU_BITS=32
15622      VAR_CPU_ENDIAN=big
15623      ;;
15624    powerpc64)
15625      VAR_CPU=ppc64
15626      VAR_CPU_ARCH=ppc
15627      VAR_CPU_BITS=64
15628      VAR_CPU_ENDIAN=big
15629      ;;
15630    powerpc64le)
15631      VAR_CPU=ppc64le
15632      VAR_CPU_ARCH=ppc
15633      VAR_CPU_BITS=64
15634      VAR_CPU_ENDIAN=little
15635      ;;
15636    s390)
15637      VAR_CPU=s390
15638      VAR_CPU_ARCH=s390
15639      VAR_CPU_BITS=32
15640      VAR_CPU_ENDIAN=big
15641      ;;
15642    s390x)
15643      VAR_CPU=s390x
15644      VAR_CPU_ARCH=s390
15645      VAR_CPU_BITS=64
15646      VAR_CPU_ENDIAN=big
15647      ;;
15648    sparc)
15649      VAR_CPU=sparc
15650      VAR_CPU_ARCH=sparc
15651      VAR_CPU_BITS=32
15652      VAR_CPU_ENDIAN=big
15653      ;;
15654    sparcv9|sparc64)
15655      VAR_CPU=sparcv9
15656      VAR_CPU_ARCH=sparc
15657      VAR_CPU_BITS=64
15658      VAR_CPU_ENDIAN=big
15659      ;;
15660    *)
15661      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15662      ;;
15663  esac
15664
15665  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15666  OPENJDK_TARGET_OS="$VAR_OS"
15667  if test "x$VAR_OS_TYPE" != x; then
15668    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15669  else
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15671  fi
15672  if test "x$VAR_OS_ENV" != x; then
15673    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15674  else
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15676  fi
15677  OPENJDK_TARGET_CPU="$VAR_CPU"
15678  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15679  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15680  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15681
15682
15683
15684
15685
15686
15687
15688
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15690$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15692$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15693
15694
15695
15696# Check whether --with-target-bits was given.
15697if test "${with_target_bits+set}" = set; then :
15698  withval=$with_target_bits;
15699fi
15700
15701
15702  # We have three types of compiles:
15703  # native  == normal compilation, target system == build system
15704  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15705  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15706  #
15707  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15708    # We're doing a proper cross-compilation
15709    COMPILE_TYPE="cross"
15710  else
15711    COMPILE_TYPE="native"
15712  fi
15713
15714  if test "x$with_target_bits" != x; then
15715    if test "x$COMPILE_TYPE" = "xcross"; then
15716      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15717    fi
15718
15719    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15720      # A reduced build is requested
15721      COMPILE_TYPE="reduced"
15722      OPENJDK_TARGET_CPU_BITS=32
15723      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15724        OPENJDK_TARGET_CPU=x86
15725      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15726        OPENJDK_TARGET_CPU=sparc
15727      else
15728        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15729      fi
15730    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15731      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
15732    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15734$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15735    else
15736      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15737    fi
15738  fi
15739
15740
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15742$as_echo_n "checking compilation type... " >&6; }
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15744$as_echo "$COMPILE_TYPE" >&6; }
15745
15746
15747  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15748    REQUIRED_OS_NAME=SunOS
15749    REQUIRED_OS_VERSION=5.10
15750  fi
15751  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15752    REQUIRED_OS_NAME=Linux
15753    REQUIRED_OS_VERSION=2.6
15754  fi
15755  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15756    REQUIRED_OS_NAME=Windows
15757    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15758      REQUIRED_OS_VERSION=5.2
15759    else
15760      REQUIRED_OS_VERSION=5.1
15761    fi
15762  fi
15763  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15764    REQUIRED_OS_NAME=Darwin
15765    REQUIRED_OS_VERSION=11.2
15766  fi
15767  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15768    REQUIRED_OS_NAME=AIX
15769    REQUIRED_OS_VERSION=7.1
15770  fi
15771
15772
15773
15774
15775
15776
15777  # Also store the legacy naming of the cpu.
15778  # Ie i586 and amd64 instead of x86 and x86_64
15779  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY="i586"
15782  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    # On all platforms except MacOSX replace x86_64 with amd64.
15784    OPENJDK_TARGET_CPU_LEGACY="amd64"
15785  fi
15786
15787
15788  # And the second legacy naming of the cpu.
15789  # Ie i386 and amd64 instead of x86 and x86_64.
15790  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15791  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15792    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15793  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15795  fi
15796
15797
15798  # This is the name of the cpu (but using i386 and amd64 instead of
15799  # x86 and x86_64, respectively), preceeded by a /, to be used when
15800  # locating libraries. On macosx, it's empty, though.
15801  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15803    OPENJDK_TARGET_CPU_LIBDIR=""
15804  fi
15805
15806
15807  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15808  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15809  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15810  OPENJDK_TARGET_CPU_ISADIR=""
15811  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15812    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15813      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15814    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15815      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15816    fi
15817  fi
15818
15819
15820  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15821  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15822  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15823    # On linux only, we replace x86 with i386.
15824    OPENJDK_TARGET_CPU_OSARCH="i386"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except macosx, we replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_OSARCH="amd64"
15828  fi
15829
15830
15831  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15832  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15833    OPENJDK_TARGET_CPU_JLI="i386"
15834  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15835    # On all platforms except macosx, we replace x86_64 with amd64.
15836    OPENJDK_TARGET_CPU_JLI="amd64"
15837  fi
15838  # Now setup the -D flags for building libjli.
15839  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15841    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15843    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15845    fi
15846  fi
15847
15848
15849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15851  else
15852      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15853  fi
15854
15855
15856  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15857  # Macosx is osx and x86_64 is x64
15858  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15859    OPENJDK_TARGET_OS_BUNDLE="osx"
15860  else
15861    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15862  fi
15863  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15864    OPENJDK_TARGET_CPU_BUNDLE="x64"
15865  else
15866    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15867  fi
15868  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15869
15870
15871
15872
15873  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15874    A_LP64="LP64:="
15875    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15876    # unpack200.exe
15877    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15878      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15879    fi
15880  fi
15881  LP64=$A_LP64
15882
15883
15884  if test "x$COMPILE_TYPE" = "xcross"; then
15885    # FIXME: ... or should this include reduced builds..?
15886    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15887  else
15888    DEFINE_CROSS_COMPILE_ARCH=""
15889  fi
15890
15891
15892  # Convert openjdk platform names to hotspot names
15893
15894  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15895  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896    HOTSPOT_TARGET_OS=bsd
15897  fi
15898
15899
15900  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15901  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15902    HOTSPOT_TARGET_OS_TYPE=posix
15903  fi
15904
15905
15906  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15907  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15908    HOTSPOT_TARGET_CPU=x86_32
15909  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15910    HOTSPOT_TARGET_CPU=sparc
15911  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15912    HOTSPOT_TARGET_CPU=ppc_64
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  fi
15916
15917
15918  # This is identical with OPENJDK_*, but define anyway for consistency.
15919  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15920
15921
15922  # Setup HOTSPOT_TARGET_CPU_DEFINE
15923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924    HOTSPOT_TARGET_CPU_DEFINE=IA32
15925  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15926    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15927  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15928    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15929  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15930    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15931  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935
15936  # The cpu defines below are for zero, we don't support them directly.
15937  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15938    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15941  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15942    HOTSPOT_TARGET_CPU_DEFINE=S390
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" != x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15947  fi
15948
15949
15950
15951
15952  # Also store the legacy naming of the cpu.
15953  # Ie i586 and amd64 instead of x86 and x86_64
15954  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY="i586"
15957  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    # On all platforms except MacOSX replace x86_64 with amd64.
15959    OPENJDK_BUILD_CPU_LEGACY="amd64"
15960  fi
15961
15962
15963  # And the second legacy naming of the cpu.
15964  # Ie i386 and amd64 instead of x86 and x86_64.
15965  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970  fi
15971
15972
15973  # This is the name of the cpu (but using i386 and amd64 instead of
15974  # x86 and x86_64, respectively), preceeded by a /, to be used when
15975  # locating libraries. On macosx, it's empty, though.
15976  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978    OPENJDK_BUILD_CPU_LIBDIR=""
15979  fi
15980
15981
15982  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985  OPENJDK_BUILD_CPU_ISADIR=""
15986  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991    fi
15992  fi
15993
15994
15995  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998    # On linux only, we replace x86 with i386.
15999    OPENJDK_BUILD_CPU_OSARCH="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_OSARCH="amd64"
16003  fi
16004
16005
16006  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    OPENJDK_BUILD_CPU_JLI="i386"
16009  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010    # On all platforms except macosx, we replace x86_64 with amd64.
16011    OPENJDK_BUILD_CPU_JLI="amd64"
16012  fi
16013  # Now setup the -D flags for building libjli.
16014  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020    fi
16021  fi
16022
16023
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026  else
16027      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028  fi
16029
16030
16031  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032  # Macosx is osx and x86_64 is x64
16033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034    OPENJDK_BUILD_OS_BUNDLE="osx"
16035  else
16036    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037  fi
16038  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039    OPENJDK_BUILD_CPU_BUNDLE="x64"
16040  else
16041    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042  fi
16043  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044
16045
16046
16047
16048  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049    A_LP64="LP64:="
16050    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051    # unpack200.exe
16052    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054    fi
16055  fi
16056  LP64=$A_LP64
16057
16058
16059  if test "x$COMPILE_TYPE" = "xcross"; then
16060    # FIXME: ... or should this include reduced builds..?
16061    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062  else
16063    DEFINE_CROSS_COMPILE_ARCH=""
16064  fi
16065
16066
16067  # Convert openjdk platform names to hotspot names
16068
16069  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071    HOTSPOT_BUILD_OS=bsd
16072  fi
16073
16074
16075  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077    HOTSPOT_BUILD_OS_TYPE=posix
16078  fi
16079
16080
16081  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083    HOTSPOT_BUILD_CPU=x86_32
16084  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085    HOTSPOT_BUILD_CPU=sparc
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  fi
16091
16092
16093  # This is identical with OPENJDK_*, but define anyway for consistency.
16094  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095
16096
16097  # Setup HOTSPOT_BUILD_CPU_DEFINE
16098  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099    HOTSPOT_BUILD_CPU_DEFINE=IA32
16100  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110
16111  # The cpu defines below are for zero, we don't support them directly.
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" != x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16122  fi
16123
16124
16125
16126
16127  # ZERO_ARCHDEF is used to enable architecture-specific code.
16128  # This is used in legacy hotspot build.
16129  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16130
16131
16132
16133
16134
16135# Continue setting up basic stuff. Most remaining code require fundamental tools.
16136
16137  # Save the current directory this script was started from
16138  CURDIR="$PWD"
16139
16140  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16141  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16142  # was not available at that time.
16143  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16144  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16145    ORIGINAL_PATH="$REWRITTEN_PATH"
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16147$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16148  fi
16149
16150  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16151    PATH_SEP=";"
16152
16153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16154  if test $SRC_ROOT_LENGTH -gt 100; then
16155    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16156  fi
16157
16158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16160$as_echo_n "checking cygwin release... " >&6; }
16161    CYGWIN_VERSION=`$UNAME -r`
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16163$as_echo "$CYGWIN_VERSION" >&6; }
16164    WINDOWS_ENV_VENDOR='cygwin'
16165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16166
16167    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16168    if test "x$CYGWIN_VERSION_OLD" != x; then
16169      { $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
16170$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;}
16171      as_fn_error $? "Cannot continue" "$LINENO" 5
16172    fi
16173    if test "x$CYGPATH" = x; then
16174      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16175    fi
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16179    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16186    if test "x$test_cygdrive_prefix" = x; then
16187      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16188    fi
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16191$as_echo_n "checking msys release... " >&6; }
16192    MSYS_VERSION=`$UNAME -r`
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16194$as_echo "$MSYS_VERSION" >&6; }
16195
16196    WINDOWS_ENV_VENDOR='msys'
16197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16198
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16203
16204  windows_path="$MSYS_ROOT_PATH"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    MSYS_ROOT_PATH="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    MSYS_ROOT_PATH="$unix_path"
16211  fi
16212
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16214$as_echo "$MSYS_ROOT_PATH" >&6; }
16215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16216  else
16217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16218  fi
16219
16220  # Test if windows or unix (cygwin/msys) find is first in path.
16221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16223  FIND_BINARY_OUTPUT=`find --version 2>&1`
16224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16226$as_echo "unix style" >&6; }
16227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16229$as_echo "Windows" >&6; }
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16232    { $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
16233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16234    as_fn_error $? "Cannot continue" "$LINENO" 5
16235  else
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16237$as_echo "unknown" >&6; }
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16240  fi
16241
16242  else
16243    PATH_SEP=":"
16244  fi
16245
16246
16247  # We get the top-level directory from the supporting wrappers.
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16249$as_echo_n "checking for top-level directory... " >&6; }
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16251$as_echo "$TOPDIR" >&6; }
16252
16253
16254  # Save the original version of TOPDIR for string comparisons
16255  ORIGINAL_TOPDIR="$TOPDIR"
16256
16257
16258  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16259
16260  # Only process if variable expands to non-empty
16261
16262  if test "x$CURDIR" != x; then
16263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16264
16265  # Input might be given as Windows format, start by converting to
16266  # unix format.
16267  path="$CURDIR"
16268  new_path=`$CYGPATH -u "$path"`
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16280$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16281    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16282  fi
16283
16284  # Call helper function which possibly converts this using DOS-style short mode.
16285  # If so, the updated path is stored in $new_path.
16286
16287  input_path="$new_path"
16288  # Check if we need to convert this using DOS-style short mode. If the path
16289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290  # take no chances and rewrite it.
16291  # Note: m4 eats our [], so we need to use [ and ] instead.
16292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293  if test "x$has_forbidden_chars" != x; then
16294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298      # Going to short mode and back again did indeed matter. Since short mode is
16299      # case insensitive, let's make it lowercase to improve readability.
16300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301      # Now convert it back to Unix-style (cygpath)
16302      input_path=`$CYGPATH -u "$shortmode_path"`
16303      new_path="$input_path"
16304    fi
16305  fi
16306
16307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308  if test "x$test_cygdrive_prefix" = x; then
16309    # As a simple fix, exclude /usr/bin since it's not a real path.
16310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312      # a path prefixed by /cygdrive for fixpath to work.
16313      new_path="$CYGWIN_ROOT_PATH$input_path"
16314    fi
16315  fi
16316
16317
16318  if test "x$path" != "x$new_path"; then
16319    CURDIR="$new_path"
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16321$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16322  fi
16323
16324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  path="$CURDIR"
16327  has_colon=`$ECHO $path | $GREP ^.:`
16328  new_path="$path"
16329  if test "x$has_colon" = x; then
16330    # Not in mixed or Windows style, start by that.
16331    new_path=`cmd //c echo $path`
16332  fi
16333
16334
16335  input_path="$new_path"
16336  # Check if we need to convert this using DOS-style short mode. If the path
16337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338  # take no chances and rewrite it.
16339  # Note: m4 eats our [], so we need to use [ and ] instead.
16340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341  if test "x$has_forbidden_chars" != x; then
16342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344  fi
16345
16346
16347  windows_path="$new_path"
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349    unix_path=`$CYGPATH -u "$windows_path"`
16350    new_path="$unix_path"
16351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353    new_path="$unix_path"
16354  fi
16355
16356  if test "x$path" != "x$new_path"; then
16357    CURDIR="$new_path"
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16359$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16360  fi
16361
16362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16364
16365    else
16366      # We're on a unix platform. Hooray! :)
16367      path="$CURDIR"
16368      has_space=`$ECHO "$path" | $GREP " "`
16369      if test "x$has_space" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16371$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16373      fi
16374
16375      # Use eval to expand a potential ~
16376      eval path="$path"
16377      if test ! -f "$path" && test ! -d "$path"; then
16378        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16379      fi
16380
16381      if test -d "$path"; then
16382        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16383      else
16384        dir="`$DIRNAME "$path"`"
16385        base="`$BASENAME "$path"`"
16386        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16387      fi
16388    fi
16389  fi
16390
16391
16392  # Only process if variable expands to non-empty
16393
16394  if test "x$TOPDIR" != x; then
16395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396
16397  # Input might be given as Windows format, start by converting to
16398  # unix format.
16399  path="$TOPDIR"
16400  new_path=`$CYGPATH -u "$path"`
16401
16402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16405  # "foo.exe" is OK but "foo" is an error.
16406  #
16407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16408  # It is also a way to make sure we got the proper file name for the real test later on.
16409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16410  if test "x$test_shortpath" = x; then
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16412$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16413    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16414  fi
16415
16416  # Call helper function which possibly converts this using DOS-style short mode.
16417  # If so, the updated path is stored in $new_path.
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16430      # Going to short mode and back again did indeed matter. Since short mode is
16431      # case insensitive, let's make it lowercase to improve readability.
16432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433      # Now convert it back to Unix-style (cygpath)
16434      input_path=`$CYGPATH -u "$shortmode_path"`
16435      new_path="$input_path"
16436    fi
16437  fi
16438
16439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16440  if test "x$test_cygdrive_prefix" = x; then
16441    # As a simple fix, exclude /usr/bin since it's not a real path.
16442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16444      # a path prefixed by /cygdrive for fixpath to work.
16445      new_path="$CYGWIN_ROOT_PATH$input_path"
16446    fi
16447  fi
16448
16449
16450  if test "x$path" != "x$new_path"; then
16451    TOPDIR="$new_path"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16453$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16454  fi
16455
16456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457
16458  path="$TOPDIR"
16459  has_colon=`$ECHO $path | $GREP ^.:`
16460  new_path="$path"
16461  if test "x$has_colon" = x; then
16462    # Not in mixed or Windows style, start by that.
16463    new_path=`cmd //c echo $path`
16464  fi
16465
16466
16467  input_path="$new_path"
16468  # Check if we need to convert this using DOS-style short mode. If the path
16469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16470  # take no chances and rewrite it.
16471  # Note: m4 eats our [], so we need to use [ and ] instead.
16472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16473  if test "x$has_forbidden_chars" != x; then
16474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16476  fi
16477
16478
16479  windows_path="$new_path"
16480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481    unix_path=`$CYGPATH -u "$windows_path"`
16482    new_path="$unix_path"
16483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485    new_path="$unix_path"
16486  fi
16487
16488  if test "x$path" != "x$new_path"; then
16489    TOPDIR="$new_path"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16491$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16492  fi
16493
16494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16496
16497    else
16498      # We're on a unix platform. Hooray! :)
16499      path="$TOPDIR"
16500      has_space=`$ECHO "$path" | $GREP " "`
16501      if test "x$has_space" != x; then
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16503$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16505      fi
16506
16507      # Use eval to expand a potential ~
16508      eval path="$path"
16509      if test ! -f "$path" && test ! -d "$path"; then
16510        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16511      fi
16512
16513      if test -d "$path"; then
16514        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16515      else
16516        dir="`$DIRNAME "$path"`"
16517        base="`$BASENAME "$path"`"
16518        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16519      fi
16520    fi
16521  fi
16522
16523  # SRC_ROOT is a traditional alias for TOPDIR.
16524  SRC_ROOT=$TOPDIR
16525
16526  # Calculate a canonical version of TOPDIR for string comparisons
16527  CANONICAL_TOPDIR=$TOPDIR
16528
16529  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16530    # Follow a chain of symbolic links. Use readlink
16531    # where it exists, else fall back to horribly
16532    # complicated shell code.
16533    if test "x$READLINK_TESTED" != yes; then
16534      # On MacOSX there is a readlink tool with a different
16535      # purpose than the GNU readlink tool. Check the found readlink.
16536      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16537      if test "x$ISGNU" = x; then
16538        # A readlink that we do not know how to use.
16539        # Are there other non-GNU readlinks out there?
16540        READLINK_TESTED=yes
16541        READLINK=
16542      fi
16543    fi
16544
16545    if test "x$READLINK" != x; then
16546      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16547    else
16548      # Save the current directory for restoring afterwards
16549      STARTDIR=$PWD
16550      COUNTER=0
16551      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16552      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16553      cd $sym_link_dir
16554      # Use -P flag to resolve symlinks in directories.
16555      cd `$THEPWDCMD -P`
16556      sym_link_dir=`$THEPWDCMD -P`
16557      # Resolve file symlinks
16558      while test $COUNTER -lt 20; do
16559        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16560        if test "x$ISLINK" == x; then
16561          # This is not a symbolic link! We are done!
16562          break
16563        fi
16564        # Again resolve directory symlinks since the target of the just found
16565        # link could be in a different directory
16566        cd `$DIRNAME $ISLINK`
16567        sym_link_dir=`$THEPWDCMD -P`
16568        sym_link_file=`$BASENAME $ISLINK`
16569        let COUNTER=COUNTER+1
16570      done
16571      cd $STARTDIR
16572      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16573    fi
16574  fi
16575
16576
16577
16578  # Locate the directory of this script.
16579  AUTOCONF_DIR=$TOPDIR/common/autoconf
16580
16581  # Setup username (for use in adhoc version strings etc)
16582  # Outer [ ] to quote m4.
16583   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16584
16585
16586
16587# Check if it's a pure open build or if custom sources are to be used.
16588
16589  # Check whether --enable-openjdk-only was given.
16590if test "${enable_openjdk_only+set}" = set; then :
16591  enableval=$enable_openjdk_only;
16592else
16593  enable_openjdk_only="no"
16594fi
16595
16596
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16598$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16600$as_echo "$enable_openjdk_only" >&6; }
16601  if test "x$enable_openjdk_only" = "xyes"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="true"
16603  elif test "x$enable_openjdk_only" = "xno"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="false"
16605  else
16606    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16607  fi
16608
16609  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16610  # the IncludeCustomExtension macro.
16611
16612
16613# Check whether --with-custom-make-dir was given.
16614if test "${with_custom_make_dir+set}" = set; then :
16615  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
16616$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16617fi
16618
16619
16620
16621
16622# These are needed to be able to create a configuration name (and thus the output directory)
16623
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16625$as_echo_n "checking which variant of the JDK to build... " >&6; }
16626
16627# Check whether --with-jdk-variant was given.
16628if test "${with_jdk_variant+set}" = set; then :
16629  withval=$with_jdk_variant;
16630fi
16631
16632
16633  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16634    JDK_VARIANT="normal"
16635  else
16636    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16637  fi
16638
16639
16640
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16642$as_echo "$JDK_VARIANT" >&6; }
16643
16644
16645  DEBUG_LEVEL="release"
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16647$as_echo_n "checking which debug level to use... " >&6; }
16648  # Check whether --enable-debug was given.
16649if test "${enable_debug+set}" = set; then :
16650  enableval=$enable_debug;
16651        ENABLE_DEBUG="${enableval}"
16652        DEBUG_LEVEL="fastdebug"
16653
16654else
16655  ENABLE_DEBUG="no"
16656fi
16657
16658
16659
16660# Check whether --with-debug-level was given.
16661if test "${with_debug_level+set}" = set; then :
16662  withval=$with_debug_level;
16663        DEBUG_LEVEL="${withval}"
16664        if test "x$ENABLE_DEBUG" = xyes; then
16665          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16666        fi
16667
16668fi
16669
16670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16671$as_echo "$DEBUG_LEVEL" >&6; }
16672
16673  if test "x$DEBUG_LEVEL" != xrelease && \
16674      test "x$DEBUG_LEVEL" != xoptimized && \
16675      test "x$DEBUG_LEVEL" != xfastdebug && \
16676      test "x$DEBUG_LEVEL" != xslowdebug; then
16677    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16678  fi
16679
16680  # Translate DEBUG_LEVEL to debug level used by Hotspot
16681  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16682  if test "x$DEBUG_LEVEL" = xrelease; then
16683    HOTSPOT_DEBUG_LEVEL="product"
16684  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16685    HOTSPOT_DEBUG_LEVEL="debug"
16686  fi
16687
16688  if test "x$DEBUG_LEVEL" = xoptimized; then
16689    # The debug level 'optimized' is a little special because it is currently only
16690    # applicable to the HotSpot build where it means to build a completely
16691    # optimized version of the VM without any debugging code (like for the
16692    # 'release' debug level which is called 'product' in the HotSpot build) but
16693    # with the exception that it can contain additional code which is otherwise
16694    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16695    # test new and/or experimental features which are not intended for customer
16696    # shipment. Because these new features need to be tested and benchmarked in
16697    # real world scenarios, we want to build the containing JDK at the 'release'
16698    # debug level.
16699    DEBUG_LEVEL="release"
16700  fi
16701
16702
16703
16704
16705
16706
16707# Check whether --with-jvm-variants was given.
16708if test "${with_jvm_variants+set}" = set; then :
16709  withval=$with_jvm_variants;
16710fi
16711
16712
16713  if test "x$with_jvm_variants" = x; then
16714    with_jvm_variants="server"
16715  fi
16716  JVM_VARIANTS_OPT="$with_jvm_variants"
16717
16718  # Has the user listed more than one variant?
16719  # Additional [] needed to keep m4 from mangling shell constructs.
16720  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16721    BUILDING_MULTIPLE_JVM_VARIANTS=true
16722  else
16723    BUILDING_MULTIPLE_JVM_VARIANTS=false
16724  fi
16725  # Replace the commas with AND for use in the build directory name.
16726  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16727
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16729$as_echo_n "checking which variants of the JVM to build... " >&6; }
16730  # JVM_VARIANTS is a space-separated list.
16731  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16732  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16734$as_echo "$JVM_VARIANTS" >&6; }
16735
16736  # Check that the selected variants are valid
16737
16738  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16739  # Notice that the original variant failes on SLES 10 and 11
16740  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if test "x$INVALID_VARIANTS" != x; then
16744    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16745$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16746    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16747  fi
16748
16749  # All "special" variants share the same output directory ("server")
16750  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16751  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16752  STACK=${JVM_VARIANTS// /$'\n'}
16753  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16755    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16756  fi
16757
16758
16759
16760
16761  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16762    # zero behaves as a platform and rewrites these values. This is really weird. :(
16763    # We are guaranteed that we do not build any other variants when building zero.
16764    HOTSPOT_TARGET_CPU=zero
16765    HOTSPOT_TARGET_CPU_ARCH=zero
16766  fi
16767
16768
16769# With basic setup done, call the custom early hook.
16770
16771
16772# Check if we have devkits, extra paths or sysroot set.
16773
16774
16775# Check whether --with-devkit was given.
16776if test "${with_devkit+set}" = set; then :
16777  withval=$with_devkit;
16778
16779  # Only process if variable expands to non-empty
16780
16781  if test "x$with_devkit" != x; then
16782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783
16784  # Input might be given as Windows format, start by converting to
16785  # unix format.
16786  path="$with_devkit"
16787  new_path=`$CYGPATH -u "$path"`
16788
16789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16792  # "foo.exe" is OK but "foo" is an error.
16793  #
16794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16795  # It is also a way to make sure we got the proper file name for the real test later on.
16796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16797  if test "x$test_shortpath" = x; then
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16799$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16800    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16801  fi
16802
16803  # Call helper function which possibly converts this using DOS-style short mode.
16804  # If so, the updated path is stored in $new_path.
16805
16806  input_path="$new_path"
16807  # Check if we need to convert this using DOS-style short mode. If the path
16808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809  # take no chances and rewrite it.
16810  # Note: m4 eats our [], so we need to use [ and ] instead.
16811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16812  if test "x$has_forbidden_chars" != x; then
16813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16817      # Going to short mode and back again did indeed matter. Since short mode is
16818      # case insensitive, let's make it lowercase to improve readability.
16819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16820      # Now convert it back to Unix-style (cygpath)
16821      input_path=`$CYGPATH -u "$shortmode_path"`
16822      new_path="$input_path"
16823    fi
16824  fi
16825
16826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16827  if test "x$test_cygdrive_prefix" = x; then
16828    # As a simple fix, exclude /usr/bin since it's not a real path.
16829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16831      # a path prefixed by /cygdrive for fixpath to work.
16832      new_path="$CYGWIN_ROOT_PATH$input_path"
16833    fi
16834  fi
16835
16836
16837  if test "x$path" != "x$new_path"; then
16838    with_devkit="$new_path"
16839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16840$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16841  fi
16842
16843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844
16845  path="$with_devkit"
16846  has_colon=`$ECHO $path | $GREP ^.:`
16847  new_path="$path"
16848  if test "x$has_colon" = x; then
16849    # Not in mixed or Windows style, start by that.
16850    new_path=`cmd //c echo $path`
16851  fi
16852
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863  fi
16864
16865
16866  windows_path="$new_path"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    new_path="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    new_path="$unix_path"
16873  fi
16874
16875  if test "x$path" != "x$new_path"; then
16876    with_devkit="$new_path"
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16878$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16879  fi
16880
16881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16883
16884    else
16885      # We're on a unix platform. Hooray! :)
16886      path="$with_devkit"
16887      has_space=`$ECHO "$path" | $GREP " "`
16888      if test "x$has_space" != x; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16890$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16892      fi
16893
16894      # Use eval to expand a potential ~
16895      eval path="$path"
16896      if test ! -f "$path" && test ! -d "$path"; then
16897        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16898      fi
16899
16900      if test -d "$path"; then
16901        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16902      else
16903        dir="`$DIRNAME "$path"`"
16904        base="`$BASENAME "$path"`"
16905        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16906      fi
16907    fi
16908  fi
16909
16910        DEVKIT_ROOT="$with_devkit"
16911        # Check for a meta data info file in the root of the devkit
16912        if test -f "$DEVKIT_ROOT/devkit.info"; then
16913          . $DEVKIT_ROOT/devkit.info
16914          # This potentially sets the following:
16915          # A descriptive name of the devkit
16916
16917  if test "x$DEVKIT_NAME" = x; then
16918    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16919  fi
16920
16921          # Corresponds to --with-extra-path
16922
16923  if test "x$DEVKIT_EXTRA_PATH" = x; then
16924    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16925  fi
16926
16927          # Corresponds to --with-toolchain-path
16928
16929  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16930    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16931  fi
16932
16933          # Corresponds to --with-sysroot
16934
16935  if test "x$DEVKIT_SYSROOT" = x; then
16936    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16937  fi
16938
16939
16940          # Identifies the Visual Studio version in the devkit
16941
16942  if test "x$DEVKIT_VS_VERSION" = x; then
16943    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16944  fi
16945
16946          # The Visual Studio include environment variable
16947
16948  if test "x$DEVKIT_VS_INCLUDE" = x; then
16949    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16950  fi
16951
16952          # The Visual Studio lib environment variable
16953
16954  if test "x$DEVKIT_VS_LIB" = x; then
16955    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16956  fi
16957
16958          # Corresponds to --with-msvcr-dll
16959
16960  if test "x$DEVKIT_MSVCR_DLL" = x; then
16961    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16962  fi
16963
16964          # Corresponds to --with-msvcp-dll
16965
16966  if test "x$DEVKIT_MSVCP_DLL" = x; then
16967    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16968  fi
16969
16970        fi
16971
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16973$as_echo_n "checking for devkit... " >&6; }
16974        if test "x$DEVKIT_NAME" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16977        else
16978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16979$as_echo "$DEVKIT_ROOT" >&6; }
16980        fi
16981
16982
16983  if test "x$DEVKIT_EXTRA_PATH" != x; then
16984    if test "x$EXTRA_PATH" = x; then
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16986    else
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16988    fi
16989  fi
16990
16991
16992        # Fallback default of just /bin if DEVKIT_PATH is not defined
16993        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16994          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16995        fi
16996
16997  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16998    if test "x$TOOLCHAIN_PATH" = x; then
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17000    else
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17002    fi
17003  fi
17004
17005
17006        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17007        # places for backwards compatiblity.
17008        if test "x$DEVKIT_SYSROOT" != x; then
17009          SYSROOT="$DEVKIT_SYSROOT"
17010        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17011          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17012        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17013          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17014        fi
17015
17016
17017fi
17018
17019
17020  # You can force the sysroot if the sysroot encoded into the compiler tools
17021  # is not correct.
17022
17023# Check whether --with-sys-root was given.
17024if test "${with_sys_root+set}" = set; then :
17025  withval=$with_sys_root; SYSROOT=$with_sys_root
17026
17027fi
17028
17029
17030
17031# Check whether --with-sysroot was given.
17032if test "${with_sysroot+set}" = set; then :
17033  withval=$with_sysroot; SYSROOT=$with_sysroot
17034
17035fi
17036
17037
17038
17039# Check whether --with-tools-dir was given.
17040if test "${with_tools_dir+set}" = set; then :
17041  withval=$with_tools_dir;
17042  if test "x$with_tools_dir" != x; then
17043    if test "x$TOOLCHAIN_PATH" = x; then
17044      TOOLCHAIN_PATH="$with_tools_dir"
17045    else
17046      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17047    fi
17048  fi
17049
17050
17051fi
17052
17053
17054
17055# Check whether --with-toolchain-path was given.
17056if test "${with_toolchain_path+set}" = set; then :
17057  withval=$with_toolchain_path;
17058  if test "x$with_toolchain_path" != x; then
17059    if test "x$TOOLCHAIN_PATH" = x; then
17060      TOOLCHAIN_PATH="$with_toolchain_path"
17061    else
17062      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17063    fi
17064  fi
17065
17066
17067fi
17068
17069
17070
17071# Check whether --with-extra-path was given.
17072if test "${with_extra_path+set}" = set; then :
17073  withval=$with_extra_path;
17074  if test "x$with_extra_path" != x; then
17075    if test "x$EXTRA_PATH" = x; then
17076      EXTRA_PATH="$with_extra_path"
17077    else
17078      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17079    fi
17080  fi
17081
17082
17083fi
17084
17085
17086  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17087    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17088    # If not, detect if Xcode is installed by running xcodebuild -version
17089    # if no Xcode installed, xcodebuild exits with 1
17090    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17091    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17092      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17093      # fall back on the stub binary in /usr/bin/xcodebuild
17094      # Extract the first word of "xcodebuild", so it can be a program name with args.
17095set dummy xcodebuild; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_path_XCODEBUILD+:} false; then :
17099  $as_echo_n "(cached) " >&6
17100else
17101  case $XCODEBUILD in
17102  [\\/]* | ?:[\\/]*)
17103  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17104  ;;
17105  *)
17106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $TOOLCHAIN_PATH
17108do
17109  IFS=$as_save_IFS
17110  test -z "$as_dir" && as_dir=.
17111    for ac_exec_ext in '' $ac_executable_extensions; do
17112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115    break 2
17116  fi
17117done
17118  done
17119IFS=$as_save_IFS
17120
17121  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17122  ;;
17123esac
17124fi
17125XCODEBUILD=$ac_cv_path_XCODEBUILD
17126if test -n "$XCODEBUILD"; then
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17128$as_echo "$XCODEBUILD" >&6; }
17129else
17130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131$as_echo "no" >&6; }
17132fi
17133
17134
17135    else
17136      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17137      # when only the command line tools are installed there are no SDKs, so headers
17138      # are copied into the system frameworks
17139      XCODEBUILD=
17140
17141    fi
17142
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17144$as_echo_n "checking for sdk name... " >&6; }
17145
17146# Check whether --with-sdk-name was given.
17147if test "${with_sdk_name+set}" = set; then :
17148  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17149
17150fi
17151
17152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17153$as_echo "$SDKNAME" >&6; }
17154
17155    # if toolchain path is specified then don't rely on system headers, they may not compile
17156    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17157    test -z "$TOOLCHAIN_PATH" && \
17158      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17159
17160    if test -z "$SYSROOT"; then
17161      if test -n "$XCODEBUILD"; then
17162        # if we don't have system headers, use default SDK name (last resort)
17163        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164          SDKNAME=${SDKNAME:-macosx}
17165        fi
17166
17167        if test -n "$SDKNAME"; then
17168          # Call xcodebuild to determine SYSROOT
17169          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17170        fi
17171      else
17172        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17173          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
17174        fi
17175      fi
17176    else
17177      # warn user if --with-sdk-name was also set
17178      if test -n "$with_sdk_name"; then
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17180$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17181      fi
17182    fi
17183
17184    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17185      # If no system framework headers, then SYSROOT must be set, or we won't build
17186      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
17187    fi
17188
17189    # Perform a basic sanity test
17190    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17191      if test -z "$SYSROOT"; then
17192        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
17193      else
17194        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17195      fi
17196    fi
17197
17198    # set SDKROOT too, Xcode tools will pick it up
17199    SDKROOT=$SYSROOT
17200
17201  fi
17202
17203  # Prepend the extra path to the global path
17204
17205  if test "x$EXTRA_PATH" != x; then
17206    if test "x$PATH" = x; then
17207      PATH="$EXTRA_PATH"
17208    else
17209      PATH="$EXTRA_PATH:$PATH"
17210    fi
17211  fi
17212
17213
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17215$as_echo_n "checking for sysroot... " >&6; }
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17217$as_echo "$SYSROOT" >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17219$as_echo_n "checking for toolchain path... " >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17221$as_echo "$TOOLCHAIN_PATH" >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17223$as_echo_n "checking for extra path... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17225$as_echo "$EXTRA_PATH" >&6; }
17226
17227
17228# To properly create a configuration name, we need to have the OpenJDK target
17229# and options (variants and debug level) parsed.
17230
17231
17232
17233# Check whether --with-conf-name was given.
17234if test "${with_conf_name+set}" = set; then :
17235  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17236fi
17237
17238
17239  # Test from where we are running configure, in or outside of src root.
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17241$as_echo_n "checking where to store configuration... " >&6; }
17242  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17243      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17244      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17245    # We are running configure from the src root.
17246    # Create a default ./build/target-variant-debuglevel output root.
17247    if test "x${CONF_NAME}" = x; then
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17249$as_echo "in default location" >&6; }
17250      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17253$as_echo "in build directory with custom name" >&6; }
17254    fi
17255    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17256    $MKDIR -p "$OUTPUT_ROOT"
17257    if test ! -d "$OUTPUT_ROOT"; then
17258      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17259    fi
17260  else
17261    # We are running configure from outside of the src dir.
17262    # Then use the current directory as output dir!
17263    # If configuration is situated in normal build directory, just use the build
17264    # directory name as configuration name, otherwise use the complete path.
17265    if test "x${CONF_NAME}" = x; then
17266      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17267    fi
17268    OUTPUT_ROOT="$CURDIR"
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17270$as_echo "in current directory" >&6; }
17271
17272    # WARNING: This might be a bad thing to do. You need to be sure you want to
17273    # have a configuration in this directory. Do some sanity checks!
17274
17275    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17276      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17277      # other files
17278      files_present=`$LS $OUTPUT_ROOT`
17279      # Configure has already touched config.log and confdefs.h in the current dir when this check
17280      # is performed.
17281      filtered_files=`$ECHO "$files_present" \
17282          | $SED -e 's/config.log//g' \
17283              -e 's/configure.log//g' \
17284              -e 's/confdefs.h//g' \
17285              -e 's/ //g' \
17286          | $TR -d '\n'`
17287      if test "x$filtered_files" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17289$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17291$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17293$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17295$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17297$as_echo "$as_me: seriously mess up just about everything." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17299$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17301$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17302        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17303      fi
17304    fi
17305  fi
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17307$as_echo_n "checking what configuration name to use... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17309$as_echo "$CONF_NAME" >&6; }
17310
17311
17312  # Only process if variable expands to non-empty
17313
17314  if test "x$OUTPUT_ROOT" != x; then
17315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316
17317  # Input might be given as Windows format, start by converting to
17318  # unix format.
17319  path="$OUTPUT_ROOT"
17320  new_path=`$CYGPATH -u "$path"`
17321
17322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325  # "foo.exe" is OK but "foo" is an error.
17326  #
17327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328  # It is also a way to make sure we got the proper file name for the real test later on.
17329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330  if test "x$test_shortpath" = x; then
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17332$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17333    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17334  fi
17335
17336  # Call helper function which possibly converts this using DOS-style short mode.
17337  # If so, the updated path is stored in $new_path.
17338
17339  input_path="$new_path"
17340  # Check if we need to convert this using DOS-style short mode. If the path
17341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342  # take no chances and rewrite it.
17343  # Note: m4 eats our [], so we need to use [ and ] instead.
17344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345  if test "x$has_forbidden_chars" != x; then
17346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350      # Going to short mode and back again did indeed matter. Since short mode is
17351      # case insensitive, let's make it lowercase to improve readability.
17352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353      # Now convert it back to Unix-style (cygpath)
17354      input_path=`$CYGPATH -u "$shortmode_path"`
17355      new_path="$input_path"
17356    fi
17357  fi
17358
17359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360  if test "x$test_cygdrive_prefix" = x; then
17361    # As a simple fix, exclude /usr/bin since it's not a real path.
17362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364      # a path prefixed by /cygdrive for fixpath to work.
17365      new_path="$CYGWIN_ROOT_PATH$input_path"
17366    fi
17367  fi
17368
17369
17370  if test "x$path" != "x$new_path"; then
17371    OUTPUT_ROOT="$new_path"
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17373$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17374  fi
17375
17376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377
17378  path="$OUTPUT_ROOT"
17379  has_colon=`$ECHO $path | $GREP ^.:`
17380  new_path="$path"
17381  if test "x$has_colon" = x; then
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $path`
17384  fi
17385
17386
17387  input_path="$new_path"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396  fi
17397
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408  if test "x$path" != "x$new_path"; then
17409    OUTPUT_ROOT="$new_path"
17410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17411$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17412  fi
17413
17414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416
17417    else
17418      # We're on a unix platform. Hooray! :)
17419      path="$OUTPUT_ROOT"
17420      has_space=`$ECHO "$path" | $GREP " "`
17421      if test "x$has_space" != x; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17423$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17425      fi
17426
17427      # Use eval to expand a potential ~
17428      eval path="$path"
17429      if test ! -f "$path" && test ! -d "$path"; then
17430        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17431      fi
17432
17433      if test -d "$path"; then
17434        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17435      else
17436        dir="`$DIRNAME "$path"`"
17437        base="`$BASENAME "$path"`"
17438        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17439      fi
17440    fi
17441  fi
17442
17443
17444  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17445  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17446
17447  SPEC=$OUTPUT_ROOT/spec.gmk
17448
17449  CONF_NAME=$CONF_NAME
17450
17451  OUTPUT_ROOT=$OUTPUT_ROOT
17452
17453
17454
17455  # The spec.gmk file contains all variables for the make system.
17456  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17457
17458  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17460
17461  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17462  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17463
17464  # The compare.sh is used to compare the build output to other builds.
17465  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17466
17467  # The generated Makefile knows where the spec.gmk is and where the source is.
17468  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17469  # which will look for generated configurations
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17471
17472
17473
17474# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17475
17476  for ac_prog in apt-get yum port pkgutil pkgadd
17477do
17478  # Extract the first word of "$ac_prog", so it can be a program name with args.
17479set dummy $ac_prog; ac_word=$2
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481$as_echo_n "checking for $ac_word... " >&6; }
17482if ${ac_cv_prog_PKGHANDLER+:} false; then :
17483  $as_echo_n "(cached) " >&6
17484else
17485  if test -n "$PKGHANDLER"; then
17486  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17487else
17488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_exec_ext in '' $ac_executable_extensions; do
17494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495    ac_cv_prog_PKGHANDLER="$ac_prog"
17496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497    break 2
17498  fi
17499done
17500  done
17501IFS=$as_save_IFS
17502
17503fi
17504fi
17505PKGHANDLER=$ac_cv_prog_PKGHANDLER
17506if test -n "$PKGHANDLER"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17508$as_echo "$PKGHANDLER" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515  test -n "$PKGHANDLER" && break
17516done
17517
17518
17519
17520# Setup tools that requires more complex handling, or that is not needed by the configure script.
17521
17522
17523
17524  # Publish this variable in the help.
17525
17526
17527  if [ -z "${MAKE+x}" ]; then
17528    # The variable is not set by user, try to locate tool using the code snippet
17529
17530    # Try our hardest to locate a correct version of GNU make
17531    for ac_prog in gmake
17532do
17533  # Extract the first word of "$ac_prog", so it can be a program name with args.
17534set dummy $ac_prog; ac_word=$2
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17536$as_echo_n "checking for $ac_word... " >&6; }
17537if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17538  $as_echo_n "(cached) " >&6
17539else
17540  case $CHECK_GMAKE in
17541  [\\/]* | ?:[\\/]*)
17542  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17543  ;;
17544  *)
17545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17546for as_dir in $PATH
17547do
17548  IFS=$as_save_IFS
17549  test -z "$as_dir" && as_dir=.
17550    for ac_exec_ext in '' $ac_executable_extensions; do
17551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17552    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17554    break 2
17555  fi
17556done
17557  done
17558IFS=$as_save_IFS
17559
17560  ;;
17561esac
17562fi
17563CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17564if test -n "$CHECK_GMAKE"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17566$as_echo "$CHECK_GMAKE" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$CHECK_GMAKE" && break
17574done
17575
17576
17577  MAKE_CANDIDATE=""$CHECK_GMAKE""
17578  DESCRIPTION="gmake in PATH"
17579
17580  # On Cygwin, we require a newer version of make than on other platforms
17581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582    MAKE_VERSION_EXPR="-e 4\."
17583    MAKE_REQUIRED_VERSION="4.0"
17584   else
17585    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17586    MAKE_REQUIRED_VERSION="3.81"
17587  fi
17588
17589  if test "x$MAKE_CANDIDATE" != x; then
17590    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17591$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17592    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17593    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17594    if test "x$IS_GNU_MAKE" = x; then
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17596$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17597    else
17598      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17599      if test "x$IS_MODERN_MAKE" = x; then
17600        { $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
17601$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;}
17602      else
17603        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17604          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605            MAKE_EXPECTED_ENV='cygwin'
17606          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607            MAKE_EXPECTED_ENV='msys'
17608          else
17609            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17610          fi
17611          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17612          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17613        else
17614          # Not relevant for non-Windows
17615          IS_MAKE_CORRECT_ENV=true
17616        fi
17617        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17618          { $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
17619$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;}
17620        else
17621          FOUND_MAKE=$MAKE_CANDIDATE
17622
17623  # Only process if variable expands to non-empty
17624
17625  if test "x$FOUND_MAKE" != x; then
17626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627
17628  # First separate the path from the arguments. This will split at the first
17629  # space.
17630  complete="$FOUND_MAKE"
17631  path="${complete%% *}"
17632  tmp="$complete EOL"
17633  arguments="${tmp#* }"
17634
17635  # Input might be given as Windows format, start by converting to
17636  # unix format.
17637  new_path=`$CYGPATH -u "$path"`
17638
17639  # Now try to locate executable using which
17640  new_path=`$WHICH "$new_path" 2> /dev/null`
17641  # bat and cmd files are not always considered executable in cygwin causing which
17642  # to not find them
17643  if test "x$new_path" = x \
17644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17646    new_path=`$CYGPATH -u "$path"`
17647  fi
17648  if test "x$new_path" = x; then
17649    # Oops. Which didn't find the executable.
17650    # The splitting of arguments from the executable at a space might have been incorrect,
17651    # since paths with space are more likely in Windows. Give it another try with the whole
17652    # argument.
17653    path="$complete"
17654    arguments="EOL"
17655    new_path=`$CYGPATH -u "$path"`
17656    new_path=`$WHICH "$new_path" 2> /dev/null`
17657    # bat and cmd files are not always considered executable in cygwin causing which
17658    # to not find them
17659    if test "x$new_path" = x \
17660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662      new_path=`$CYGPATH -u "$path"`
17663    fi
17664    if test "x$new_path" = x; then
17665      # It's still not found. Now this is an unrecoverable error.
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668      has_space=`$ECHO "$complete" | $GREP " "`
17669      if test "x$has_space" != x; then
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672      fi
17673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674    fi
17675  fi
17676
17677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17680  # "foo.exe" is OK but "foo" is an error.
17681  #
17682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17683  # It is also a way to make sure we got the proper file name for the real test later on.
17684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17685  if test "x$test_shortpath" = x; then
17686    # Short path failed, file does not exist as specified.
17687    # Try adding .exe or .cmd
17688    if test -f "${new_path}.exe"; then
17689      input_to_shortpath="${new_path}.exe"
17690    elif test -f "${new_path}.cmd"; then
17691      input_to_shortpath="${new_path}.cmd"
17692    else
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698    fi
17699  else
17700    input_to_shortpath="$new_path"
17701  fi
17702
17703  # Call helper function which possibly converts this using DOS-style short mode.
17704  # If so, the updated path is stored in $new_path.
17705  new_path="$input_to_shortpath"
17706
17707  input_path="$input_to_shortpath"
17708  # Check if we need to convert this using DOS-style short mode. If the path
17709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17710  # take no chances and rewrite it.
17711  # Note: m4 eats our [], so we need to use [ and ] instead.
17712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17713  if test "x$has_forbidden_chars" != x; then
17714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17718      # Going to short mode and back again did indeed matter. Since short mode is
17719      # case insensitive, let's make it lowercase to improve readability.
17720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721      # Now convert it back to Unix-style (cygpath)
17722      input_path=`$CYGPATH -u "$shortmode_path"`
17723      new_path="$input_path"
17724    fi
17725  fi
17726
17727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17728  if test "x$test_cygdrive_prefix" = x; then
17729    # As a simple fix, exclude /usr/bin since it's not a real path.
17730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17732      # a path prefixed by /cygdrive for fixpath to work.
17733      new_path="$CYGWIN_ROOT_PATH$input_path"
17734    fi
17735  fi
17736
17737  # remove trailing .exe if any
17738  new_path="${new_path/%.exe/}"
17739
17740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741
17742  # First separate the path from the arguments. This will split at the first
17743  # space.
17744  complete="$FOUND_MAKE"
17745  path="${complete%% *}"
17746  tmp="$complete EOL"
17747  arguments="${tmp#* }"
17748
17749  # Input might be given as Windows format, start by converting to
17750  # unix format.
17751  new_path="$path"
17752
17753  windows_path="$new_path"
17754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17755    unix_path=`$CYGPATH -u "$windows_path"`
17756    new_path="$unix_path"
17757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17759    new_path="$unix_path"
17760  fi
17761
17762
17763  # Now try to locate executable using which
17764  new_path=`$WHICH "$new_path" 2> /dev/null`
17765
17766  if test "x$new_path" = x; then
17767    # Oops. Which didn't find the executable.
17768    # The splitting of arguments from the executable at a space might have been incorrect,
17769    # since paths with space are more likely in Windows. Give it another try with the whole
17770    # argument.
17771    path="$complete"
17772    arguments="EOL"
17773    new_path="$path"
17774
17775  windows_path="$new_path"
17776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777    unix_path=`$CYGPATH -u "$windows_path"`
17778    new_path="$unix_path"
17779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781    new_path="$unix_path"
17782  fi
17783
17784
17785    new_path=`$WHICH "$new_path" 2> /dev/null`
17786    # bat and cmd files are not always considered executable in MSYS causing which
17787    # to not find them
17788    if test "x$new_path" = x \
17789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791      new_path="$path"
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    fi
17803
17804    if test "x$new_path" = x; then
17805      # It's still not found. Now this is an unrecoverable error.
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17808      has_space=`$ECHO "$complete" | $GREP " "`
17809      if test "x$has_space" != x; then
17810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17812      fi
17813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17814    fi
17815  fi
17816
17817  # Now new_path has a complete unix path to the binary
17818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17819    # Keep paths in /bin as-is, but remove trailing .exe if any
17820    new_path="${new_path/%.exe/}"
17821    # Do not save /bin paths to all_fixpath_prefixes!
17822  else
17823    # Not in mixed or Windows style, start by that.
17824    new_path=`cmd //c echo $new_path`
17825
17826  input_path="$new_path"
17827  # Check if we need to convert this using DOS-style short mode. If the path
17828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17829  # take no chances and rewrite it.
17830  # Note: m4 eats our [], so we need to use [ and ] instead.
17831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17832  if test "x$has_forbidden_chars" != x; then
17833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835  fi
17836
17837    # Output is in $new_path
17838
17839  windows_path="$new_path"
17840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841    unix_path=`$CYGPATH -u "$windows_path"`
17842    new_path="$unix_path"
17843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17845    new_path="$unix_path"
17846  fi
17847
17848    # remove trailing .exe if any
17849    new_path="${new_path/%.exe/}"
17850
17851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17853  fi
17854
17855    else
17856      # We're on a unix platform. Hooray! :)
17857      # First separate the path from the arguments. This will split at the first
17858      # space.
17859      complete="$FOUND_MAKE"
17860      path="${complete%% *}"
17861      tmp="$complete EOL"
17862      arguments="${tmp#* }"
17863
17864      # Cannot rely on the command "which" here since it doesn't always work.
17865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17866      if test -z "$is_absolute_path"; then
17867        # Path to executable is not absolute. Find it.
17868        IFS_save="$IFS"
17869        IFS=:
17870        for p in $PATH; do
17871          if test -f "$p/$path" && test -x "$p/$path"; then
17872            new_path="$p/$path"
17873            break
17874          fi
17875        done
17876        IFS="$IFS_save"
17877      else
17878        # This is an absolute path, we can use it without further modifications.
17879        new_path="$path"
17880      fi
17881
17882      if test "x$new_path" = x; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17885        has_space=`$ECHO "$complete" | $GREP " "`
17886        if test "x$has_space" != x; then
17887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889        fi
17890        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17891      fi
17892    fi
17893
17894    # Now join together the path and the arguments once again
17895    if test "x$arguments" != xEOL; then
17896      new_complete="$new_path ${arguments% *}"
17897    else
17898      new_complete="$new_path"
17899    fi
17900
17901    if test "x$complete" != "x$new_complete"; then
17902      FOUND_MAKE="$new_complete"
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17904$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17905    fi
17906  fi
17907
17908        fi
17909      fi
17910    fi
17911  fi
17912
17913
17914    if test "x$FOUND_MAKE" = x; then
17915      for ac_prog in make
17916do
17917  # Extract the first word of "$ac_prog", so it can be a program name with args.
17918set dummy $ac_prog; ac_word=$2
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920$as_echo_n "checking for $ac_word... " >&6; }
17921if ${ac_cv_path_CHECK_MAKE+:} false; then :
17922  $as_echo_n "(cached) " >&6
17923else
17924  case $CHECK_MAKE in
17925  [\\/]* | ?:[\\/]*)
17926  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17927  ;;
17928  *)
17929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930for as_dir in $PATH
17931do
17932  IFS=$as_save_IFS
17933  test -z "$as_dir" && as_dir=.
17934    for ac_exec_ext in '' $ac_executable_extensions; do
17935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17936    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938    break 2
17939  fi
17940done
17941  done
17942IFS=$as_save_IFS
17943
17944  ;;
17945esac
17946fi
17947CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17948if test -n "$CHECK_MAKE"; then
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17950$as_echo "$CHECK_MAKE" >&6; }
17951else
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953$as_echo "no" >&6; }
17954fi
17955
17956
17957  test -n "$CHECK_MAKE" && break
17958done
17959
17960
17961  MAKE_CANDIDATE=""$CHECK_MAKE""
17962  DESCRIPTION="make in PATH"
17963
17964  # On Cygwin, we require a newer version of make than on other platforms
17965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966    MAKE_VERSION_EXPR="-e 4\."
17967    MAKE_REQUIRED_VERSION="4.0"
17968   else
17969    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17970    MAKE_REQUIRED_VERSION="3.81"
17971  fi
17972
17973  if test "x$MAKE_CANDIDATE" != x; then
17974    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17975$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17976    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17977    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17978    if test "x$IS_GNU_MAKE" = x; then
17979      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17980$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17981    else
17982      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17983      if test "x$IS_MODERN_MAKE" = x; then
17984        { $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
17985$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;}
17986      else
17987        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17988          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989            MAKE_EXPECTED_ENV='cygwin'
17990          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991            MAKE_EXPECTED_ENV='msys'
17992          else
17993            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17994          fi
17995          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17996          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17997        else
17998          # Not relevant for non-Windows
17999          IS_MAKE_CORRECT_ENV=true
18000        fi
18001        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18002          { $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
18003$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;}
18004        else
18005          FOUND_MAKE=$MAKE_CANDIDATE
18006
18007  # Only process if variable expands to non-empty
18008
18009  if test "x$FOUND_MAKE" != x; then
18010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18011
18012  # First separate the path from the arguments. This will split at the first
18013  # space.
18014  complete="$FOUND_MAKE"
18015  path="${complete%% *}"
18016  tmp="$complete EOL"
18017  arguments="${tmp#* }"
18018
18019  # Input might be given as Windows format, start by converting to
18020  # unix format.
18021  new_path=`$CYGPATH -u "$path"`
18022
18023  # Now try to locate executable using which
18024  new_path=`$WHICH "$new_path" 2> /dev/null`
18025  # bat and cmd files are not always considered executable in cygwin causing which
18026  # to not find them
18027  if test "x$new_path" = x \
18028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18030    new_path=`$CYGPATH -u "$path"`
18031  fi
18032  if test "x$new_path" = x; then
18033    # Oops. Which didn't find the executable.
18034    # The splitting of arguments from the executable at a space might have been incorrect,
18035    # since paths with space are more likely in Windows. Give it another try with the whole
18036    # argument.
18037    path="$complete"
18038    arguments="EOL"
18039    new_path=`$CYGPATH -u "$path"`
18040    new_path=`$WHICH "$new_path" 2> /dev/null`
18041    # bat and cmd files are not always considered executable in cygwin causing which
18042    # to not find them
18043    if test "x$new_path" = x \
18044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046      new_path=`$CYGPATH -u "$path"`
18047    fi
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18064  # "foo.exe" is OK but "foo" is an error.
18065  #
18066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18067  # It is also a way to make sure we got the proper file name for the real test later on.
18068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18069  if test "x$test_shortpath" = x; then
18070    # Short path failed, file does not exist as specified.
18071    # Try adding .exe or .cmd
18072    if test -f "${new_path}.exe"; then
18073      input_to_shortpath="${new_path}.exe"
18074    elif test -f "${new_path}.cmd"; then
18075      input_to_shortpath="${new_path}.cmd"
18076    else
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082    fi
18083  else
18084    input_to_shortpath="$new_path"
18085  fi
18086
18087  # Call helper function which possibly converts this using DOS-style short mode.
18088  # If so, the updated path is stored in $new_path.
18089  new_path="$input_to_shortpath"
18090
18091  input_path="$input_to_shortpath"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18102      # Going to short mode and back again did indeed matter. Since short mode is
18103      # case insensitive, let's make it lowercase to improve readability.
18104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105      # Now convert it back to Unix-style (cygpath)
18106      input_path=`$CYGPATH -u "$shortmode_path"`
18107      new_path="$input_path"
18108    fi
18109  fi
18110
18111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18112  if test "x$test_cygdrive_prefix" = x; then
18113    # As a simple fix, exclude /usr/bin since it's not a real path.
18114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18116      # a path prefixed by /cygdrive for fixpath to work.
18117      new_path="$CYGWIN_ROOT_PATH$input_path"
18118    fi
18119  fi
18120
18121  # remove trailing .exe if any
18122  new_path="${new_path/%.exe/}"
18123
18124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18125
18126  # First separate the path from the arguments. This will split at the first
18127  # space.
18128  complete="$FOUND_MAKE"
18129  path="${complete%% *}"
18130  tmp="$complete EOL"
18131  arguments="${tmp#* }"
18132
18133  # Input might be given as Windows format, start by converting to
18134  # unix format.
18135  new_path="$path"
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146
18147  # Now try to locate executable using which
18148  new_path=`$WHICH "$new_path" 2> /dev/null`
18149
18150  if test "x$new_path" = x; then
18151    # Oops. Which didn't find the executable.
18152    # The splitting of arguments from the executable at a space might have been incorrect,
18153    # since paths with space are more likely in Windows. Give it another try with the whole
18154    # argument.
18155    path="$complete"
18156    arguments="EOL"
18157    new_path="$path"
18158
18159  windows_path="$new_path"
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161    unix_path=`$CYGPATH -u "$windows_path"`
18162    new_path="$unix_path"
18163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165    new_path="$unix_path"
18166  fi
18167
18168
18169    new_path=`$WHICH "$new_path" 2> /dev/null`
18170    # bat and cmd files are not always considered executable in MSYS causing which
18171    # to not find them
18172    if test "x$new_path" = x \
18173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18175      new_path="$path"
18176
18177  windows_path="$new_path"
18178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179    unix_path=`$CYGPATH -u "$windows_path"`
18180    new_path="$unix_path"
18181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183    new_path="$unix_path"
18184  fi
18185
18186    fi
18187
18188    if test "x$new_path" = x; then
18189      # It's still not found. Now this is an unrecoverable error.
18190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18192      has_space=`$ECHO "$complete" | $GREP " "`
18193      if test "x$has_space" != x; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18196      fi
18197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18198    fi
18199  fi
18200
18201  # Now new_path has a complete unix path to the binary
18202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18203    # Keep paths in /bin as-is, but remove trailing .exe if any
18204    new_path="${new_path/%.exe/}"
18205    # Do not save /bin paths to all_fixpath_prefixes!
18206  else
18207    # Not in mixed or Windows style, start by that.
18208    new_path=`cmd //c echo $new_path`
18209
18210  input_path="$new_path"
18211  # Check if we need to convert this using DOS-style short mode. If the path
18212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18213  # take no chances and rewrite it.
18214  # Note: m4 eats our [], so we need to use [ and ] instead.
18215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18216  if test "x$has_forbidden_chars" != x; then
18217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18219  fi
18220
18221    # Output is in $new_path
18222
18223  windows_path="$new_path"
18224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225    unix_path=`$CYGPATH -u "$windows_path"`
18226    new_path="$unix_path"
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18229    new_path="$unix_path"
18230  fi
18231
18232    # remove trailing .exe if any
18233    new_path="${new_path/%.exe/}"
18234
18235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18237  fi
18238
18239    else
18240      # We're on a unix platform. Hooray! :)
18241      # First separate the path from the arguments. This will split at the first
18242      # space.
18243      complete="$FOUND_MAKE"
18244      path="${complete%% *}"
18245      tmp="$complete EOL"
18246      arguments="${tmp#* }"
18247
18248      # Cannot rely on the command "which" here since it doesn't always work.
18249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18250      if test -z "$is_absolute_path"; then
18251        # Path to executable is not absolute. Find it.
18252        IFS_save="$IFS"
18253        IFS=:
18254        for p in $PATH; do
18255          if test -f "$p/$path" && test -x "$p/$path"; then
18256            new_path="$p/$path"
18257            break
18258          fi
18259        done
18260        IFS="$IFS_save"
18261      else
18262        # This is an absolute path, we can use it without further modifications.
18263        new_path="$path"
18264      fi
18265
18266      if test "x$new_path" = x; then
18267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18269        has_space=`$ECHO "$complete" | $GREP " "`
18270        if test "x$has_space" != x; then
18271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18273        fi
18274        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18275      fi
18276    fi
18277
18278    # Now join together the path and the arguments once again
18279    if test "x$arguments" != xEOL; then
18280      new_complete="$new_path ${arguments% *}"
18281    else
18282      new_complete="$new_path"
18283    fi
18284
18285    if test "x$complete" != "x$new_complete"; then
18286      FOUND_MAKE="$new_complete"
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18288$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18289    fi
18290  fi
18291
18292        fi
18293      fi
18294    fi
18295  fi
18296
18297    fi
18298
18299    if test "x$FOUND_MAKE" = x; then
18300      if test "x$TOOLCHAIN_PATH" != x; then
18301        # We have a toolchain path, check that as well before giving up.
18302        OLD_PATH=$PATH
18303        PATH=$TOOLCHAIN_PATH:$PATH
18304        for ac_prog in gmake
18305do
18306  # Extract the first word of "$ac_prog", so it can be a program name with args.
18307set dummy $ac_prog; ac_word=$2
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309$as_echo_n "checking for $ac_word... " >&6; }
18310if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  case $CHECK_TOOLSDIR_GMAKE in
18314  [\\/]* | ?:[\\/]*)
18315  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18316  ;;
18317  *)
18318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319for as_dir in $PATH
18320do
18321  IFS=$as_save_IFS
18322  test -z "$as_dir" && as_dir=.
18323    for ac_exec_ext in '' $ac_executable_extensions; do
18324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18325    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327    break 2
18328  fi
18329done
18330  done
18331IFS=$as_save_IFS
18332
18333  ;;
18334esac
18335fi
18336CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18337if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18339$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18347done
18348
18349
18350  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18351  DESCRIPTION="gmake in tools-dir"
18352
18353  # On Cygwin, we require a newer version of make than on other platforms
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355    MAKE_VERSION_EXPR="-e 4\."
18356    MAKE_REQUIRED_VERSION="4.0"
18357   else
18358    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18359    MAKE_REQUIRED_VERSION="3.81"
18360  fi
18361
18362  if test "x$MAKE_CANDIDATE" != x; then
18363    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18364$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18365    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18366    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18367    if test "x$IS_GNU_MAKE" = x; then
18368      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18369$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18370    else
18371      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18372      if test "x$IS_MODERN_MAKE" = x; then
18373        { $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
18374$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;}
18375      else
18376        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18377          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378            MAKE_EXPECTED_ENV='cygwin'
18379          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380            MAKE_EXPECTED_ENV='msys'
18381          else
18382            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18383          fi
18384          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18385          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18386        else
18387          # Not relevant for non-Windows
18388          IS_MAKE_CORRECT_ENV=true
18389        fi
18390        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18391          { $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
18392$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;}
18393        else
18394          FOUND_MAKE=$MAKE_CANDIDATE
18395
18396  # Only process if variable expands to non-empty
18397
18398  if test "x$FOUND_MAKE" != x; then
18399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400
18401  # First separate the path from the arguments. This will split at the first
18402  # space.
18403  complete="$FOUND_MAKE"
18404  path="${complete%% *}"
18405  tmp="$complete EOL"
18406  arguments="${tmp#* }"
18407
18408  # Input might be given as Windows format, start by converting to
18409  # unix format.
18410  new_path=`$CYGPATH -u "$path"`
18411
18412  # Now try to locate executable using which
18413  new_path=`$WHICH "$new_path" 2> /dev/null`
18414  # bat and cmd files are not always considered executable in cygwin causing which
18415  # to not find them
18416  if test "x$new_path" = x \
18417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419    new_path=`$CYGPATH -u "$path"`
18420  fi
18421  if test "x$new_path" = x; then
18422    # Oops. Which didn't find the executable.
18423    # The splitting of arguments from the executable at a space might have been incorrect,
18424    # since paths with space are more likely in Windows. Give it another try with the whole
18425    # argument.
18426    path="$complete"
18427    arguments="EOL"
18428    new_path=`$CYGPATH -u "$path"`
18429    new_path=`$WHICH "$new_path" 2> /dev/null`
18430    # bat and cmd files are not always considered executable in cygwin causing which
18431    # to not find them
18432    if test "x$new_path" = x \
18433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435      new_path=`$CYGPATH -u "$path"`
18436    fi
18437    if test "x$new_path" = x; then
18438      # It's still not found. Now this is an unrecoverable error.
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18441      has_space=`$ECHO "$complete" | $GREP " "`
18442      if test "x$has_space" != x; then
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18445      fi
18446      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18447    fi
18448  fi
18449
18450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18453  # "foo.exe" is OK but "foo" is an error.
18454  #
18455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18456  # It is also a way to make sure we got the proper file name for the real test later on.
18457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18458  if test "x$test_shortpath" = x; then
18459    # Short path failed, file does not exist as specified.
18460    # Try adding .exe or .cmd
18461    if test -f "${new_path}.exe"; then
18462      input_to_shortpath="${new_path}.exe"
18463    elif test -f "${new_path}.cmd"; then
18464      input_to_shortpath="${new_path}.cmd"
18465    else
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471    fi
18472  else
18473    input_to_shortpath="$new_path"
18474  fi
18475
18476  # Call helper function which possibly converts this using DOS-style short mode.
18477  # If so, the updated path is stored in $new_path.
18478  new_path="$input_to_shortpath"
18479
18480  input_path="$input_to_shortpath"
18481  # Check if we need to convert this using DOS-style short mode. If the path
18482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18483  # take no chances and rewrite it.
18484  # Note: m4 eats our [], so we need to use [ and ] instead.
18485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18486  if test "x$has_forbidden_chars" != x; then
18487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18491      # Going to short mode and back again did indeed matter. Since short mode is
18492      # case insensitive, let's make it lowercase to improve readability.
18493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18494      # Now convert it back to Unix-style (cygpath)
18495      input_path=`$CYGPATH -u "$shortmode_path"`
18496      new_path="$input_path"
18497    fi
18498  fi
18499
18500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18501  if test "x$test_cygdrive_prefix" = x; then
18502    # As a simple fix, exclude /usr/bin since it's not a real path.
18503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18505      # a path prefixed by /cygdrive for fixpath to work.
18506      new_path="$CYGWIN_ROOT_PATH$input_path"
18507    fi
18508  fi
18509
18510  # remove trailing .exe if any
18511  new_path="${new_path/%.exe/}"
18512
18513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514
18515  # First separate the path from the arguments. This will split at the first
18516  # space.
18517  complete="$FOUND_MAKE"
18518  path="${complete%% *}"
18519  tmp="$complete EOL"
18520  arguments="${tmp#* }"
18521
18522  # Input might be given as Windows format, start by converting to
18523  # unix format.
18524  new_path="$path"
18525
18526  windows_path="$new_path"
18527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18528    unix_path=`$CYGPATH -u "$windows_path"`
18529    new_path="$unix_path"
18530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18532    new_path="$unix_path"
18533  fi
18534
18535
18536  # Now try to locate executable using which
18537  new_path=`$WHICH "$new_path" 2> /dev/null`
18538
18539  if test "x$new_path" = x; then
18540    # Oops. Which didn't find the executable.
18541    # The splitting of arguments from the executable at a space might have been incorrect,
18542    # since paths with space are more likely in Windows. Give it another try with the whole
18543    # argument.
18544    path="$complete"
18545    arguments="EOL"
18546    new_path="$path"
18547
18548  windows_path="$new_path"
18549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550    unix_path=`$CYGPATH -u "$windows_path"`
18551    new_path="$unix_path"
18552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554    new_path="$unix_path"
18555  fi
18556
18557
18558    new_path=`$WHICH "$new_path" 2> /dev/null`
18559    # bat and cmd files are not always considered executable in MSYS causing which
18560    # to not find them
18561    if test "x$new_path" = x \
18562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18564      new_path="$path"
18565
18566  windows_path="$new_path"
18567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568    unix_path=`$CYGPATH -u "$windows_path"`
18569    new_path="$unix_path"
18570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572    new_path="$unix_path"
18573  fi
18574
18575    fi
18576
18577    if test "x$new_path" = x; then
18578      # It's still not found. Now this is an unrecoverable error.
18579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581      has_space=`$ECHO "$complete" | $GREP " "`
18582      if test "x$has_space" != x; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18585      fi
18586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587    fi
18588  fi
18589
18590  # Now new_path has a complete unix path to the binary
18591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18592    # Keep paths in /bin as-is, but remove trailing .exe if any
18593    new_path="${new_path/%.exe/}"
18594    # Do not save /bin paths to all_fixpath_prefixes!
18595  else
18596    # Not in mixed or Windows style, start by that.
18597    new_path=`cmd //c echo $new_path`
18598
18599  input_path="$new_path"
18600  # Check if we need to convert this using DOS-style short mode. If the path
18601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18602  # take no chances and rewrite it.
18603  # Note: m4 eats our [], so we need to use [ and ] instead.
18604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18605  if test "x$has_forbidden_chars" != x; then
18606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608  fi
18609
18610    # Output is in $new_path
18611
18612  windows_path="$new_path"
18613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18614    unix_path=`$CYGPATH -u "$windows_path"`
18615    new_path="$unix_path"
18616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18618    new_path="$unix_path"
18619  fi
18620
18621    # remove trailing .exe if any
18622    new_path="${new_path/%.exe/}"
18623
18624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18626  fi
18627
18628    else
18629      # We're on a unix platform. Hooray! :)
18630      # First separate the path from the arguments. This will split at the first
18631      # space.
18632      complete="$FOUND_MAKE"
18633      path="${complete%% *}"
18634      tmp="$complete EOL"
18635      arguments="${tmp#* }"
18636
18637      # Cannot rely on the command "which" here since it doesn't always work.
18638      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18639      if test -z "$is_absolute_path"; then
18640        # Path to executable is not absolute. Find it.
18641        IFS_save="$IFS"
18642        IFS=:
18643        for p in $PATH; do
18644          if test -f "$p/$path" && test -x "$p/$path"; then
18645            new_path="$p/$path"
18646            break
18647          fi
18648        done
18649        IFS="$IFS_save"
18650      else
18651        # This is an absolute path, we can use it without further modifications.
18652        new_path="$path"
18653      fi
18654
18655      if test "x$new_path" = x; then
18656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18658        has_space=`$ECHO "$complete" | $GREP " "`
18659        if test "x$has_space" != x; then
18660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662        fi
18663        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18664      fi
18665    fi
18666
18667    # Now join together the path and the arguments once again
18668    if test "x$arguments" != xEOL; then
18669      new_complete="$new_path ${arguments% *}"
18670    else
18671      new_complete="$new_path"
18672    fi
18673
18674    if test "x$complete" != "x$new_complete"; then
18675      FOUND_MAKE="$new_complete"
18676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18677$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18678    fi
18679  fi
18680
18681        fi
18682      fi
18683    fi
18684  fi
18685
18686        if test "x$FOUND_MAKE" = x; then
18687          for ac_prog in make
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $CHECK_TOOLSDIR_MAKE in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18708    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18720if test -n "$CHECK_TOOLSDIR_MAKE"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18722$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$CHECK_TOOLSDIR_MAKE" && break
18730done
18731
18732
18733  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18734  DESCRIPTION="make in tools-dir"
18735
18736  # On Cygwin, we require a newer version of make than on other platforms
18737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738    MAKE_VERSION_EXPR="-e 4\."
18739    MAKE_REQUIRED_VERSION="4.0"
18740   else
18741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18742    MAKE_REQUIRED_VERSION="3.81"
18743  fi
18744
18745  if test "x$MAKE_CANDIDATE" != x; then
18746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18750    if test "x$IS_GNU_MAKE" = x; then
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18753    else
18754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18755      if test "x$IS_MODERN_MAKE" = x; then
18756        { $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
18757$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;}
18758      else
18759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18761            MAKE_EXPECTED_ENV='cygwin'
18762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763            MAKE_EXPECTED_ENV='msys'
18764          else
18765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18766          fi
18767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18769        else
18770          # Not relevant for non-Windows
18771          IS_MAKE_CORRECT_ENV=true
18772        fi
18773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18774          { $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
18775$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;}
18776        else
18777          FOUND_MAKE=$MAKE_CANDIDATE
18778
18779  # Only process if variable expands to non-empty
18780
18781  if test "x$FOUND_MAKE" != x; then
18782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783
18784  # First separate the path from the arguments. This will split at the first
18785  # space.
18786  complete="$FOUND_MAKE"
18787  path="${complete%% *}"
18788  tmp="$complete EOL"
18789  arguments="${tmp#* }"
18790
18791  # Input might be given as Windows format, start by converting to
18792  # unix format.
18793  new_path=`$CYGPATH -u "$path"`
18794
18795  # Now try to locate executable using which
18796  new_path=`$WHICH "$new_path" 2> /dev/null`
18797  # bat and cmd files are not always considered executable in cygwin causing which
18798  # to not find them
18799  if test "x$new_path" = x \
18800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802    new_path=`$CYGPATH -u "$path"`
18803  fi
18804  if test "x$new_path" = x; then
18805    # Oops. Which didn't find the executable.
18806    # The splitting of arguments from the executable at a space might have been incorrect,
18807    # since paths with space are more likely in Windows. Give it another try with the whole
18808    # argument.
18809    path="$complete"
18810    arguments="EOL"
18811    new_path=`$CYGPATH -u "$path"`
18812    new_path=`$WHICH "$new_path" 2> /dev/null`
18813    # bat and cmd files are not always considered executable in cygwin causing which
18814    # to not find them
18815    if test "x$new_path" = x \
18816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818      new_path=`$CYGPATH -u "$path"`
18819    fi
18820    if test "x$new_path" = x; then
18821      # It's still not found. Now this is an unrecoverable error.
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18824      has_space=`$ECHO "$complete" | $GREP " "`
18825      if test "x$has_space" != x; then
18826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828      fi
18829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18830    fi
18831  fi
18832
18833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836  # "foo.exe" is OK but "foo" is an error.
18837  #
18838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839  # It is also a way to make sure we got the proper file name for the real test later on.
18840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841  if test "x$test_shortpath" = x; then
18842    # Short path failed, file does not exist as specified.
18843    # Try adding .exe or .cmd
18844    if test -f "${new_path}.exe"; then
18845      input_to_shortpath="${new_path}.exe"
18846    elif test -f "${new_path}.cmd"; then
18847      input_to_shortpath="${new_path}.cmd"
18848    else
18849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  else
18856    input_to_shortpath="$new_path"
18857  fi
18858
18859  # Call helper function which possibly converts this using DOS-style short mode.
18860  # If so, the updated path is stored in $new_path.
18861  new_path="$input_to_shortpath"
18862
18863  input_path="$input_to_shortpath"
18864  # Check if we need to convert this using DOS-style short mode. If the path
18865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866  # take no chances and rewrite it.
18867  # Note: m4 eats our [], so we need to use [ and ] instead.
18868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869  if test "x$has_forbidden_chars" != x; then
18870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874      # Going to short mode and back again did indeed matter. Since short mode is
18875      # case insensitive, let's make it lowercase to improve readability.
18876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877      # Now convert it back to Unix-style (cygpath)
18878      input_path=`$CYGPATH -u "$shortmode_path"`
18879      new_path="$input_path"
18880    fi
18881  fi
18882
18883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884  if test "x$test_cygdrive_prefix" = x; then
18885    # As a simple fix, exclude /usr/bin since it's not a real path.
18886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888      # a path prefixed by /cygdrive for fixpath to work.
18889      new_path="$CYGWIN_ROOT_PATH$input_path"
18890    fi
18891  fi
18892
18893  # remove trailing .exe if any
18894  new_path="${new_path/%.exe/}"
18895
18896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897
18898  # First separate the path from the arguments. This will split at the first
18899  # space.
18900  complete="$FOUND_MAKE"
18901  path="${complete%% *}"
18902  tmp="$complete EOL"
18903  arguments="${tmp#* }"
18904
18905  # Input might be given as Windows format, start by converting to
18906  # unix format.
18907  new_path="$path"
18908
18909  windows_path="$new_path"
18910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911    unix_path=`$CYGPATH -u "$windows_path"`
18912    new_path="$unix_path"
18913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915    new_path="$unix_path"
18916  fi
18917
18918
18919  # Now try to locate executable using which
18920  new_path=`$WHICH "$new_path" 2> /dev/null`
18921
18922  if test "x$new_path" = x; then
18923    # Oops. Which didn't find the executable.
18924    # The splitting of arguments from the executable at a space might have been incorrect,
18925    # since paths with space are more likely in Windows. Give it another try with the whole
18926    # argument.
18927    path="$complete"
18928    arguments="EOL"
18929    new_path="$path"
18930
18931  windows_path="$new_path"
18932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933    unix_path=`$CYGPATH -u "$windows_path"`
18934    new_path="$unix_path"
18935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937    new_path="$unix_path"
18938  fi
18939
18940
18941    new_path=`$WHICH "$new_path" 2> /dev/null`
18942    # bat and cmd files are not always considered executable in MSYS causing which
18943    # to not find them
18944    if test "x$new_path" = x \
18945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18947      new_path="$path"
18948
18949  windows_path="$new_path"
18950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951    unix_path=`$CYGPATH -u "$windows_path"`
18952    new_path="$unix_path"
18953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955    new_path="$unix_path"
18956  fi
18957
18958    fi
18959
18960    if test "x$new_path" = x; then
18961      # It's still not found. Now this is an unrecoverable error.
18962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18964      has_space=`$ECHO "$complete" | $GREP " "`
18965      if test "x$has_space" != x; then
18966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968      fi
18969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18970    fi
18971  fi
18972
18973  # Now new_path has a complete unix path to the binary
18974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975    # Keep paths in /bin as-is, but remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977    # Do not save /bin paths to all_fixpath_prefixes!
18978  else
18979    # Not in mixed or Windows style, start by that.
18980    new_path=`cmd //c echo $new_path`
18981
18982  input_path="$new_path"
18983  # Check if we need to convert this using DOS-style short mode. If the path
18984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985  # take no chances and rewrite it.
18986  # Note: m4 eats our [], so we need to use [ and ] instead.
18987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988  if test "x$has_forbidden_chars" != x; then
18989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991  fi
18992
18993    # Output is in $new_path
18994
18995  windows_path="$new_path"
18996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997    unix_path=`$CYGPATH -u "$windows_path"`
18998    new_path="$unix_path"
18999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001    new_path="$unix_path"
19002  fi
19003
19004    # remove trailing .exe if any
19005    new_path="${new_path/%.exe/}"
19006
19007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009  fi
19010
19011    else
19012      # We're on a unix platform. Hooray! :)
19013      # First separate the path from the arguments. This will split at the first
19014      # space.
19015      complete="$FOUND_MAKE"
19016      path="${complete%% *}"
19017      tmp="$complete EOL"
19018      arguments="${tmp#* }"
19019
19020      # Cannot rely on the command "which" here since it doesn't always work.
19021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022      if test -z "$is_absolute_path"; then
19023        # Path to executable is not absolute. Find it.
19024        IFS_save="$IFS"
19025        IFS=:
19026        for p in $PATH; do
19027          if test -f "$p/$path" && test -x "$p/$path"; then
19028            new_path="$p/$path"
19029            break
19030          fi
19031        done
19032        IFS="$IFS_save"
19033      else
19034        # This is an absolute path, we can use it without further modifications.
19035        new_path="$path"
19036      fi
19037
19038      if test "x$new_path" = x; then
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19041        has_space=`$ECHO "$complete" | $GREP " "`
19042        if test "x$has_space" != x; then
19043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19045        fi
19046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19047      fi
19048    fi
19049
19050    # Now join together the path and the arguments once again
19051    if test "x$arguments" != xEOL; then
19052      new_complete="$new_path ${arguments% *}"
19053    else
19054      new_complete="$new_path"
19055    fi
19056
19057    if test "x$complete" != "x$new_complete"; then
19058      FOUND_MAKE="$new_complete"
19059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19061    fi
19062  fi
19063
19064        fi
19065      fi
19066    fi
19067  fi
19068
19069        fi
19070        PATH=$OLD_PATH
19071      fi
19072    fi
19073
19074    if test "x$FOUND_MAKE" = x; then
19075      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
19076    fi
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !MAKE! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xMAKE" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091
19092    # Try our hardest to locate a correct version of GNU make
19093    for ac_prog in gmake
19094do
19095  # Extract the first word of "$ac_prog", so it can be a program name with args.
19096set dummy $ac_prog; ac_word=$2
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098$as_echo_n "checking for $ac_word... " >&6; }
19099if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19100  $as_echo_n "(cached) " >&6
19101else
19102  case $CHECK_GMAKE in
19103  [\\/]* | ?:[\\/]*)
19104  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19105  ;;
19106  *)
19107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108for as_dir in $PATH
19109do
19110  IFS=$as_save_IFS
19111  test -z "$as_dir" && as_dir=.
19112    for ac_exec_ext in '' $ac_executable_extensions; do
19113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116    break 2
19117  fi
19118done
19119  done
19120IFS=$as_save_IFS
19121
19122  ;;
19123esac
19124fi
19125CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19126if test -n "$CHECK_GMAKE"; then
19127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19128$as_echo "$CHECK_GMAKE" >&6; }
19129else
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131$as_echo "no" >&6; }
19132fi
19133
19134
19135  test -n "$CHECK_GMAKE" && break
19136done
19137
19138
19139  MAKE_CANDIDATE=""$CHECK_GMAKE""
19140  DESCRIPTION="gmake in PATH"
19141
19142  # On Cygwin, we require a newer version of make than on other platforms
19143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19144    MAKE_VERSION_EXPR="-e 4\."
19145    MAKE_REQUIRED_VERSION="4.0"
19146   else
19147    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19148    MAKE_REQUIRED_VERSION="3.81"
19149  fi
19150
19151  if test "x$MAKE_CANDIDATE" != x; then
19152    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19153$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19154    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19155    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19156    if test "x$IS_GNU_MAKE" = x; then
19157      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19158$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19159    else
19160      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19161      if test "x$IS_MODERN_MAKE" = x; then
19162        { $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
19163$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;}
19164      else
19165        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19166          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19167            MAKE_EXPECTED_ENV='cygwin'
19168          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169            MAKE_EXPECTED_ENV='msys'
19170          else
19171            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19172          fi
19173          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19174          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19175        else
19176          # Not relevant for non-Windows
19177          IS_MAKE_CORRECT_ENV=true
19178        fi
19179        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19180          { $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
19181$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;}
19182        else
19183          FOUND_MAKE=$MAKE_CANDIDATE
19184
19185  # Only process if variable expands to non-empty
19186
19187  if test "x$FOUND_MAKE" != x; then
19188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19189
19190  # First separate the path from the arguments. This will split at the first
19191  # space.
19192  complete="$FOUND_MAKE"
19193  path="${complete%% *}"
19194  tmp="$complete EOL"
19195  arguments="${tmp#* }"
19196
19197  # Input might be given as Windows format, start by converting to
19198  # unix format.
19199  new_path=`$CYGPATH -u "$path"`
19200
19201  # Now try to locate executable using which
19202  new_path=`$WHICH "$new_path" 2> /dev/null`
19203  # bat and cmd files are not always considered executable in cygwin causing which
19204  # to not find them
19205  if test "x$new_path" = x \
19206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208    new_path=`$CYGPATH -u "$path"`
19209  fi
19210  if test "x$new_path" = x; then
19211    # Oops. Which didn't find the executable.
19212    # The splitting of arguments from the executable at a space might have been incorrect,
19213    # since paths with space are more likely in Windows. Give it another try with the whole
19214    # argument.
19215    path="$complete"
19216    arguments="EOL"
19217    new_path=`$CYGPATH -u "$path"`
19218    new_path=`$WHICH "$new_path" 2> /dev/null`
19219    # bat and cmd files are not always considered executable in cygwin causing which
19220    # to not find them
19221    if test "x$new_path" = x \
19222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19224      new_path=`$CYGPATH -u "$path"`
19225    fi
19226    if test "x$new_path" = x; then
19227      # It's still not found. Now this is an unrecoverable error.
19228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230      has_space=`$ECHO "$complete" | $GREP " "`
19231      if test "x$has_space" != x; then
19232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19234      fi
19235      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236    fi
19237  fi
19238
19239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19242  # "foo.exe" is OK but "foo" is an error.
19243  #
19244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19245  # It is also a way to make sure we got the proper file name for the real test later on.
19246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19247  if test "x$test_shortpath" = x; then
19248    # Short path failed, file does not exist as specified.
19249    # Try adding .exe or .cmd
19250    if test -f "${new_path}.exe"; then
19251      input_to_shortpath="${new_path}.exe"
19252    elif test -f "${new_path}.cmd"; then
19253      input_to_shortpath="${new_path}.cmd"
19254    else
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260    fi
19261  else
19262    input_to_shortpath="$new_path"
19263  fi
19264
19265  # Call helper function which possibly converts this using DOS-style short mode.
19266  # If so, the updated path is stored in $new_path.
19267  new_path="$input_to_shortpath"
19268
19269  input_path="$input_to_shortpath"
19270  # Check if we need to convert this using DOS-style short mode. If the path
19271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19272  # take no chances and rewrite it.
19273  # Note: m4 eats our [], so we need to use [ and ] instead.
19274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19275  if test "x$has_forbidden_chars" != x; then
19276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19280      # Going to short mode and back again did indeed matter. Since short mode is
19281      # case insensitive, let's make it lowercase to improve readability.
19282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19283      # Now convert it back to Unix-style (cygpath)
19284      input_path=`$CYGPATH -u "$shortmode_path"`
19285      new_path="$input_path"
19286    fi
19287  fi
19288
19289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19290  if test "x$test_cygdrive_prefix" = x; then
19291    # As a simple fix, exclude /usr/bin since it's not a real path.
19292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19294      # a path prefixed by /cygdrive for fixpath to work.
19295      new_path="$CYGWIN_ROOT_PATH$input_path"
19296    fi
19297  fi
19298
19299  # remove trailing .exe if any
19300  new_path="${new_path/%.exe/}"
19301
19302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303
19304  # First separate the path from the arguments. This will split at the first
19305  # space.
19306  complete="$FOUND_MAKE"
19307  path="${complete%% *}"
19308  tmp="$complete EOL"
19309  arguments="${tmp#* }"
19310
19311  # Input might be given as Windows format, start by converting to
19312  # unix format.
19313  new_path="$path"
19314
19315  windows_path="$new_path"
19316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19317    unix_path=`$CYGPATH -u "$windows_path"`
19318    new_path="$unix_path"
19319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19321    new_path="$unix_path"
19322  fi
19323
19324
19325  # Now try to locate executable using which
19326  new_path=`$WHICH "$new_path" 2> /dev/null`
19327
19328  if test "x$new_path" = x; then
19329    # Oops. Which didn't find the executable.
19330    # The splitting of arguments from the executable at a space might have been incorrect,
19331    # since paths with space are more likely in Windows. Give it another try with the whole
19332    # argument.
19333    path="$complete"
19334    arguments="EOL"
19335    new_path="$path"
19336
19337  windows_path="$new_path"
19338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339    unix_path=`$CYGPATH -u "$windows_path"`
19340    new_path="$unix_path"
19341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343    new_path="$unix_path"
19344  fi
19345
19346
19347    new_path=`$WHICH "$new_path" 2> /dev/null`
19348    # bat and cmd files are not always considered executable in MSYS causing which
19349    # to not find them
19350    if test "x$new_path" = x \
19351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19353      new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364    fi
19365
19366    if test "x$new_path" = x; then
19367      # It's still not found. Now this is an unrecoverable error.
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19370      has_space=`$ECHO "$complete" | $GREP " "`
19371      if test "x$has_space" != x; then
19372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19374      fi
19375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19376    fi
19377  fi
19378
19379  # Now new_path has a complete unix path to the binary
19380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19381    # Keep paths in /bin as-is, but remove trailing .exe if any
19382    new_path="${new_path/%.exe/}"
19383    # Do not save /bin paths to all_fixpath_prefixes!
19384  else
19385    # Not in mixed or Windows style, start by that.
19386    new_path=`cmd //c echo $new_path`
19387
19388  input_path="$new_path"
19389  # Check if we need to convert this using DOS-style short mode. If the path
19390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19391  # take no chances and rewrite it.
19392  # Note: m4 eats our [], so we need to use [ and ] instead.
19393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19394  if test "x$has_forbidden_chars" != x; then
19395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19397  fi
19398
19399    # Output is in $new_path
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410    # remove trailing .exe if any
19411    new_path="${new_path/%.exe/}"
19412
19413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19415  fi
19416
19417    else
19418      # We're on a unix platform. Hooray! :)
19419      # First separate the path from the arguments. This will split at the first
19420      # space.
19421      complete="$FOUND_MAKE"
19422      path="${complete%% *}"
19423      tmp="$complete EOL"
19424      arguments="${tmp#* }"
19425
19426      # Cannot rely on the command "which" here since it doesn't always work.
19427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19428      if test -z "$is_absolute_path"; then
19429        # Path to executable is not absolute. Find it.
19430        IFS_save="$IFS"
19431        IFS=:
19432        for p in $PATH; do
19433          if test -f "$p/$path" && test -x "$p/$path"; then
19434            new_path="$p/$path"
19435            break
19436          fi
19437        done
19438        IFS="$IFS_save"
19439      else
19440        # This is an absolute path, we can use it without further modifications.
19441        new_path="$path"
19442      fi
19443
19444      if test "x$new_path" = x; then
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19447        has_space=`$ECHO "$complete" | $GREP " "`
19448        if test "x$has_space" != x; then
19449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19451        fi
19452        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19453      fi
19454    fi
19455
19456    # Now join together the path and the arguments once again
19457    if test "x$arguments" != xEOL; then
19458      new_complete="$new_path ${arguments% *}"
19459    else
19460      new_complete="$new_path"
19461    fi
19462
19463    if test "x$complete" != "x$new_complete"; then
19464      FOUND_MAKE="$new_complete"
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19466$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19467    fi
19468  fi
19469
19470        fi
19471      fi
19472    fi
19473  fi
19474
19475
19476    if test "x$FOUND_MAKE" = x; then
19477      for ac_prog in make
19478do
19479  # Extract the first word of "$ac_prog", so it can be a program name with args.
19480set dummy $ac_prog; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if ${ac_cv_path_CHECK_MAKE+:} false; then :
19484  $as_echo_n "(cached) " >&6
19485else
19486  case $CHECK_MAKE in
19487  [\\/]* | ?:[\\/]*)
19488  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19489  ;;
19490  *)
19491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492for as_dir in $PATH
19493do
19494  IFS=$as_save_IFS
19495  test -z "$as_dir" && as_dir=.
19496    for ac_exec_ext in '' $ac_executable_extensions; do
19497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500    break 2
19501  fi
19502done
19503  done
19504IFS=$as_save_IFS
19505
19506  ;;
19507esac
19508fi
19509CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19510if test -n "$CHECK_MAKE"; then
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19512$as_echo "$CHECK_MAKE" >&6; }
19513else
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515$as_echo "no" >&6; }
19516fi
19517
19518
19519  test -n "$CHECK_MAKE" && break
19520done
19521
19522
19523  MAKE_CANDIDATE=""$CHECK_MAKE""
19524  DESCRIPTION="make in PATH"
19525
19526  # On Cygwin, we require a newer version of make than on other platforms
19527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528    MAKE_VERSION_EXPR="-e 4\."
19529    MAKE_REQUIRED_VERSION="4.0"
19530   else
19531    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19532    MAKE_REQUIRED_VERSION="3.81"
19533  fi
19534
19535  if test "x$MAKE_CANDIDATE" != x; then
19536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19540    if test "x$IS_GNU_MAKE" = x; then
19541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19543    else
19544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19545      if test "x$IS_MODERN_MAKE" = x; then
19546        { $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
19547$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;}
19548      else
19549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551            MAKE_EXPECTED_ENV='cygwin'
19552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553            MAKE_EXPECTED_ENV='msys'
19554          else
19555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19556          fi
19557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19559        else
19560          # Not relevant for non-Windows
19561          IS_MAKE_CORRECT_ENV=true
19562        fi
19563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19564          { $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
19565$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;}
19566        else
19567          FOUND_MAKE=$MAKE_CANDIDATE
19568
19569  # Only process if variable expands to non-empty
19570
19571  if test "x$FOUND_MAKE" != x; then
19572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19573
19574  # First separate the path from the arguments. This will split at the first
19575  # space.
19576  complete="$FOUND_MAKE"
19577  path="${complete%% *}"
19578  tmp="$complete EOL"
19579  arguments="${tmp#* }"
19580
19581  # Input might be given as Windows format, start by converting to
19582  # unix format.
19583  new_path=`$CYGPATH -u "$path"`
19584
19585  # Now try to locate executable using which
19586  new_path=`$WHICH "$new_path" 2> /dev/null`
19587  # bat and cmd files are not always considered executable in cygwin causing which
19588  # to not find them
19589  if test "x$new_path" = x \
19590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19592    new_path=`$CYGPATH -u "$path"`
19593  fi
19594  if test "x$new_path" = x; then
19595    # Oops. Which didn't find the executable.
19596    # The splitting of arguments from the executable at a space might have been incorrect,
19597    # since paths with space are more likely in Windows. Give it another try with the whole
19598    # argument.
19599    path="$complete"
19600    arguments="EOL"
19601    new_path=`$CYGPATH -u "$path"`
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603    # bat and cmd files are not always considered executable in cygwin causing which
19604    # to not find them
19605    if test "x$new_path" = x \
19606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608      new_path=`$CYGPATH -u "$path"`
19609    fi
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19626  # "foo.exe" is OK but "foo" is an error.
19627  #
19628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19629  # It is also a way to make sure we got the proper file name for the real test later on.
19630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19631  if test "x$test_shortpath" = x; then
19632    # Short path failed, file does not exist as specified.
19633    # Try adding .exe or .cmd
19634    if test -f "${new_path}.exe"; then
19635      input_to_shortpath="${new_path}.exe"
19636    elif test -f "${new_path}.cmd"; then
19637      input_to_shortpath="${new_path}.cmd"
19638    else
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644    fi
19645  else
19646    input_to_shortpath="$new_path"
19647  fi
19648
19649  # Call helper function which possibly converts this using DOS-style short mode.
19650  # If so, the updated path is stored in $new_path.
19651  new_path="$input_to_shortpath"
19652
19653  input_path="$input_to_shortpath"
19654  # Check if we need to convert this using DOS-style short mode. If the path
19655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19656  # take no chances and rewrite it.
19657  # Note: m4 eats our [], so we need to use [ and ] instead.
19658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19659  if test "x$has_forbidden_chars" != x; then
19660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19664      # Going to short mode and back again did indeed matter. Since short mode is
19665      # case insensitive, let's make it lowercase to improve readability.
19666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19667      # Now convert it back to Unix-style (cygpath)
19668      input_path=`$CYGPATH -u "$shortmode_path"`
19669      new_path="$input_path"
19670    fi
19671  fi
19672
19673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19674  if test "x$test_cygdrive_prefix" = x; then
19675    # As a simple fix, exclude /usr/bin since it's not a real path.
19676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19678      # a path prefixed by /cygdrive for fixpath to work.
19679      new_path="$CYGWIN_ROOT_PATH$input_path"
19680    fi
19681  fi
19682
19683  # remove trailing .exe if any
19684  new_path="${new_path/%.exe/}"
19685
19686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687
19688  # First separate the path from the arguments. This will split at the first
19689  # space.
19690  complete="$FOUND_MAKE"
19691  path="${complete%% *}"
19692  tmp="$complete EOL"
19693  arguments="${tmp#* }"
19694
19695  # Input might be given as Windows format, start by converting to
19696  # unix format.
19697  new_path="$path"
19698
19699  windows_path="$new_path"
19700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701    unix_path=`$CYGPATH -u "$windows_path"`
19702    new_path="$unix_path"
19703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705    new_path="$unix_path"
19706  fi
19707
19708
19709  # Now try to locate executable using which
19710  new_path=`$WHICH "$new_path" 2> /dev/null`
19711
19712  if test "x$new_path" = x; then
19713    # Oops. Which didn't find the executable.
19714    # The splitting of arguments from the executable at a space might have been incorrect,
19715    # since paths with space are more likely in Windows. Give it another try with the whole
19716    # argument.
19717    path="$complete"
19718    arguments="EOL"
19719    new_path="$path"
19720
19721  windows_path="$new_path"
19722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723    unix_path=`$CYGPATH -u "$windows_path"`
19724    new_path="$unix_path"
19725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727    new_path="$unix_path"
19728  fi
19729
19730
19731    new_path=`$WHICH "$new_path" 2> /dev/null`
19732    # bat and cmd files are not always considered executable in MSYS causing which
19733    # to not find them
19734    if test "x$new_path" = x \
19735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19737      new_path="$path"
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748    fi
19749
19750    if test "x$new_path" = x; then
19751      # It's still not found. Now this is an unrecoverable error.
19752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19754      has_space=`$ECHO "$complete" | $GREP " "`
19755      if test "x$has_space" != x; then
19756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758      fi
19759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19760    fi
19761  fi
19762
19763  # Now new_path has a complete unix path to the binary
19764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765    # Keep paths in /bin as-is, but remove trailing .exe if any
19766    new_path="${new_path/%.exe/}"
19767    # Do not save /bin paths to all_fixpath_prefixes!
19768  else
19769    # Not in mixed or Windows style, start by that.
19770    new_path=`cmd //c echo $new_path`
19771
19772  input_path="$new_path"
19773  # Check if we need to convert this using DOS-style short mode. If the path
19774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775  # take no chances and rewrite it.
19776  # Note: m4 eats our [], so we need to use [ and ] instead.
19777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778  if test "x$has_forbidden_chars" != x; then
19779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781  fi
19782
19783    # Output is in $new_path
19784
19785  windows_path="$new_path"
19786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787    unix_path=`$CYGPATH -u "$windows_path"`
19788    new_path="$unix_path"
19789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791    new_path="$unix_path"
19792  fi
19793
19794    # remove trailing .exe if any
19795    new_path="${new_path/%.exe/}"
19796
19797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799  fi
19800
19801    else
19802      # We're on a unix platform. Hooray! :)
19803      # First separate the path from the arguments. This will split at the first
19804      # space.
19805      complete="$FOUND_MAKE"
19806      path="${complete%% *}"
19807      tmp="$complete EOL"
19808      arguments="${tmp#* }"
19809
19810      # Cannot rely on the command "which" here since it doesn't always work.
19811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812      if test -z "$is_absolute_path"; then
19813        # Path to executable is not absolute. Find it.
19814        IFS_save="$IFS"
19815        IFS=:
19816        for p in $PATH; do
19817          if test -f "$p/$path" && test -x "$p/$path"; then
19818            new_path="$p/$path"
19819            break
19820          fi
19821        done
19822        IFS="$IFS_save"
19823      else
19824        # This is an absolute path, we can use it without further modifications.
19825        new_path="$path"
19826      fi
19827
19828      if test "x$new_path" = x; then
19829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19831        has_space=`$ECHO "$complete" | $GREP " "`
19832        if test "x$has_space" != x; then
19833          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19835        fi
19836        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19837      fi
19838    fi
19839
19840    # Now join together the path and the arguments once again
19841    if test "x$arguments" != xEOL; then
19842      new_complete="$new_path ${arguments% *}"
19843    else
19844      new_complete="$new_path"
19845    fi
19846
19847    if test "x$complete" != "x$new_complete"; then
19848      FOUND_MAKE="$new_complete"
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19850$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19851    fi
19852  fi
19853
19854        fi
19855      fi
19856    fi
19857  fi
19858
19859    fi
19860
19861    if test "x$FOUND_MAKE" = x; then
19862      if test "x$TOOLCHAIN_PATH" != x; then
19863        # We have a toolchain path, check that as well before giving up.
19864        OLD_PATH=$PATH
19865        PATH=$TOOLCHAIN_PATH:$PATH
19866        for ac_prog in gmake
19867do
19868  # Extract the first word of "$ac_prog", so it can be a program name with args.
19869set dummy $ac_prog; ac_word=$2
19870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19871$as_echo_n "checking for $ac_word... " >&6; }
19872if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19873  $as_echo_n "(cached) " >&6
19874else
19875  case $CHECK_TOOLSDIR_GMAKE in
19876  [\\/]* | ?:[\\/]*)
19877  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19878  ;;
19879  *)
19880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19881for as_dir in $PATH
19882do
19883  IFS=$as_save_IFS
19884  test -z "$as_dir" && as_dir=.
19885    for ac_exec_ext in '' $ac_executable_extensions; do
19886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19887    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19889    break 2
19890  fi
19891done
19892  done
19893IFS=$as_save_IFS
19894
19895  ;;
19896esac
19897fi
19898CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19899if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19901$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19902else
19903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19904$as_echo "no" >&6; }
19905fi
19906
19907
19908  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19909done
19910
19911
19912  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19913  DESCRIPTION="gmake in tools-dir"
19914
19915  # On Cygwin, we require a newer version of make than on other platforms
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917    MAKE_VERSION_EXPR="-e 4\."
19918    MAKE_REQUIRED_VERSION="4.0"
19919   else
19920    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19921    MAKE_REQUIRED_VERSION="3.81"
19922  fi
19923
19924  if test "x$MAKE_CANDIDATE" != x; then
19925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19929    if test "x$IS_GNU_MAKE" = x; then
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19932    else
19933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19934      if test "x$IS_MODERN_MAKE" = x; then
19935        { $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
19936$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;}
19937      else
19938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940            MAKE_EXPECTED_ENV='cygwin'
19941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942            MAKE_EXPECTED_ENV='msys'
19943          else
19944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19945          fi
19946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19948        else
19949          # Not relevant for non-Windows
19950          IS_MAKE_CORRECT_ENV=true
19951        fi
19952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19953          { $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
19954$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;}
19955        else
19956          FOUND_MAKE=$MAKE_CANDIDATE
19957
19958  # Only process if variable expands to non-empty
19959
19960  if test "x$FOUND_MAKE" != x; then
19961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962
19963  # First separate the path from the arguments. This will split at the first
19964  # space.
19965  complete="$FOUND_MAKE"
19966  path="${complete%% *}"
19967  tmp="$complete EOL"
19968  arguments="${tmp#* }"
19969
19970  # Input might be given as Windows format, start by converting to
19971  # unix format.
19972  new_path=`$CYGPATH -u "$path"`
19973
19974  # Now try to locate executable using which
19975  new_path=`$WHICH "$new_path" 2> /dev/null`
19976  # bat and cmd files are not always considered executable in cygwin causing which
19977  # to not find them
19978  if test "x$new_path" = x \
19979      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981    new_path=`$CYGPATH -u "$path"`
19982  fi
19983  if test "x$new_path" = x; then
19984    # Oops. Which didn't find the executable.
19985    # The splitting of arguments from the executable at a space might have been incorrect,
19986    # since paths with space are more likely in Windows. Give it another try with the whole
19987    # argument.
19988    path="$complete"
19989    arguments="EOL"
19990    new_path=`$CYGPATH -u "$path"`
19991    new_path=`$WHICH "$new_path" 2> /dev/null`
19992    # bat and cmd files are not always considered executable in cygwin causing which
19993    # to not find them
19994    if test "x$new_path" = x \
19995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997      new_path=`$CYGPATH -u "$path"`
19998    fi
19999    if test "x$new_path" = x; then
20000      # It's still not found. Now this is an unrecoverable error.
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20003      has_space=`$ECHO "$complete" | $GREP " "`
20004      if test "x$has_space" != x; then
20005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20007      fi
20008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20009    fi
20010  fi
20011
20012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20015  # "foo.exe" is OK but "foo" is an error.
20016  #
20017  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20018  # It is also a way to make sure we got the proper file name for the real test later on.
20019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20020  if test "x$test_shortpath" = x; then
20021    # Short path failed, file does not exist as specified.
20022    # Try adding .exe or .cmd
20023    if test -f "${new_path}.exe"; then
20024      input_to_shortpath="${new_path}.exe"
20025    elif test -f "${new_path}.cmd"; then
20026      input_to_shortpath="${new_path}.cmd"
20027    else
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033    fi
20034  else
20035    input_to_shortpath="$new_path"
20036  fi
20037
20038  # Call helper function which possibly converts this using DOS-style short mode.
20039  # If so, the updated path is stored in $new_path.
20040  new_path="$input_to_shortpath"
20041
20042  input_path="$input_to_shortpath"
20043  # Check if we need to convert this using DOS-style short mode. If the path
20044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20045  # take no chances and rewrite it.
20046  # Note: m4 eats our [], so we need to use [ and ] instead.
20047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20048  if test "x$has_forbidden_chars" != x; then
20049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20053      # Going to short mode and back again did indeed matter. Since short mode is
20054      # case insensitive, let's make it lowercase to improve readability.
20055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056      # Now convert it back to Unix-style (cygpath)
20057      input_path=`$CYGPATH -u "$shortmode_path"`
20058      new_path="$input_path"
20059    fi
20060  fi
20061
20062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20063  if test "x$test_cygdrive_prefix" = x; then
20064    # As a simple fix, exclude /usr/bin since it's not a real path.
20065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20067      # a path prefixed by /cygdrive for fixpath to work.
20068      new_path="$CYGWIN_ROOT_PATH$input_path"
20069    fi
20070  fi
20071
20072  # remove trailing .exe if any
20073  new_path="${new_path/%.exe/}"
20074
20075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076
20077  # First separate the path from the arguments. This will split at the first
20078  # space.
20079  complete="$FOUND_MAKE"
20080  path="${complete%% *}"
20081  tmp="$complete EOL"
20082  arguments="${tmp#* }"
20083
20084  # Input might be given as Windows format, start by converting to
20085  # unix format.
20086  new_path="$path"
20087
20088  windows_path="$new_path"
20089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20090    unix_path=`$CYGPATH -u "$windows_path"`
20091    new_path="$unix_path"
20092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20094    new_path="$unix_path"
20095  fi
20096
20097
20098  # Now try to locate executable using which
20099  new_path=`$WHICH "$new_path" 2> /dev/null`
20100
20101  if test "x$new_path" = x; then
20102    # Oops. Which didn't find the executable.
20103    # The splitting of arguments from the executable at a space might have been incorrect,
20104    # since paths with space are more likely in Windows. Give it another try with the whole
20105    # argument.
20106    path="$complete"
20107    arguments="EOL"
20108    new_path="$path"
20109
20110  windows_path="$new_path"
20111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112    unix_path=`$CYGPATH -u "$windows_path"`
20113    new_path="$unix_path"
20114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116    new_path="$unix_path"
20117  fi
20118
20119
20120    new_path=`$WHICH "$new_path" 2> /dev/null`
20121    # bat and cmd files are not always considered executable in MSYS causing which
20122    # to not find them
20123    if test "x$new_path" = x \
20124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20126      new_path="$path"
20127
20128  windows_path="$new_path"
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    unix_path=`$CYGPATH -u "$windows_path"`
20131    new_path="$unix_path"
20132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134    new_path="$unix_path"
20135  fi
20136
20137    fi
20138
20139    if test "x$new_path" = x; then
20140      # It's still not found. Now this is an unrecoverable error.
20141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143      has_space=`$ECHO "$complete" | $GREP " "`
20144      if test "x$has_space" != x; then
20145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20147      fi
20148      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149    fi
20150  fi
20151
20152  # Now new_path has a complete unix path to the binary
20153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20154    # Keep paths in /bin as-is, but remove trailing .exe if any
20155    new_path="${new_path/%.exe/}"
20156    # Do not save /bin paths to all_fixpath_prefixes!
20157  else
20158    # Not in mixed or Windows style, start by that.
20159    new_path=`cmd //c echo $new_path`
20160
20161  input_path="$new_path"
20162  # Check if we need to convert this using DOS-style short mode. If the path
20163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20164  # take no chances and rewrite it.
20165  # Note: m4 eats our [], so we need to use [ and ] instead.
20166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20167  if test "x$has_forbidden_chars" != x; then
20168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20170  fi
20171
20172    # Output is in $new_path
20173
20174  windows_path="$new_path"
20175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20176    unix_path=`$CYGPATH -u "$windows_path"`
20177    new_path="$unix_path"
20178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20180    new_path="$unix_path"
20181  fi
20182
20183    # remove trailing .exe if any
20184    new_path="${new_path/%.exe/}"
20185
20186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20188  fi
20189
20190    else
20191      # We're on a unix platform. Hooray! :)
20192      # First separate the path from the arguments. This will split at the first
20193      # space.
20194      complete="$FOUND_MAKE"
20195      path="${complete%% *}"
20196      tmp="$complete EOL"
20197      arguments="${tmp#* }"
20198
20199      # Cannot rely on the command "which" here since it doesn't always work.
20200      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20201      if test -z "$is_absolute_path"; then
20202        # Path to executable is not absolute. Find it.
20203        IFS_save="$IFS"
20204        IFS=:
20205        for p in $PATH; do
20206          if test -f "$p/$path" && test -x "$p/$path"; then
20207            new_path="$p/$path"
20208            break
20209          fi
20210        done
20211        IFS="$IFS_save"
20212      else
20213        # This is an absolute path, we can use it without further modifications.
20214        new_path="$path"
20215      fi
20216
20217      if test "x$new_path" = x; then
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20220        has_space=`$ECHO "$complete" | $GREP " "`
20221        if test "x$has_space" != x; then
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20224        fi
20225        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20226      fi
20227    fi
20228
20229    # Now join together the path and the arguments once again
20230    if test "x$arguments" != xEOL; then
20231      new_complete="$new_path ${arguments% *}"
20232    else
20233      new_complete="$new_path"
20234    fi
20235
20236    if test "x$complete" != "x$new_complete"; then
20237      FOUND_MAKE="$new_complete"
20238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20239$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20240    fi
20241  fi
20242
20243        fi
20244      fi
20245    fi
20246  fi
20247
20248        if test "x$FOUND_MAKE" = x; then
20249          for ac_prog in make
20250do
20251  # Extract the first word of "$ac_prog", so it can be a program name with args.
20252set dummy $ac_prog; ac_word=$2
20253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20254$as_echo_n "checking for $ac_word... " >&6; }
20255if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20256  $as_echo_n "(cached) " >&6
20257else
20258  case $CHECK_TOOLSDIR_MAKE in
20259  [\\/]* | ?:[\\/]*)
20260  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20261  ;;
20262  *)
20263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20264for as_dir in $PATH
20265do
20266  IFS=$as_save_IFS
20267  test -z "$as_dir" && as_dir=.
20268    for ac_exec_ext in '' $ac_executable_extensions; do
20269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20270    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20272    break 2
20273  fi
20274done
20275  done
20276IFS=$as_save_IFS
20277
20278  ;;
20279esac
20280fi
20281CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20282if test -n "$CHECK_TOOLSDIR_MAKE"; then
20283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20284$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20285else
20286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20287$as_echo "no" >&6; }
20288fi
20289
20290
20291  test -n "$CHECK_TOOLSDIR_MAKE" && break
20292done
20293
20294
20295  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20296  DESCRIPTION="make in tools-dir"
20297
20298  # On Cygwin, we require a newer version of make than on other platforms
20299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300    MAKE_VERSION_EXPR="-e 4\."
20301    MAKE_REQUIRED_VERSION="4.0"
20302   else
20303    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20304    MAKE_REQUIRED_VERSION="3.81"
20305  fi
20306
20307  if test "x$MAKE_CANDIDATE" != x; then
20308    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20309$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20310    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20311    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20312    if test "x$IS_GNU_MAKE" = x; then
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20314$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20315    else
20316      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20317      if test "x$IS_MODERN_MAKE" = x; then
20318        { $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
20319$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;}
20320      else
20321        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20322          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323            MAKE_EXPECTED_ENV='cygwin'
20324          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325            MAKE_EXPECTED_ENV='msys'
20326          else
20327            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20328          fi
20329          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20330          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20331        else
20332          # Not relevant for non-Windows
20333          IS_MAKE_CORRECT_ENV=true
20334        fi
20335        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20336          { $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
20337$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;}
20338        else
20339          FOUND_MAKE=$MAKE_CANDIDATE
20340
20341  # Only process if variable expands to non-empty
20342
20343  if test "x$FOUND_MAKE" != x; then
20344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345
20346  # First separate the path from the arguments. This will split at the first
20347  # space.
20348  complete="$FOUND_MAKE"
20349  path="${complete%% *}"
20350  tmp="$complete EOL"
20351  arguments="${tmp#* }"
20352
20353  # Input might be given as Windows format, start by converting to
20354  # unix format.
20355  new_path=`$CYGPATH -u "$path"`
20356
20357  # Now try to locate executable using which
20358  new_path=`$WHICH "$new_path" 2> /dev/null`
20359  # bat and cmd files are not always considered executable in cygwin causing which
20360  # to not find them
20361  if test "x$new_path" = x \
20362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20364    new_path=`$CYGPATH -u "$path"`
20365  fi
20366  if test "x$new_path" = x; then
20367    # Oops. Which didn't find the executable.
20368    # The splitting of arguments from the executable at a space might have been incorrect,
20369    # since paths with space are more likely in Windows. Give it another try with the whole
20370    # argument.
20371    path="$complete"
20372    arguments="EOL"
20373    new_path=`$CYGPATH -u "$path"`
20374    new_path=`$WHICH "$new_path" 2> /dev/null`
20375    # bat and cmd files are not always considered executable in cygwin causing which
20376    # to not find them
20377    if test "x$new_path" = x \
20378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20380      new_path=`$CYGPATH -u "$path"`
20381    fi
20382    if test "x$new_path" = x; then
20383      # It's still not found. Now this is an unrecoverable error.
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20386      has_space=`$ECHO "$complete" | $GREP " "`
20387      if test "x$has_space" != x; then
20388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20390      fi
20391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20392    fi
20393  fi
20394
20395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20398  # "foo.exe" is OK but "foo" is an error.
20399  #
20400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20401  # It is also a way to make sure we got the proper file name for the real test later on.
20402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20403  if test "x$test_shortpath" = x; then
20404    # Short path failed, file does not exist as specified.
20405    # Try adding .exe or .cmd
20406    if test -f "${new_path}.exe"; then
20407      input_to_shortpath="${new_path}.exe"
20408    elif test -f "${new_path}.cmd"; then
20409      input_to_shortpath="${new_path}.cmd"
20410    else
20411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  else
20418    input_to_shortpath="$new_path"
20419  fi
20420
20421  # Call helper function which possibly converts this using DOS-style short mode.
20422  # If so, the updated path is stored in $new_path.
20423  new_path="$input_to_shortpath"
20424
20425  input_path="$input_to_shortpath"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20436      # Going to short mode and back again did indeed matter. Since short mode is
20437      # case insensitive, let's make it lowercase to improve readability.
20438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20439      # Now convert it back to Unix-style (cygpath)
20440      input_path=`$CYGPATH -u "$shortmode_path"`
20441      new_path="$input_path"
20442    fi
20443  fi
20444
20445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20446  if test "x$test_cygdrive_prefix" = x; then
20447    # As a simple fix, exclude /usr/bin since it's not a real path.
20448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20450      # a path prefixed by /cygdrive for fixpath to work.
20451      new_path="$CYGWIN_ROOT_PATH$input_path"
20452    fi
20453  fi
20454
20455  # remove trailing .exe if any
20456  new_path="${new_path/%.exe/}"
20457
20458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20459
20460  # First separate the path from the arguments. This will split at the first
20461  # space.
20462  complete="$FOUND_MAKE"
20463  path="${complete%% *}"
20464  tmp="$complete EOL"
20465  arguments="${tmp#* }"
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  new_path="$path"
20470
20471  windows_path="$new_path"
20472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473    unix_path=`$CYGPATH -u "$windows_path"`
20474    new_path="$unix_path"
20475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20477    new_path="$unix_path"
20478  fi
20479
20480
20481  # Now try to locate executable using which
20482  new_path=`$WHICH "$new_path" 2> /dev/null`
20483
20484  if test "x$new_path" = x; then
20485    # Oops. Which didn't find the executable.
20486    # The splitting of arguments from the executable at a space might have been incorrect,
20487    # since paths with space are more likely in Windows. Give it another try with the whole
20488    # argument.
20489    path="$complete"
20490    arguments="EOL"
20491    new_path="$path"
20492
20493  windows_path="$new_path"
20494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495    unix_path=`$CYGPATH -u "$windows_path"`
20496    new_path="$unix_path"
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499    new_path="$unix_path"
20500  fi
20501
20502
20503    new_path=`$WHICH "$new_path" 2> /dev/null`
20504    # bat and cmd files are not always considered executable in MSYS causing which
20505    # to not find them
20506    if test "x$new_path" = x \
20507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20509      new_path="$path"
20510
20511  windows_path="$new_path"
20512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513    unix_path=`$CYGPATH -u "$windows_path"`
20514    new_path="$unix_path"
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517    new_path="$unix_path"
20518  fi
20519
20520    fi
20521
20522    if test "x$new_path" = x; then
20523      # It's still not found. Now this is an unrecoverable error.
20524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20526      has_space=`$ECHO "$complete" | $GREP " "`
20527      if test "x$has_space" != x; then
20528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20530      fi
20531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20532    fi
20533  fi
20534
20535  # Now new_path has a complete unix path to the binary
20536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20537    # Keep paths in /bin as-is, but remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539    # Do not save /bin paths to all_fixpath_prefixes!
20540  else
20541    # Not in mixed or Windows style, start by that.
20542    new_path=`cmd //c echo $new_path`
20543
20544  input_path="$new_path"
20545  # Check if we need to convert this using DOS-style short mode. If the path
20546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547  # take no chances and rewrite it.
20548  # Note: m4 eats our [], so we need to use [ and ] instead.
20549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550  if test "x$has_forbidden_chars" != x; then
20551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553  fi
20554
20555    # Output is in $new_path
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566    # remove trailing .exe if any
20567    new_path="${new_path/%.exe/}"
20568
20569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20571  fi
20572
20573    else
20574      # We're on a unix platform. Hooray! :)
20575      # First separate the path from the arguments. This will split at the first
20576      # space.
20577      complete="$FOUND_MAKE"
20578      path="${complete%% *}"
20579      tmp="$complete EOL"
20580      arguments="${tmp#* }"
20581
20582      # Cannot rely on the command "which" here since it doesn't always work.
20583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20584      if test -z "$is_absolute_path"; then
20585        # Path to executable is not absolute. Find it.
20586        IFS_save="$IFS"
20587        IFS=:
20588        for p in $PATH; do
20589          if test -f "$p/$path" && test -x "$p/$path"; then
20590            new_path="$p/$path"
20591            break
20592          fi
20593        done
20594        IFS="$IFS_save"
20595      else
20596        # This is an absolute path, we can use it without further modifications.
20597        new_path="$path"
20598      fi
20599
20600      if test "x$new_path" = x; then
20601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20603        has_space=`$ECHO "$complete" | $GREP " "`
20604        if test "x$has_space" != x; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20607        fi
20608        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20609      fi
20610    fi
20611
20612    # Now join together the path and the arguments once again
20613    if test "x$arguments" != xEOL; then
20614      new_complete="$new_path ${arguments% *}"
20615    else
20616      new_complete="$new_path"
20617    fi
20618
20619    if test "x$complete" != "x$new_complete"; then
20620      FOUND_MAKE="$new_complete"
20621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20622$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20623    fi
20624  fi
20625
20626        fi
20627      fi
20628    fi
20629  fi
20630
20631        fi
20632        PATH=$OLD_PATH
20633      fi
20634    fi
20635
20636    if test "x$FOUND_MAKE" = x; then
20637      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
20638    fi
20639
20640    else
20641      # If it succeeded, then it was overridden by the user. We will use it
20642      # for the tool.
20643
20644      # First remove it from the list of overridden variables, so we can test
20645      # for unknown variables in the end.
20646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20647
20648      # Check if we try to supply an empty value
20649      if test "x$MAKE" = x; then
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20651$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20653$as_echo_n "checking for MAKE... " >&6; }
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20655$as_echo "disabled" >&6; }
20656      else
20657        # Check if the provided tool contains a complete path.
20658        tool_specified="$MAKE"
20659        tool_basename="${tool_specified##*/}"
20660        if test "x$tool_basename" = "x$tool_specified"; then
20661          # A command without a complete path is provided, search $PATH.
20662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20663$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20664          # Extract the first word of "$tool_basename", so it can be a program name with args.
20665set dummy $tool_basename; ac_word=$2
20666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20667$as_echo_n "checking for $ac_word... " >&6; }
20668if ${ac_cv_path_MAKE+:} false; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671  case $MAKE in
20672  [\\/]* | ?:[\\/]*)
20673  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20674  ;;
20675  *)
20676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677for as_dir in $PATH
20678do
20679  IFS=$as_save_IFS
20680  test -z "$as_dir" && as_dir=.
20681    for ac_exec_ext in '' $ac_executable_extensions; do
20682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20683    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685    break 2
20686  fi
20687done
20688  done
20689IFS=$as_save_IFS
20690
20691  ;;
20692esac
20693fi
20694MAKE=$ac_cv_path_MAKE
20695if test -n "$MAKE"; then
20696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20697$as_echo "$MAKE" >&6; }
20698else
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700$as_echo "no" >&6; }
20701fi
20702
20703
20704          if test "x$MAKE" = x; then
20705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20706          fi
20707        else
20708          # Otherwise we believe it is a complete path. Use it as it is.
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20710$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20712$as_echo_n "checking for MAKE... " >&6; }
20713          if test ! -x "$tool_specified"; then
20714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20715$as_echo "not found" >&6; }
20716            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20717          fi
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20719$as_echo "$tool_specified" >&6; }
20720        fi
20721      fi
20722    fi
20723
20724    # If MAKE was set by user, verify the version
20725
20726  MAKE_CANDIDATE=""$MAKE""
20727  DESCRIPTION="user supplied MAKE=$MAKE"
20728
20729  # On Cygwin, we require a newer version of make than on other platforms
20730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731    MAKE_VERSION_EXPR="-e 4\."
20732    MAKE_REQUIRED_VERSION="4.0"
20733   else
20734    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20735    MAKE_REQUIRED_VERSION="3.81"
20736  fi
20737
20738  if test "x$MAKE_CANDIDATE" != x; then
20739    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20740$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20741    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20742    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20743    if test "x$IS_GNU_MAKE" = x; then
20744      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20745$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20746    else
20747      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20748      if test "x$IS_MODERN_MAKE" = x; then
20749        { $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
20750$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;}
20751      else
20752        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20753          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754            MAKE_EXPECTED_ENV='cygwin'
20755          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756            MAKE_EXPECTED_ENV='msys'
20757          else
20758            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20759          fi
20760          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20761          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20762        else
20763          # Not relevant for non-Windows
20764          IS_MAKE_CORRECT_ENV=true
20765        fi
20766        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20767          { $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
20768$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;}
20769        else
20770          FOUND_MAKE=$MAKE_CANDIDATE
20771
20772  # Only process if variable expands to non-empty
20773
20774  if test "x$FOUND_MAKE" != x; then
20775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20776
20777  # First separate the path from the arguments. This will split at the first
20778  # space.
20779  complete="$FOUND_MAKE"
20780  path="${complete%% *}"
20781  tmp="$complete EOL"
20782  arguments="${tmp#* }"
20783
20784  # Input might be given as Windows format, start by converting to
20785  # unix format.
20786  new_path=`$CYGPATH -u "$path"`
20787
20788  # Now try to locate executable using which
20789  new_path=`$WHICH "$new_path" 2> /dev/null`
20790  # bat and cmd files are not always considered executable in cygwin causing which
20791  # to not find them
20792  if test "x$new_path" = x \
20793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20795    new_path=`$CYGPATH -u "$path"`
20796  fi
20797  if test "x$new_path" = x; then
20798    # Oops. Which didn't find the executable.
20799    # The splitting of arguments from the executable at a space might have been incorrect,
20800    # since paths with space are more likely in Windows. Give it another try with the whole
20801    # argument.
20802    path="$complete"
20803    arguments="EOL"
20804    new_path=`$CYGPATH -u "$path"`
20805    new_path=`$WHICH "$new_path" 2> /dev/null`
20806    # bat and cmd files are not always considered executable in cygwin causing which
20807    # to not find them
20808    if test "x$new_path" = x \
20809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20811      new_path=`$CYGPATH -u "$path"`
20812    fi
20813    if test "x$new_path" = x; then
20814      # It's still not found. Now this is an unrecoverable error.
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20817      has_space=`$ECHO "$complete" | $GREP " "`
20818      if test "x$has_space" != x; then
20819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20821      fi
20822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20823    fi
20824  fi
20825
20826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829  # "foo.exe" is OK but "foo" is an error.
20830  #
20831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20832  # It is also a way to make sure we got the proper file name for the real test later on.
20833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834  if test "x$test_shortpath" = x; then
20835    # Short path failed, file does not exist as specified.
20836    # Try adding .exe or .cmd
20837    if test -f "${new_path}.exe"; then
20838      input_to_shortpath="${new_path}.exe"
20839    elif test -f "${new_path}.cmd"; then
20840      input_to_shortpath="${new_path}.cmd"
20841    else
20842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847    fi
20848  else
20849    input_to_shortpath="$new_path"
20850  fi
20851
20852  # Call helper function which possibly converts this using DOS-style short mode.
20853  # If so, the updated path is stored in $new_path.
20854  new_path="$input_to_shortpath"
20855
20856  input_path="$input_to_shortpath"
20857  # Check if we need to convert this using DOS-style short mode. If the path
20858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859  # take no chances and rewrite it.
20860  # Note: m4 eats our [], so we need to use [ and ] instead.
20861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862  if test "x$has_forbidden_chars" != x; then
20863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867      # Going to short mode and back again did indeed matter. Since short mode is
20868      # case insensitive, let's make it lowercase to improve readability.
20869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870      # Now convert it back to Unix-style (cygpath)
20871      input_path=`$CYGPATH -u "$shortmode_path"`
20872      new_path="$input_path"
20873    fi
20874  fi
20875
20876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877  if test "x$test_cygdrive_prefix" = x; then
20878    # As a simple fix, exclude /usr/bin since it's not a real path.
20879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881      # a path prefixed by /cygdrive for fixpath to work.
20882      new_path="$CYGWIN_ROOT_PATH$input_path"
20883    fi
20884  fi
20885
20886  # remove trailing .exe if any
20887  new_path="${new_path/%.exe/}"
20888
20889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20890
20891  # First separate the path from the arguments. This will split at the first
20892  # space.
20893  complete="$FOUND_MAKE"
20894  path="${complete%% *}"
20895  tmp="$complete EOL"
20896  arguments="${tmp#* }"
20897
20898  # Input might be given as Windows format, start by converting to
20899  # unix format.
20900  new_path="$path"
20901
20902  windows_path="$new_path"
20903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904    unix_path=`$CYGPATH -u "$windows_path"`
20905    new_path="$unix_path"
20906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908    new_path="$unix_path"
20909  fi
20910
20911
20912  # Now try to locate executable using which
20913  new_path=`$WHICH "$new_path" 2> /dev/null`
20914
20915  if test "x$new_path" = x; then
20916    # Oops. Which didn't find the executable.
20917    # The splitting of arguments from the executable at a space might have been incorrect,
20918    # since paths with space are more likely in Windows. Give it another try with the whole
20919    # argument.
20920    path="$complete"
20921    arguments="EOL"
20922    new_path="$path"
20923
20924  windows_path="$new_path"
20925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926    unix_path=`$CYGPATH -u "$windows_path"`
20927    new_path="$unix_path"
20928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20930    new_path="$unix_path"
20931  fi
20932
20933
20934    new_path=`$WHICH "$new_path" 2> /dev/null`
20935    # bat and cmd files are not always considered executable in MSYS causing which
20936    # to not find them
20937    if test "x$new_path" = x \
20938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20940      new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951    fi
20952
20953    if test "x$new_path" = x; then
20954      # It's still not found. Now this is an unrecoverable error.
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20957      has_space=`$ECHO "$complete" | $GREP " "`
20958      if test "x$has_space" != x; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20961      fi
20962      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20963    fi
20964  fi
20965
20966  # Now new_path has a complete unix path to the binary
20967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20968    # Keep paths in /bin as-is, but remove trailing .exe if any
20969    new_path="${new_path/%.exe/}"
20970    # Do not save /bin paths to all_fixpath_prefixes!
20971  else
20972    # Not in mixed or Windows style, start by that.
20973    new_path=`cmd //c echo $new_path`
20974
20975  input_path="$new_path"
20976  # Check if we need to convert this using DOS-style short mode. If the path
20977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978  # take no chances and rewrite it.
20979  # Note: m4 eats our [], so we need to use [ and ] instead.
20980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20981  if test "x$has_forbidden_chars" != x; then
20982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20984  fi
20985
20986    # Output is in $new_path
20987
20988  windows_path="$new_path"
20989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990    unix_path=`$CYGPATH -u "$windows_path"`
20991    new_path="$unix_path"
20992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20994    new_path="$unix_path"
20995  fi
20996
20997    # remove trailing .exe if any
20998    new_path="${new_path/%.exe/}"
20999
21000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21002  fi
21003
21004    else
21005      # We're on a unix platform. Hooray! :)
21006      # First separate the path from the arguments. This will split at the first
21007      # space.
21008      complete="$FOUND_MAKE"
21009      path="${complete%% *}"
21010      tmp="$complete EOL"
21011      arguments="${tmp#* }"
21012
21013      # Cannot rely on the command "which" here since it doesn't always work.
21014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21015      if test -z "$is_absolute_path"; then
21016        # Path to executable is not absolute. Find it.
21017        IFS_save="$IFS"
21018        IFS=:
21019        for p in $PATH; do
21020          if test -f "$p/$path" && test -x "$p/$path"; then
21021            new_path="$p/$path"
21022            break
21023          fi
21024        done
21025        IFS="$IFS_save"
21026      else
21027        # This is an absolute path, we can use it without further modifications.
21028        new_path="$path"
21029      fi
21030
21031      if test "x$new_path" = x; then
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21034        has_space=`$ECHO "$complete" | $GREP " "`
21035        if test "x$has_space" != x; then
21036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21038        fi
21039        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21040      fi
21041    fi
21042
21043    # Now join together the path and the arguments once again
21044    if test "x$arguments" != xEOL; then
21045      new_complete="$new_path ${arguments% *}"
21046    else
21047      new_complete="$new_path"
21048    fi
21049
21050    if test "x$complete" != "x$new_complete"; then
21051      FOUND_MAKE="$new_complete"
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21053$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21054    fi
21055  fi
21056
21057        fi
21058      fi
21059    fi
21060  fi
21061
21062    if test "x$FOUND_MAKE" = x; then
21063      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21064    fi
21065
21066  fi
21067
21068
21069  MAKE=$FOUND_MAKE
21070
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21072$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21073
21074
21075  # Check if make supports the output sync option and if so, setup using it.
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21077$as_echo_n "checking if make --output-sync is supported... " >&6; }
21078  if $MAKE --version -O > /dev/null 2>&1; then
21079    OUTPUT_SYNC_SUPPORTED=true
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21081$as_echo "yes" >&6; }
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21083$as_echo_n "checking for output-sync value... " >&6; }
21084
21085# Check whether --with-output-sync was given.
21086if test "${with_output_sync+set}" = set; then :
21087  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21088fi
21089
21090    if test "x$OUTPUT_SYNC" = "x"; then
21091      OUTPUT_SYNC=none
21092    fi
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21094$as_echo "$OUTPUT_SYNC" >&6; }
21095    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21096      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21097    fi
21098  else
21099    OUTPUT_SYNC_SUPPORTED=false
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21101$as_echo "no" >&6; }
21102  fi
21103
21104
21105
21106
21107
21108
21109  # Test if find supports -delete
21110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21111$as_echo_n "checking if find supports -delete... " >&6; }
21112  FIND_DELETE="-delete"
21113
21114  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21115
21116  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21117
21118  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21119  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21120    # No, it does not.
21121    $RM $DELETEDIR/TestIfFindSupportsDelete
21122    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21123      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21124      FIND_DELETE="-print | $XARGS $RM"
21125    else
21126      FIND_DELETE="-exec $RM \{\} \+"
21127    fi
21128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21129$as_echo "no" >&6; }
21130  else
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21132$as_echo "yes" >&6; }
21133  fi
21134  $RMDIR $DELETEDIR
21135
21136
21137
21138  # Test which kind of tar was found
21139  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21140    TAR_TYPE="gnu"
21141  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21142    TAR_TYPE="bsd"
21143  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21144    TAR_TYPE="solaris"
21145  fi
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21147$as_echo_n "checking what type of tar was found... " >&6; }
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21149$as_echo "$TAR_TYPE" >&6; }
21150
21151  TAR_CREATE_FILE_PARAM=""
21152
21153  if test "x$TAR_TYPE" = "xgnu"; then
21154    TAR_INCLUDE_PARAM="T"
21155    TAR_SUPPORTS_TRANSFORM="true"
21156    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21157      # When using gnu tar for Solaris targets, need to use compatibility mode
21158      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21159    fi
21160  else
21161    TAR_INCLUDE_PARAM="I"
21162    TAR_SUPPORTS_TRANSFORM="false"
21163  fi
21164
21165
21166
21167
21168
21169
21170  # These tools might not be installed by default,
21171  # need hint on how to install them.
21172
21173
21174
21175  # Publish this variable in the help.
21176
21177
21178  if [ -z "${UNZIP+x}" ]; then
21179    # The variable is not set by user, try to locate tool using the code snippet
21180    for ac_prog in unzip
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_UNZIP+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $UNZIP in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212UNZIP=$ac_cv_path_UNZIP
21213if test -n "$UNZIP"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21215$as_echo "$UNZIP" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$UNZIP" && break
21223done
21224
21225  else
21226    # The variable is set, but is it from the command line or the environment?
21227
21228    # Try to remove the string !UNZIP! from our list.
21229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21231      # If it failed, the variable was not from the command line. Ignore it,
21232      # but warn the user (except for BASH, which is always set by the calling BASH).
21233      if test "xUNZIP" != xBASH; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21235$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21236      fi
21237      # Try to locate tool using the code snippet
21238      for ac_prog in unzip
21239do
21240  # Extract the first word of "$ac_prog", so it can be a program name with args.
21241set dummy $ac_prog; ac_word=$2
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243$as_echo_n "checking for $ac_word... " >&6; }
21244if ${ac_cv_path_UNZIP+:} false; then :
21245  $as_echo_n "(cached) " >&6
21246else
21247  case $UNZIP in
21248  [\\/]* | ?:[\\/]*)
21249  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21250  ;;
21251  *)
21252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253for as_dir in $PATH
21254do
21255  IFS=$as_save_IFS
21256  test -z "$as_dir" && as_dir=.
21257    for ac_exec_ext in '' $ac_executable_extensions; do
21258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261    break 2
21262  fi
21263done
21264  done
21265IFS=$as_save_IFS
21266
21267  ;;
21268esac
21269fi
21270UNZIP=$ac_cv_path_UNZIP
21271if test -n "$UNZIP"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21273$as_echo "$UNZIP" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280  test -n "$UNZIP" && break
21281done
21282
21283    else
21284      # If it succeeded, then it was overridden by the user. We will use it
21285      # for the tool.
21286
21287      # First remove it from the list of overridden variables, so we can test
21288      # for unknown variables in the end.
21289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21290
21291      # Check if we try to supply an empty value
21292      if test "x$UNZIP" = x; then
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21294$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21296$as_echo_n "checking for UNZIP... " >&6; }
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21298$as_echo "disabled" >&6; }
21299      else
21300        # Check if the provided tool contains a complete path.
21301        tool_specified="$UNZIP"
21302        tool_basename="${tool_specified##*/}"
21303        if test "x$tool_basename" = "x$tool_specified"; then
21304          # A command without a complete path is provided, search $PATH.
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21306$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21307          # Extract the first word of "$tool_basename", so it can be a program name with args.
21308set dummy $tool_basename; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_UNZIP+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $UNZIP in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337UNZIP=$ac_cv_path_UNZIP
21338if test -n "$UNZIP"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21340$as_echo "$UNZIP" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347          if test "x$UNZIP" = x; then
21348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21349          fi
21350        else
21351          # Otherwise we believe it is a complete path. Use it as it is.
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21353$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21355$as_echo_n "checking for UNZIP... " >&6; }
21356          if test ! -x "$tool_specified"; then
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21358$as_echo "not found" >&6; }
21359            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21360          fi
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21362$as_echo "$tool_specified" >&6; }
21363        fi
21364      fi
21365    fi
21366
21367  fi
21368
21369
21370
21371  if test "x$UNZIP" = x; then
21372    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21373  fi
21374
21375
21376
21377
21378
21379  # Publish this variable in the help.
21380
21381
21382  if [ -z "${ZIP+x}" ]; then
21383    # The variable is not set by user, try to locate tool using the code snippet
21384    for ac_prog in zip
21385do
21386  # Extract the first word of "$ac_prog", so it can be a program name with args.
21387set dummy $ac_prog; ac_word=$2
21388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21389$as_echo_n "checking for $ac_word... " >&6; }
21390if ${ac_cv_path_ZIP+:} false; then :
21391  $as_echo_n "(cached) " >&6
21392else
21393  case $ZIP in
21394  [\\/]* | ?:[\\/]*)
21395  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21396  ;;
21397  *)
21398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21399for as_dir in $PATH
21400do
21401  IFS=$as_save_IFS
21402  test -z "$as_dir" && as_dir=.
21403    for ac_exec_ext in '' $ac_executable_extensions; do
21404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21405    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21407    break 2
21408  fi
21409done
21410  done
21411IFS=$as_save_IFS
21412
21413  ;;
21414esac
21415fi
21416ZIP=$ac_cv_path_ZIP
21417if test -n "$ZIP"; then
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21419$as_echo "$ZIP" >&6; }
21420else
21421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21422$as_echo "no" >&6; }
21423fi
21424
21425
21426  test -n "$ZIP" && break
21427done
21428
21429  else
21430    # The variable is set, but is it from the command line or the environment?
21431
21432    # Try to remove the string !ZIP! from our list.
21433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21435      # If it failed, the variable was not from the command line. Ignore it,
21436      # but warn the user (except for BASH, which is always set by the calling BASH).
21437      if test "xZIP" != xBASH; then
21438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21439$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21440      fi
21441      # Try to locate tool using the code snippet
21442      for ac_prog in zip
21443do
21444  # Extract the first word of "$ac_prog", so it can be a program name with args.
21445set dummy $ac_prog; ac_word=$2
21446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21447$as_echo_n "checking for $ac_word... " >&6; }
21448if ${ac_cv_path_ZIP+:} false; then :
21449  $as_echo_n "(cached) " >&6
21450else
21451  case $ZIP in
21452  [\\/]* | ?:[\\/]*)
21453  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21454  ;;
21455  *)
21456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21457for as_dir in $PATH
21458do
21459  IFS=$as_save_IFS
21460  test -z "$as_dir" && as_dir=.
21461    for ac_exec_ext in '' $ac_executable_extensions; do
21462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21463    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21465    break 2
21466  fi
21467done
21468  done
21469IFS=$as_save_IFS
21470
21471  ;;
21472esac
21473fi
21474ZIP=$ac_cv_path_ZIP
21475if test -n "$ZIP"; then
21476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21477$as_echo "$ZIP" >&6; }
21478else
21479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21480$as_echo "no" >&6; }
21481fi
21482
21483
21484  test -n "$ZIP" && break
21485done
21486
21487    else
21488      # If it succeeded, then it was overridden by the user. We will use it
21489      # for the tool.
21490
21491      # First remove it from the list of overridden variables, so we can test
21492      # for unknown variables in the end.
21493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21494
21495      # Check if we try to supply an empty value
21496      if test "x$ZIP" = x; then
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21498$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21500$as_echo_n "checking for ZIP... " >&6; }
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21502$as_echo "disabled" >&6; }
21503      else
21504        # Check if the provided tool contains a complete path.
21505        tool_specified="$ZIP"
21506        tool_basename="${tool_specified##*/}"
21507        if test "x$tool_basename" = "x$tool_specified"; then
21508          # A command without a complete path is provided, search $PATH.
21509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21510$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21511          # Extract the first word of "$tool_basename", so it can be a program name with args.
21512set dummy $tool_basename; ac_word=$2
21513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21514$as_echo_n "checking for $ac_word... " >&6; }
21515if ${ac_cv_path_ZIP+:} false; then :
21516  $as_echo_n "(cached) " >&6
21517else
21518  case $ZIP in
21519  [\\/]* | ?:[\\/]*)
21520  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21521  ;;
21522  *)
21523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21524for as_dir in $PATH
21525do
21526  IFS=$as_save_IFS
21527  test -z "$as_dir" && as_dir=.
21528    for ac_exec_ext in '' $ac_executable_extensions; do
21529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21530    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21532    break 2
21533  fi
21534done
21535  done
21536IFS=$as_save_IFS
21537
21538  ;;
21539esac
21540fi
21541ZIP=$ac_cv_path_ZIP
21542if test -n "$ZIP"; then
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21544$as_echo "$ZIP" >&6; }
21545else
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547$as_echo "no" >&6; }
21548fi
21549
21550
21551          if test "x$ZIP" = x; then
21552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21553          fi
21554        else
21555          # Otherwise we believe it is a complete path. Use it as it is.
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21557$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21559$as_echo_n "checking for ZIP... " >&6; }
21560          if test ! -x "$tool_specified"; then
21561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21562$as_echo "not found" >&6; }
21563            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21564          fi
21565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21566$as_echo "$tool_specified" >&6; }
21567        fi
21568      fi
21569    fi
21570
21571  fi
21572
21573
21574
21575  if test "x$ZIP" = x; then
21576    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21577  fi
21578
21579
21580
21581  # Non-required basic tools
21582
21583
21584
21585  # Publish this variable in the help.
21586
21587
21588  if [ -z "${LDD+x}" ]; then
21589    # The variable is not set by user, try to locate tool using the code snippet
21590    for ac_prog in ldd
21591do
21592  # Extract the first word of "$ac_prog", so it can be a program name with args.
21593set dummy $ac_prog; ac_word=$2
21594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21595$as_echo_n "checking for $ac_word... " >&6; }
21596if ${ac_cv_path_LDD+:} false; then :
21597  $as_echo_n "(cached) " >&6
21598else
21599  case $LDD in
21600  [\\/]* | ?:[\\/]*)
21601  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21602  ;;
21603  *)
21604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21605for as_dir in $PATH
21606do
21607  IFS=$as_save_IFS
21608  test -z "$as_dir" && as_dir=.
21609    for ac_exec_ext in '' $ac_executable_extensions; do
21610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21611    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21613    break 2
21614  fi
21615done
21616  done
21617IFS=$as_save_IFS
21618
21619  ;;
21620esac
21621fi
21622LDD=$ac_cv_path_LDD
21623if test -n "$LDD"; then
21624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21625$as_echo "$LDD" >&6; }
21626else
21627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21628$as_echo "no" >&6; }
21629fi
21630
21631
21632  test -n "$LDD" && break
21633done
21634
21635  else
21636    # The variable is set, but is it from the command line or the environment?
21637
21638    # Try to remove the string !LDD! from our list.
21639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21641      # If it failed, the variable was not from the command line. Ignore it,
21642      # but warn the user (except for BASH, which is always set by the calling BASH).
21643      if test "xLDD" != xBASH; then
21644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21645$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21646      fi
21647      # Try to locate tool using the code snippet
21648      for ac_prog in ldd
21649do
21650  # Extract the first word of "$ac_prog", so it can be a program name with args.
21651set dummy $ac_prog; ac_word=$2
21652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21653$as_echo_n "checking for $ac_word... " >&6; }
21654if ${ac_cv_path_LDD+:} false; then :
21655  $as_echo_n "(cached) " >&6
21656else
21657  case $LDD in
21658  [\\/]* | ?:[\\/]*)
21659  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21660  ;;
21661  *)
21662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21663for as_dir in $PATH
21664do
21665  IFS=$as_save_IFS
21666  test -z "$as_dir" && as_dir=.
21667    for ac_exec_ext in '' $ac_executable_extensions; do
21668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21669    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21671    break 2
21672  fi
21673done
21674  done
21675IFS=$as_save_IFS
21676
21677  ;;
21678esac
21679fi
21680LDD=$ac_cv_path_LDD
21681if test -n "$LDD"; then
21682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21683$as_echo "$LDD" >&6; }
21684else
21685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21686$as_echo "no" >&6; }
21687fi
21688
21689
21690  test -n "$LDD" && break
21691done
21692
21693    else
21694      # If it succeeded, then it was overridden by the user. We will use it
21695      # for the tool.
21696
21697      # First remove it from the list of overridden variables, so we can test
21698      # for unknown variables in the end.
21699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21700
21701      # Check if we try to supply an empty value
21702      if test "x$LDD" = x; then
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21704$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21706$as_echo_n "checking for LDD... " >&6; }
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21708$as_echo "disabled" >&6; }
21709      else
21710        # Check if the provided tool contains a complete path.
21711        tool_specified="$LDD"
21712        tool_basename="${tool_specified##*/}"
21713        if test "x$tool_basename" = "x$tool_specified"; then
21714          # A command without a complete path is provided, search $PATH.
21715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21716$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21717          # Extract the first word of "$tool_basename", so it can be a program name with args.
21718set dummy $tool_basename; ac_word=$2
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21720$as_echo_n "checking for $ac_word... " >&6; }
21721if ${ac_cv_path_LDD+:} false; then :
21722  $as_echo_n "(cached) " >&6
21723else
21724  case $LDD in
21725  [\\/]* | ?:[\\/]*)
21726  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21727  ;;
21728  *)
21729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21730for as_dir in $PATH
21731do
21732  IFS=$as_save_IFS
21733  test -z "$as_dir" && as_dir=.
21734    for ac_exec_ext in '' $ac_executable_extensions; do
21735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21736    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21738    break 2
21739  fi
21740done
21741  done
21742IFS=$as_save_IFS
21743
21744  ;;
21745esac
21746fi
21747LDD=$ac_cv_path_LDD
21748if test -n "$LDD"; then
21749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21750$as_echo "$LDD" >&6; }
21751else
21752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21753$as_echo "no" >&6; }
21754fi
21755
21756
21757          if test "x$LDD" = x; then
21758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21759          fi
21760        else
21761          # Otherwise we believe it is a complete path. Use it as it is.
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21763$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21765$as_echo_n "checking for LDD... " >&6; }
21766          if test ! -x "$tool_specified"; then
21767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21768$as_echo "not found" >&6; }
21769            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21770          fi
21771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21772$as_echo "$tool_specified" >&6; }
21773        fi
21774      fi
21775    fi
21776
21777  fi
21778
21779
21780  if test "x$LDD" = "x"; then
21781    # List shared lib dependencies is used for
21782    # debug output and checking for forbidden dependencies.
21783    # We can build without it.
21784    LDD="true"
21785  fi
21786
21787
21788  # Publish this variable in the help.
21789
21790
21791  if [ -z "${OTOOL+x}" ]; then
21792    # The variable is not set by user, try to locate tool using the code snippet
21793    for ac_prog in otool
21794do
21795  # Extract the first word of "$ac_prog", so it can be a program name with args.
21796set dummy $ac_prog; ac_word=$2
21797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798$as_echo_n "checking for $ac_word... " >&6; }
21799if ${ac_cv_path_OTOOL+:} false; then :
21800  $as_echo_n "(cached) " >&6
21801else
21802  case $OTOOL in
21803  [\\/]* | ?:[\\/]*)
21804  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21805  ;;
21806  *)
21807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808for as_dir in $PATH
21809do
21810  IFS=$as_save_IFS
21811  test -z "$as_dir" && as_dir=.
21812    for ac_exec_ext in '' $ac_executable_extensions; do
21813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816    break 2
21817  fi
21818done
21819  done
21820IFS=$as_save_IFS
21821
21822  ;;
21823esac
21824fi
21825OTOOL=$ac_cv_path_OTOOL
21826if test -n "$OTOOL"; then
21827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21828$as_echo "$OTOOL" >&6; }
21829else
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831$as_echo "no" >&6; }
21832fi
21833
21834
21835  test -n "$OTOOL" && break
21836done
21837
21838  else
21839    # The variable is set, but is it from the command line or the environment?
21840
21841    # Try to remove the string !OTOOL! from our list.
21842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21844      # If it failed, the variable was not from the command line. Ignore it,
21845      # but warn the user (except for BASH, which is always set by the calling BASH).
21846      if test "xOTOOL" != xBASH; then
21847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21848$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21849      fi
21850      # Try to locate tool using the code snippet
21851      for ac_prog in otool
21852do
21853  # Extract the first word of "$ac_prog", so it can be a program name with args.
21854set dummy $ac_prog; ac_word=$2
21855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21856$as_echo_n "checking for $ac_word... " >&6; }
21857if ${ac_cv_path_OTOOL+:} false; then :
21858  $as_echo_n "(cached) " >&6
21859else
21860  case $OTOOL in
21861  [\\/]* | ?:[\\/]*)
21862  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21863  ;;
21864  *)
21865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21866for as_dir in $PATH
21867do
21868  IFS=$as_save_IFS
21869  test -z "$as_dir" && as_dir=.
21870    for ac_exec_ext in '' $ac_executable_extensions; do
21871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21872    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21874    break 2
21875  fi
21876done
21877  done
21878IFS=$as_save_IFS
21879
21880  ;;
21881esac
21882fi
21883OTOOL=$ac_cv_path_OTOOL
21884if test -n "$OTOOL"; then
21885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21886$as_echo "$OTOOL" >&6; }
21887else
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21889$as_echo "no" >&6; }
21890fi
21891
21892
21893  test -n "$OTOOL" && break
21894done
21895
21896    else
21897      # If it succeeded, then it was overridden by the user. We will use it
21898      # for the tool.
21899
21900      # First remove it from the list of overridden variables, so we can test
21901      # for unknown variables in the end.
21902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21903
21904      # Check if we try to supply an empty value
21905      if test "x$OTOOL" = x; then
21906        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21907$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21909$as_echo_n "checking for OTOOL... " >&6; }
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21911$as_echo "disabled" >&6; }
21912      else
21913        # Check if the provided tool contains a complete path.
21914        tool_specified="$OTOOL"
21915        tool_basename="${tool_specified##*/}"
21916        if test "x$tool_basename" = "x$tool_specified"; then
21917          # A command without a complete path is provided, search $PATH.
21918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21919$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21920          # Extract the first word of "$tool_basename", so it can be a program name with args.
21921set dummy $tool_basename; ac_word=$2
21922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21923$as_echo_n "checking for $ac_word... " >&6; }
21924if ${ac_cv_path_OTOOL+:} false; then :
21925  $as_echo_n "(cached) " >&6
21926else
21927  case $OTOOL in
21928  [\\/]* | ?:[\\/]*)
21929  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21930  ;;
21931  *)
21932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21933for as_dir in $PATH
21934do
21935  IFS=$as_save_IFS
21936  test -z "$as_dir" && as_dir=.
21937    for ac_exec_ext in '' $ac_executable_extensions; do
21938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21939    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21941    break 2
21942  fi
21943done
21944  done
21945IFS=$as_save_IFS
21946
21947  ;;
21948esac
21949fi
21950OTOOL=$ac_cv_path_OTOOL
21951if test -n "$OTOOL"; then
21952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21953$as_echo "$OTOOL" >&6; }
21954else
21955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21956$as_echo "no" >&6; }
21957fi
21958
21959
21960          if test "x$OTOOL" = x; then
21961            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21962          fi
21963        else
21964          # Otherwise we believe it is a complete path. Use it as it is.
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21966$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21968$as_echo_n "checking for OTOOL... " >&6; }
21969          if test ! -x "$tool_specified"; then
21970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21971$as_echo "not found" >&6; }
21972            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21973          fi
21974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21975$as_echo "$tool_specified" >&6; }
21976        fi
21977      fi
21978    fi
21979
21980  fi
21981
21982
21983  if test "x$OTOOL" = "x"; then
21984    OTOOL="true"
21985  fi
21986
21987
21988  # Publish this variable in the help.
21989
21990
21991  if [ -z "${READELF+x}" ]; then
21992    # The variable is not set by user, try to locate tool using the code snippet
21993    for ac_prog in greadelf readelf
21994do
21995  # Extract the first word of "$ac_prog", so it can be a program name with args.
21996set dummy $ac_prog; ac_word=$2
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21998$as_echo_n "checking for $ac_word... " >&6; }
21999if ${ac_cv_path_READELF+:} false; then :
22000  $as_echo_n "(cached) " >&6
22001else
22002  case $READELF in
22003  [\\/]* | ?:[\\/]*)
22004  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22005  ;;
22006  *)
22007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008for as_dir in $PATH
22009do
22010  IFS=$as_save_IFS
22011  test -z "$as_dir" && as_dir=.
22012    for ac_exec_ext in '' $ac_executable_extensions; do
22013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016    break 2
22017  fi
22018done
22019  done
22020IFS=$as_save_IFS
22021
22022  ;;
22023esac
22024fi
22025READELF=$ac_cv_path_READELF
22026if test -n "$READELF"; then
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22028$as_echo "$READELF" >&6; }
22029else
22030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031$as_echo "no" >&6; }
22032fi
22033
22034
22035  test -n "$READELF" && break
22036done
22037
22038  else
22039    # The variable is set, but is it from the command line or the environment?
22040
22041    # Try to remove the string !READELF! from our list.
22042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22044      # If it failed, the variable was not from the command line. Ignore it,
22045      # but warn the user (except for BASH, which is always set by the calling BASH).
22046      if test "xREADELF" != xBASH; then
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22048$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22049      fi
22050      # Try to locate tool using the code snippet
22051      for ac_prog in greadelf readelf
22052do
22053  # Extract the first word of "$ac_prog", so it can be a program name with args.
22054set dummy $ac_prog; ac_word=$2
22055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22056$as_echo_n "checking for $ac_word... " >&6; }
22057if ${ac_cv_path_READELF+:} false; then :
22058  $as_echo_n "(cached) " >&6
22059else
22060  case $READELF in
22061  [\\/]* | ?:[\\/]*)
22062  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22063  ;;
22064  *)
22065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066for as_dir in $PATH
22067do
22068  IFS=$as_save_IFS
22069  test -z "$as_dir" && as_dir=.
22070    for ac_exec_ext in '' $ac_executable_extensions; do
22071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22072    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074    break 2
22075  fi
22076done
22077  done
22078IFS=$as_save_IFS
22079
22080  ;;
22081esac
22082fi
22083READELF=$ac_cv_path_READELF
22084if test -n "$READELF"; then
22085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22086$as_echo "$READELF" >&6; }
22087else
22088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089$as_echo "no" >&6; }
22090fi
22091
22092
22093  test -n "$READELF" && break
22094done
22095
22096    else
22097      # If it succeeded, then it was overridden by the user. We will use it
22098      # for the tool.
22099
22100      # First remove it from the list of overridden variables, so we can test
22101      # for unknown variables in the end.
22102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22103
22104      # Check if we try to supply an empty value
22105      if test "x$READELF" = x; then
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22107$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22109$as_echo_n "checking for READELF... " >&6; }
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22111$as_echo "disabled" >&6; }
22112      else
22113        # Check if the provided tool contains a complete path.
22114        tool_specified="$READELF"
22115        tool_basename="${tool_specified##*/}"
22116        if test "x$tool_basename" = "x$tool_specified"; then
22117          # A command without a complete path is provided, search $PATH.
22118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22119$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22120          # Extract the first word of "$tool_basename", so it can be a program name with args.
22121set dummy $tool_basename; ac_word=$2
22122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123$as_echo_n "checking for $ac_word... " >&6; }
22124if ${ac_cv_path_READELF+:} false; then :
22125  $as_echo_n "(cached) " >&6
22126else
22127  case $READELF in
22128  [\\/]* | ?:[\\/]*)
22129  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22130  ;;
22131  *)
22132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22133for as_dir in $PATH
22134do
22135  IFS=$as_save_IFS
22136  test -z "$as_dir" && as_dir=.
22137    for ac_exec_ext in '' $ac_executable_extensions; do
22138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22139    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22141    break 2
22142  fi
22143done
22144  done
22145IFS=$as_save_IFS
22146
22147  ;;
22148esac
22149fi
22150READELF=$ac_cv_path_READELF
22151if test -n "$READELF"; then
22152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22153$as_echo "$READELF" >&6; }
22154else
22155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22156$as_echo "no" >&6; }
22157fi
22158
22159
22160          if test "x$READELF" = x; then
22161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22162          fi
22163        else
22164          # Otherwise we believe it is a complete path. Use it as it is.
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22166$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22168$as_echo_n "checking for READELF... " >&6; }
22169          if test ! -x "$tool_specified"; then
22170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22171$as_echo "not found" >&6; }
22172            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22173          fi
22174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22175$as_echo "$tool_specified" >&6; }
22176        fi
22177      fi
22178    fi
22179
22180  fi
22181
22182
22183
22184
22185  # Publish this variable in the help.
22186
22187
22188  if [ -z "${HG+x}" ]; then
22189    # The variable is not set by user, try to locate tool using the code snippet
22190    for ac_prog in hg
22191do
22192  # Extract the first word of "$ac_prog", so it can be a program name with args.
22193set dummy $ac_prog; ac_word=$2
22194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22195$as_echo_n "checking for $ac_word... " >&6; }
22196if ${ac_cv_path_HG+:} false; then :
22197  $as_echo_n "(cached) " >&6
22198else
22199  case $HG in
22200  [\\/]* | ?:[\\/]*)
22201  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22202  ;;
22203  *)
22204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22205for as_dir in $PATH
22206do
22207  IFS=$as_save_IFS
22208  test -z "$as_dir" && as_dir=.
22209    for ac_exec_ext in '' $ac_executable_extensions; do
22210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22211    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22213    break 2
22214  fi
22215done
22216  done
22217IFS=$as_save_IFS
22218
22219  ;;
22220esac
22221fi
22222HG=$ac_cv_path_HG
22223if test -n "$HG"; then
22224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22225$as_echo "$HG" >&6; }
22226else
22227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22228$as_echo "no" >&6; }
22229fi
22230
22231
22232  test -n "$HG" && break
22233done
22234
22235  else
22236    # The variable is set, but is it from the command line or the environment?
22237
22238    # Try to remove the string !HG! from our list.
22239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22241      # If it failed, the variable was not from the command line. Ignore it,
22242      # but warn the user (except for BASH, which is always set by the calling BASH).
22243      if test "xHG" != xBASH; then
22244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22245$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22246      fi
22247      # Try to locate tool using the code snippet
22248      for ac_prog in hg
22249do
22250  # Extract the first word of "$ac_prog", so it can be a program name with args.
22251set dummy $ac_prog; ac_word=$2
22252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22253$as_echo_n "checking for $ac_word... " >&6; }
22254if ${ac_cv_path_HG+:} false; then :
22255  $as_echo_n "(cached) " >&6
22256else
22257  case $HG in
22258  [\\/]* | ?:[\\/]*)
22259  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22260  ;;
22261  *)
22262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22263for as_dir in $PATH
22264do
22265  IFS=$as_save_IFS
22266  test -z "$as_dir" && as_dir=.
22267    for ac_exec_ext in '' $ac_executable_extensions; do
22268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22269    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22271    break 2
22272  fi
22273done
22274  done
22275IFS=$as_save_IFS
22276
22277  ;;
22278esac
22279fi
22280HG=$ac_cv_path_HG
22281if test -n "$HG"; then
22282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22283$as_echo "$HG" >&6; }
22284else
22285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22286$as_echo "no" >&6; }
22287fi
22288
22289
22290  test -n "$HG" && break
22291done
22292
22293    else
22294      # If it succeeded, then it was overridden by the user. We will use it
22295      # for the tool.
22296
22297      # First remove it from the list of overridden variables, so we can test
22298      # for unknown variables in the end.
22299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22300
22301      # Check if we try to supply an empty value
22302      if test "x$HG" = x; then
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22304$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22306$as_echo_n "checking for HG... " >&6; }
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22308$as_echo "disabled" >&6; }
22309      else
22310        # Check if the provided tool contains a complete path.
22311        tool_specified="$HG"
22312        tool_basename="${tool_specified##*/}"
22313        if test "x$tool_basename" = "x$tool_specified"; then
22314          # A command without a complete path is provided, search $PATH.
22315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22316$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22317          # Extract the first word of "$tool_basename", so it can be a program name with args.
22318set dummy $tool_basename; ac_word=$2
22319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22320$as_echo_n "checking for $ac_word... " >&6; }
22321if ${ac_cv_path_HG+:} false; then :
22322  $as_echo_n "(cached) " >&6
22323else
22324  case $HG in
22325  [\\/]* | ?:[\\/]*)
22326  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22327  ;;
22328  *)
22329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22330for as_dir in $PATH
22331do
22332  IFS=$as_save_IFS
22333  test -z "$as_dir" && as_dir=.
22334    for ac_exec_ext in '' $ac_executable_extensions; do
22335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22336    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22338    break 2
22339  fi
22340done
22341  done
22342IFS=$as_save_IFS
22343
22344  ;;
22345esac
22346fi
22347HG=$ac_cv_path_HG
22348if test -n "$HG"; then
22349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22350$as_echo "$HG" >&6; }
22351else
22352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22353$as_echo "no" >&6; }
22354fi
22355
22356
22357          if test "x$HG" = x; then
22358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22359          fi
22360        else
22361          # Otherwise we believe it is a complete path. Use it as it is.
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22363$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22365$as_echo_n "checking for HG... " >&6; }
22366          if test ! -x "$tool_specified"; then
22367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22368$as_echo "not found" >&6; }
22369            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22370          fi
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22372$as_echo "$tool_specified" >&6; }
22373        fi
22374      fi
22375    fi
22376
22377  fi
22378
22379
22380
22381
22382  # Publish this variable in the help.
22383
22384
22385  if [ -z "${STAT+x}" ]; then
22386    # The variable is not set by user, try to locate tool using the code snippet
22387    for ac_prog in stat
22388do
22389  # Extract the first word of "$ac_prog", so it can be a program name with args.
22390set dummy $ac_prog; ac_word=$2
22391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22392$as_echo_n "checking for $ac_word... " >&6; }
22393if ${ac_cv_path_STAT+:} false; then :
22394  $as_echo_n "(cached) " >&6
22395else
22396  case $STAT in
22397  [\\/]* | ?:[\\/]*)
22398  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22399  ;;
22400  *)
22401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22402for as_dir in $PATH
22403do
22404  IFS=$as_save_IFS
22405  test -z "$as_dir" && as_dir=.
22406    for ac_exec_ext in '' $ac_executable_extensions; do
22407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22408    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22410    break 2
22411  fi
22412done
22413  done
22414IFS=$as_save_IFS
22415
22416  ;;
22417esac
22418fi
22419STAT=$ac_cv_path_STAT
22420if test -n "$STAT"; then
22421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22422$as_echo "$STAT" >&6; }
22423else
22424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425$as_echo "no" >&6; }
22426fi
22427
22428
22429  test -n "$STAT" && break
22430done
22431
22432  else
22433    # The variable is set, but is it from the command line or the environment?
22434
22435    # Try to remove the string !STAT! from our list.
22436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22438      # If it failed, the variable was not from the command line. Ignore it,
22439      # but warn the user (except for BASH, which is always set by the calling BASH).
22440      if test "xSTAT" != xBASH; then
22441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22442$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22443      fi
22444      # Try to locate tool using the code snippet
22445      for ac_prog in stat
22446do
22447  # Extract the first word of "$ac_prog", so it can be a program name with args.
22448set dummy $ac_prog; ac_word=$2
22449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22450$as_echo_n "checking for $ac_word... " >&6; }
22451if ${ac_cv_path_STAT+:} false; then :
22452  $as_echo_n "(cached) " >&6
22453else
22454  case $STAT in
22455  [\\/]* | ?:[\\/]*)
22456  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22457  ;;
22458  *)
22459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22460for as_dir in $PATH
22461do
22462  IFS=$as_save_IFS
22463  test -z "$as_dir" && as_dir=.
22464    for ac_exec_ext in '' $ac_executable_extensions; do
22465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22466    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22468    break 2
22469  fi
22470done
22471  done
22472IFS=$as_save_IFS
22473
22474  ;;
22475esac
22476fi
22477STAT=$ac_cv_path_STAT
22478if test -n "$STAT"; then
22479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22480$as_echo "$STAT" >&6; }
22481else
22482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22483$as_echo "no" >&6; }
22484fi
22485
22486
22487  test -n "$STAT" && break
22488done
22489
22490    else
22491      # If it succeeded, then it was overridden by the user. We will use it
22492      # for the tool.
22493
22494      # First remove it from the list of overridden variables, so we can test
22495      # for unknown variables in the end.
22496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22497
22498      # Check if we try to supply an empty value
22499      if test "x$STAT" = x; then
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22501$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22503$as_echo_n "checking for STAT... " >&6; }
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22505$as_echo "disabled" >&6; }
22506      else
22507        # Check if the provided tool contains a complete path.
22508        tool_specified="$STAT"
22509        tool_basename="${tool_specified##*/}"
22510        if test "x$tool_basename" = "x$tool_specified"; then
22511          # A command without a complete path is provided, search $PATH.
22512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22513$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22514          # Extract the first word of "$tool_basename", so it can be a program name with args.
22515set dummy $tool_basename; ac_word=$2
22516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22517$as_echo_n "checking for $ac_word... " >&6; }
22518if ${ac_cv_path_STAT+:} false; then :
22519  $as_echo_n "(cached) " >&6
22520else
22521  case $STAT in
22522  [\\/]* | ?:[\\/]*)
22523  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22524  ;;
22525  *)
22526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22527for as_dir in $PATH
22528do
22529  IFS=$as_save_IFS
22530  test -z "$as_dir" && as_dir=.
22531    for ac_exec_ext in '' $ac_executable_extensions; do
22532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22533    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22535    break 2
22536  fi
22537done
22538  done
22539IFS=$as_save_IFS
22540
22541  ;;
22542esac
22543fi
22544STAT=$ac_cv_path_STAT
22545if test -n "$STAT"; then
22546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22547$as_echo "$STAT" >&6; }
22548else
22549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22550$as_echo "no" >&6; }
22551fi
22552
22553
22554          if test "x$STAT" = x; then
22555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22556          fi
22557        else
22558          # Otherwise we believe it is a complete path. Use it as it is.
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22560$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22562$as_echo_n "checking for STAT... " >&6; }
22563          if test ! -x "$tool_specified"; then
22564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22565$as_echo "not found" >&6; }
22566            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22567          fi
22568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22569$as_echo "$tool_specified" >&6; }
22570        fi
22571      fi
22572    fi
22573
22574  fi
22575
22576
22577
22578
22579  # Publish this variable in the help.
22580
22581
22582  if [ -z "${TIME+x}" ]; then
22583    # The variable is not set by user, try to locate tool using the code snippet
22584    for ac_prog in time
22585do
22586  # Extract the first word of "$ac_prog", so it can be a program name with args.
22587set dummy $ac_prog; ac_word=$2
22588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22589$as_echo_n "checking for $ac_word... " >&6; }
22590if ${ac_cv_path_TIME+:} false; then :
22591  $as_echo_n "(cached) " >&6
22592else
22593  case $TIME in
22594  [\\/]* | ?:[\\/]*)
22595  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22596  ;;
22597  *)
22598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599for as_dir in $PATH
22600do
22601  IFS=$as_save_IFS
22602  test -z "$as_dir" && as_dir=.
22603    for ac_exec_ext in '' $ac_executable_extensions; do
22604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22607    break 2
22608  fi
22609done
22610  done
22611IFS=$as_save_IFS
22612
22613  ;;
22614esac
22615fi
22616TIME=$ac_cv_path_TIME
22617if test -n "$TIME"; then
22618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22619$as_echo "$TIME" >&6; }
22620else
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22622$as_echo "no" >&6; }
22623fi
22624
22625
22626  test -n "$TIME" && break
22627done
22628
22629  else
22630    # The variable is set, but is it from the command line or the environment?
22631
22632    # Try to remove the string !TIME! from our list.
22633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22635      # If it failed, the variable was not from the command line. Ignore it,
22636      # but warn the user (except for BASH, which is always set by the calling BASH).
22637      if test "xTIME" != xBASH; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22639$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22640      fi
22641      # Try to locate tool using the code snippet
22642      for ac_prog in time
22643do
22644  # Extract the first word of "$ac_prog", so it can be a program name with args.
22645set dummy $ac_prog; ac_word=$2
22646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22647$as_echo_n "checking for $ac_word... " >&6; }
22648if ${ac_cv_path_TIME+:} false; then :
22649  $as_echo_n "(cached) " >&6
22650else
22651  case $TIME in
22652  [\\/]* | ?:[\\/]*)
22653  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22654  ;;
22655  *)
22656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22657for as_dir in $PATH
22658do
22659  IFS=$as_save_IFS
22660  test -z "$as_dir" && as_dir=.
22661    for ac_exec_ext in '' $ac_executable_extensions; do
22662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22663    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22665    break 2
22666  fi
22667done
22668  done
22669IFS=$as_save_IFS
22670
22671  ;;
22672esac
22673fi
22674TIME=$ac_cv_path_TIME
22675if test -n "$TIME"; then
22676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22677$as_echo "$TIME" >&6; }
22678else
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22680$as_echo "no" >&6; }
22681fi
22682
22683
22684  test -n "$TIME" && break
22685done
22686
22687    else
22688      # If it succeeded, then it was overridden by the user. We will use it
22689      # for the tool.
22690
22691      # First remove it from the list of overridden variables, so we can test
22692      # for unknown variables in the end.
22693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22694
22695      # Check if we try to supply an empty value
22696      if test "x$TIME" = x; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22698$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22700$as_echo_n "checking for TIME... " >&6; }
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22702$as_echo "disabled" >&6; }
22703      else
22704        # Check if the provided tool contains a complete path.
22705        tool_specified="$TIME"
22706        tool_basename="${tool_specified##*/}"
22707        if test "x$tool_basename" = "x$tool_specified"; then
22708          # A command without a complete path is provided, search $PATH.
22709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22710$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22711          # Extract the first word of "$tool_basename", so it can be a program name with args.
22712set dummy $tool_basename; ac_word=$2
22713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22714$as_echo_n "checking for $ac_word... " >&6; }
22715if ${ac_cv_path_TIME+:} false; then :
22716  $as_echo_n "(cached) " >&6
22717else
22718  case $TIME in
22719  [\\/]* | ?:[\\/]*)
22720  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22721  ;;
22722  *)
22723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22724for as_dir in $PATH
22725do
22726  IFS=$as_save_IFS
22727  test -z "$as_dir" && as_dir=.
22728    for ac_exec_ext in '' $ac_executable_extensions; do
22729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22730    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22732    break 2
22733  fi
22734done
22735  done
22736IFS=$as_save_IFS
22737
22738  ;;
22739esac
22740fi
22741TIME=$ac_cv_path_TIME
22742if test -n "$TIME"; then
22743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22744$as_echo "$TIME" >&6; }
22745else
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22747$as_echo "no" >&6; }
22748fi
22749
22750
22751          if test "x$TIME" = x; then
22752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22753          fi
22754        else
22755          # Otherwise we believe it is a complete path. Use it as it is.
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22757$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22759$as_echo_n "checking for TIME... " >&6; }
22760          if test ! -x "$tool_specified"; then
22761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22762$as_echo "not found" >&6; }
22763            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22764          fi
22765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22766$as_echo "$tool_specified" >&6; }
22767        fi
22768      fi
22769    fi
22770
22771  fi
22772
22773
22774  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22775  # be in the user path.
22776
22777
22778  # Publish this variable in the help.
22779
22780
22781  if [ -z "${DTRACE+x}" ]; then
22782    # The variable is not set by user, try to locate tool using the code snippet
22783    for ac_prog in dtrace
22784do
22785  # Extract the first word of "$ac_prog", so it can be a program name with args.
22786set dummy $ac_prog; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_DTRACE+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $DTRACE in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798as_dummy="$PATH:/usr/sbin"
22799for as_dir in $as_dummy
22800do
22801  IFS=$as_save_IFS
22802  test -z "$as_dir" && as_dir=.
22803    for ac_exec_ext in '' $ac_executable_extensions; do
22804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22805    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807    break 2
22808  fi
22809done
22810  done
22811IFS=$as_save_IFS
22812
22813  ;;
22814esac
22815fi
22816DTRACE=$ac_cv_path_DTRACE
22817if test -n "$DTRACE"; then
22818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22819$as_echo "$DTRACE" >&6; }
22820else
22821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22822$as_echo "no" >&6; }
22823fi
22824
22825
22826  test -n "$DTRACE" && break
22827done
22828
22829  else
22830    # The variable is set, but is it from the command line or the environment?
22831
22832    # Try to remove the string !DTRACE! from our list.
22833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22835      # If it failed, the variable was not from the command line. Ignore it,
22836      # but warn the user (except for BASH, which is always set by the calling BASH).
22837      if test "xDTRACE" != xBASH; then
22838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22839$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22840      fi
22841      # Try to locate tool using the code snippet
22842      for ac_prog in dtrace
22843do
22844  # Extract the first word of "$ac_prog", so it can be a program name with args.
22845set dummy $ac_prog; ac_word=$2
22846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847$as_echo_n "checking for $ac_word... " >&6; }
22848if ${ac_cv_path_DTRACE+:} false; then :
22849  $as_echo_n "(cached) " >&6
22850else
22851  case $DTRACE in
22852  [\\/]* | ?:[\\/]*)
22853  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22854  ;;
22855  *)
22856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857as_dummy="$PATH:/usr/sbin"
22858for as_dir in $as_dummy
22859do
22860  IFS=$as_save_IFS
22861  test -z "$as_dir" && as_dir=.
22862    for ac_exec_ext in '' $ac_executable_extensions; do
22863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866    break 2
22867  fi
22868done
22869  done
22870IFS=$as_save_IFS
22871
22872  ;;
22873esac
22874fi
22875DTRACE=$ac_cv_path_DTRACE
22876if test -n "$DTRACE"; then
22877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22878$as_echo "$DTRACE" >&6; }
22879else
22880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881$as_echo "no" >&6; }
22882fi
22883
22884
22885  test -n "$DTRACE" && break
22886done
22887
22888    else
22889      # If it succeeded, then it was overridden by the user. We will use it
22890      # for the tool.
22891
22892      # First remove it from the list of overridden variables, so we can test
22893      # for unknown variables in the end.
22894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22895
22896      # Check if we try to supply an empty value
22897      if test "x$DTRACE" = x; then
22898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22899$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22901$as_echo_n "checking for DTRACE... " >&6; }
22902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22903$as_echo "disabled" >&6; }
22904      else
22905        # Check if the provided tool contains a complete path.
22906        tool_specified="$DTRACE"
22907        tool_basename="${tool_specified##*/}"
22908        if test "x$tool_basename" = "x$tool_specified"; then
22909          # A command without a complete path is provided, search $PATH.
22910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22911$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22912          # Extract the first word of "$tool_basename", so it can be a program name with args.
22913set dummy $tool_basename; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if ${ac_cv_path_DTRACE+:} false; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  case $DTRACE in
22920  [\\/]* | ?:[\\/]*)
22921  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22922  ;;
22923  *)
22924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925for as_dir in $PATH
22926do
22927  IFS=$as_save_IFS
22928  test -z "$as_dir" && as_dir=.
22929    for ac_exec_ext in '' $ac_executable_extensions; do
22930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22931    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22933    break 2
22934  fi
22935done
22936  done
22937IFS=$as_save_IFS
22938
22939  ;;
22940esac
22941fi
22942DTRACE=$ac_cv_path_DTRACE
22943if test -n "$DTRACE"; then
22944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22945$as_echo "$DTRACE" >&6; }
22946else
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22948$as_echo "no" >&6; }
22949fi
22950
22951
22952          if test "x$DTRACE" = x; then
22953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22954          fi
22955        else
22956          # Otherwise we believe it is a complete path. Use it as it is.
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22958$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22960$as_echo_n "checking for DTRACE... " >&6; }
22961          if test ! -x "$tool_specified"; then
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22963$as_echo "not found" >&6; }
22964            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22965          fi
22966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22967$as_echo "$tool_specified" >&6; }
22968        fi
22969      fi
22970    fi
22971
22972  fi
22973
22974
22975
22976
22977  # Publish this variable in the help.
22978
22979
22980  if [ -z "${PATCH+x}" ]; then
22981    # The variable is not set by user, try to locate tool using the code snippet
22982    for ac_prog in gpatch patch
22983do
22984  # Extract the first word of "$ac_prog", so it can be a program name with args.
22985set dummy $ac_prog; ac_word=$2
22986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22987$as_echo_n "checking for $ac_word... " >&6; }
22988if ${ac_cv_path_PATCH+:} false; then :
22989  $as_echo_n "(cached) " >&6
22990else
22991  case $PATCH in
22992  [\\/]* | ?:[\\/]*)
22993  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22994  ;;
22995  *)
22996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22997for as_dir in $PATH
22998do
22999  IFS=$as_save_IFS
23000  test -z "$as_dir" && as_dir=.
23001    for ac_exec_ext in '' $ac_executable_extensions; do
23002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23003    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23005    break 2
23006  fi
23007done
23008  done
23009IFS=$as_save_IFS
23010
23011  ;;
23012esac
23013fi
23014PATCH=$ac_cv_path_PATCH
23015if test -n "$PATCH"; then
23016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23017$as_echo "$PATCH" >&6; }
23018else
23019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021fi
23022
23023
23024  test -n "$PATCH" && break
23025done
23026
23027  else
23028    # The variable is set, but is it from the command line or the environment?
23029
23030    # Try to remove the string !PATCH! from our list.
23031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23033      # If it failed, the variable was not from the command line. Ignore it,
23034      # but warn the user (except for BASH, which is always set by the calling BASH).
23035      if test "xPATCH" != xBASH; then
23036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23037$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23038      fi
23039      # Try to locate tool using the code snippet
23040      for ac_prog in gpatch patch
23041do
23042  # Extract the first word of "$ac_prog", so it can be a program name with args.
23043set dummy $ac_prog; ac_word=$2
23044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045$as_echo_n "checking for $ac_word... " >&6; }
23046if ${ac_cv_path_PATCH+:} false; then :
23047  $as_echo_n "(cached) " >&6
23048else
23049  case $PATCH in
23050  [\\/]* | ?:[\\/]*)
23051  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23052  ;;
23053  *)
23054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23055for as_dir in $PATH
23056do
23057  IFS=$as_save_IFS
23058  test -z "$as_dir" && as_dir=.
23059    for ac_exec_ext in '' $ac_executable_extensions; do
23060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23061    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23063    break 2
23064  fi
23065done
23066  done
23067IFS=$as_save_IFS
23068
23069  ;;
23070esac
23071fi
23072PATCH=$ac_cv_path_PATCH
23073if test -n "$PATCH"; then
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23075$as_echo "$PATCH" >&6; }
23076else
23077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23078$as_echo "no" >&6; }
23079fi
23080
23081
23082  test -n "$PATCH" && break
23083done
23084
23085    else
23086      # If it succeeded, then it was overridden by the user. We will use it
23087      # for the tool.
23088
23089      # First remove it from the list of overridden variables, so we can test
23090      # for unknown variables in the end.
23091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23092
23093      # Check if we try to supply an empty value
23094      if test "x$PATCH" = x; then
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23096$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23098$as_echo_n "checking for PATCH... " >&6; }
23099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23100$as_echo "disabled" >&6; }
23101      else
23102        # Check if the provided tool contains a complete path.
23103        tool_specified="$PATCH"
23104        tool_basename="${tool_specified##*/}"
23105        if test "x$tool_basename" = "x$tool_specified"; then
23106          # A command without a complete path is provided, search $PATH.
23107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23108$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23109          # Extract the first word of "$tool_basename", so it can be a program name with args.
23110set dummy $tool_basename; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_PATCH+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $PATCH in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139PATCH=$ac_cv_path_PATCH
23140if test -n "$PATCH"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23142$as_echo "$PATCH" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149          if test "x$PATCH" = x; then
23150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23151          fi
23152        else
23153          # Otherwise we believe it is a complete path. Use it as it is.
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23155$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23157$as_echo_n "checking for PATCH... " >&6; }
23158          if test ! -x "$tool_specified"; then
23159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23160$as_echo "not found" >&6; }
23161            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23162          fi
23163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23164$as_echo "$tool_specified" >&6; }
23165        fi
23166      fi
23167    fi
23168
23169  fi
23170
23171
23172  # Check if it's GNU time
23173  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23174  if test "x$IS_GNU_TIME" != x; then
23175    IS_GNU_TIME=yes
23176  else
23177    IS_GNU_TIME=no
23178  fi
23179
23180
23181  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23182
23183
23184
23185  # Publish this variable in the help.
23186
23187
23188  if [ -z "${DSYMUTIL+x}" ]; then
23189    # The variable is not set by user, try to locate tool using the code snippet
23190    for ac_prog in dsymutil
23191do
23192  # Extract the first word of "$ac_prog", so it can be a program name with args.
23193set dummy $ac_prog; ac_word=$2
23194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23195$as_echo_n "checking for $ac_word... " >&6; }
23196if ${ac_cv_path_DSYMUTIL+:} false; then :
23197  $as_echo_n "(cached) " >&6
23198else
23199  case $DSYMUTIL in
23200  [\\/]* | ?:[\\/]*)
23201  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23202  ;;
23203  *)
23204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23205for as_dir in $PATH
23206do
23207  IFS=$as_save_IFS
23208  test -z "$as_dir" && as_dir=.
23209    for ac_exec_ext in '' $ac_executable_extensions; do
23210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23211    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23213    break 2
23214  fi
23215done
23216  done
23217IFS=$as_save_IFS
23218
23219  ;;
23220esac
23221fi
23222DSYMUTIL=$ac_cv_path_DSYMUTIL
23223if test -n "$DSYMUTIL"; then
23224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23225$as_echo "$DSYMUTIL" >&6; }
23226else
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23228$as_echo "no" >&6; }
23229fi
23230
23231
23232  test -n "$DSYMUTIL" && break
23233done
23234
23235  else
23236    # The variable is set, but is it from the command line or the environment?
23237
23238    # Try to remove the string !DSYMUTIL! from our list.
23239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23241      # If it failed, the variable was not from the command line. Ignore it,
23242      # but warn the user (except for BASH, which is always set by the calling BASH).
23243      if test "xDSYMUTIL" != xBASH; then
23244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23245$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23246      fi
23247      # Try to locate tool using the code snippet
23248      for ac_prog in dsymutil
23249do
23250  # Extract the first word of "$ac_prog", so it can be a program name with args.
23251set dummy $ac_prog; ac_word=$2
23252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23253$as_echo_n "checking for $ac_word... " >&6; }
23254if ${ac_cv_path_DSYMUTIL+:} false; then :
23255  $as_echo_n "(cached) " >&6
23256else
23257  case $DSYMUTIL in
23258  [\\/]* | ?:[\\/]*)
23259  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23260  ;;
23261  *)
23262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23263for as_dir in $PATH
23264do
23265  IFS=$as_save_IFS
23266  test -z "$as_dir" && as_dir=.
23267    for ac_exec_ext in '' $ac_executable_extensions; do
23268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23269    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23271    break 2
23272  fi
23273done
23274  done
23275IFS=$as_save_IFS
23276
23277  ;;
23278esac
23279fi
23280DSYMUTIL=$ac_cv_path_DSYMUTIL
23281if test -n "$DSYMUTIL"; then
23282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23283$as_echo "$DSYMUTIL" >&6; }
23284else
23285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23286$as_echo "no" >&6; }
23287fi
23288
23289
23290  test -n "$DSYMUTIL" && break
23291done
23292
23293    else
23294      # If it succeeded, then it was overridden by the user. We will use it
23295      # for the tool.
23296
23297      # First remove it from the list of overridden variables, so we can test
23298      # for unknown variables in the end.
23299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23300
23301      # Check if we try to supply an empty value
23302      if test "x$DSYMUTIL" = x; then
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23304$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23306$as_echo_n "checking for DSYMUTIL... " >&6; }
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23308$as_echo "disabled" >&6; }
23309      else
23310        # Check if the provided tool contains a complete path.
23311        tool_specified="$DSYMUTIL"
23312        tool_basename="${tool_specified##*/}"
23313        if test "x$tool_basename" = "x$tool_specified"; then
23314          # A command without a complete path is provided, search $PATH.
23315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23316$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23317          # Extract the first word of "$tool_basename", so it can be a program name with args.
23318set dummy $tool_basename; ac_word=$2
23319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23320$as_echo_n "checking for $ac_word... " >&6; }
23321if ${ac_cv_path_DSYMUTIL+:} false; then :
23322  $as_echo_n "(cached) " >&6
23323else
23324  case $DSYMUTIL in
23325  [\\/]* | ?:[\\/]*)
23326  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23327  ;;
23328  *)
23329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23330for as_dir in $PATH
23331do
23332  IFS=$as_save_IFS
23333  test -z "$as_dir" && as_dir=.
23334    for ac_exec_ext in '' $ac_executable_extensions; do
23335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23336    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23338    break 2
23339  fi
23340done
23341  done
23342IFS=$as_save_IFS
23343
23344  ;;
23345esac
23346fi
23347DSYMUTIL=$ac_cv_path_DSYMUTIL
23348if test -n "$DSYMUTIL"; then
23349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23350$as_echo "$DSYMUTIL" >&6; }
23351else
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23353$as_echo "no" >&6; }
23354fi
23355
23356
23357          if test "x$DSYMUTIL" = x; then
23358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23359          fi
23360        else
23361          # Otherwise we believe it is a complete path. Use it as it is.
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23363$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23365$as_echo_n "checking for DSYMUTIL... " >&6; }
23366          if test ! -x "$tool_specified"; then
23367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23368$as_echo "not found" >&6; }
23369            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23370          fi
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23372$as_echo "$tool_specified" >&6; }
23373        fi
23374      fi
23375    fi
23376
23377  fi
23378
23379
23380
23381  if test "x$DSYMUTIL" = x; then
23382    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23383  fi
23384
23385
23386
23387
23388
23389  # Publish this variable in the help.
23390
23391
23392  if [ -z "${XATTR+x}" ]; then
23393    # The variable is not set by user, try to locate tool using the code snippet
23394    for ac_prog in xattr
23395do
23396  # Extract the first word of "$ac_prog", so it can be a program name with args.
23397set dummy $ac_prog; ac_word=$2
23398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23399$as_echo_n "checking for $ac_word... " >&6; }
23400if ${ac_cv_path_XATTR+:} false; then :
23401  $as_echo_n "(cached) " >&6
23402else
23403  case $XATTR in
23404  [\\/]* | ?:[\\/]*)
23405  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23406  ;;
23407  *)
23408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409for as_dir in $PATH
23410do
23411  IFS=$as_save_IFS
23412  test -z "$as_dir" && as_dir=.
23413    for ac_exec_ext in '' $ac_executable_extensions; do
23414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23415    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417    break 2
23418  fi
23419done
23420  done
23421IFS=$as_save_IFS
23422
23423  ;;
23424esac
23425fi
23426XATTR=$ac_cv_path_XATTR
23427if test -n "$XATTR"; then
23428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23429$as_echo "$XATTR" >&6; }
23430else
23431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23432$as_echo "no" >&6; }
23433fi
23434
23435
23436  test -n "$XATTR" && break
23437done
23438
23439  else
23440    # The variable is set, but is it from the command line or the environment?
23441
23442    # Try to remove the string !XATTR! from our list.
23443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23445      # If it failed, the variable was not from the command line. Ignore it,
23446      # but warn the user (except for BASH, which is always set by the calling BASH).
23447      if test "xXATTR" != xBASH; then
23448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23449$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23450      fi
23451      # Try to locate tool using the code snippet
23452      for ac_prog in xattr
23453do
23454  # Extract the first word of "$ac_prog", so it can be a program name with args.
23455set dummy $ac_prog; ac_word=$2
23456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23457$as_echo_n "checking for $ac_word... " >&6; }
23458if ${ac_cv_path_XATTR+:} false; then :
23459  $as_echo_n "(cached) " >&6
23460else
23461  case $XATTR in
23462  [\\/]* | ?:[\\/]*)
23463  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23464  ;;
23465  *)
23466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23467for as_dir in $PATH
23468do
23469  IFS=$as_save_IFS
23470  test -z "$as_dir" && as_dir=.
23471    for ac_exec_ext in '' $ac_executable_extensions; do
23472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23473    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23475    break 2
23476  fi
23477done
23478  done
23479IFS=$as_save_IFS
23480
23481  ;;
23482esac
23483fi
23484XATTR=$ac_cv_path_XATTR
23485if test -n "$XATTR"; then
23486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23487$as_echo "$XATTR" >&6; }
23488else
23489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23490$as_echo "no" >&6; }
23491fi
23492
23493
23494  test -n "$XATTR" && break
23495done
23496
23497    else
23498      # If it succeeded, then it was overridden by the user. We will use it
23499      # for the tool.
23500
23501      # First remove it from the list of overridden variables, so we can test
23502      # for unknown variables in the end.
23503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23504
23505      # Check if we try to supply an empty value
23506      if test "x$XATTR" = x; then
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23508$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23510$as_echo_n "checking for XATTR... " >&6; }
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23512$as_echo "disabled" >&6; }
23513      else
23514        # Check if the provided tool contains a complete path.
23515        tool_specified="$XATTR"
23516        tool_basename="${tool_specified##*/}"
23517        if test "x$tool_basename" = "x$tool_specified"; then
23518          # A command without a complete path is provided, search $PATH.
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23520$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23521          # Extract the first word of "$tool_basename", so it can be a program name with args.
23522set dummy $tool_basename; ac_word=$2
23523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23524$as_echo_n "checking for $ac_word... " >&6; }
23525if ${ac_cv_path_XATTR+:} false; then :
23526  $as_echo_n "(cached) " >&6
23527else
23528  case $XATTR in
23529  [\\/]* | ?:[\\/]*)
23530  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23531  ;;
23532  *)
23533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23534for as_dir in $PATH
23535do
23536  IFS=$as_save_IFS
23537  test -z "$as_dir" && as_dir=.
23538    for ac_exec_ext in '' $ac_executable_extensions; do
23539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23540    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23542    break 2
23543  fi
23544done
23545  done
23546IFS=$as_save_IFS
23547
23548  ;;
23549esac
23550fi
23551XATTR=$ac_cv_path_XATTR
23552if test -n "$XATTR"; then
23553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23554$as_echo "$XATTR" >&6; }
23555else
23556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23557$as_echo "no" >&6; }
23558fi
23559
23560
23561          if test "x$XATTR" = x; then
23562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23563          fi
23564        else
23565          # Otherwise we believe it is a complete path. Use it as it is.
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23567$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23569$as_echo_n "checking for XATTR... " >&6; }
23570          if test ! -x "$tool_specified"; then
23571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23572$as_echo "not found" >&6; }
23573            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23574          fi
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23576$as_echo "$tool_specified" >&6; }
23577        fi
23578      fi
23579    fi
23580
23581  fi
23582
23583
23584
23585  if test "x$XATTR" = x; then
23586    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23587  fi
23588
23589
23590
23591
23592  # Publish this variable in the help.
23593
23594
23595  if [ -z "${CODESIGN+x}" ]; then
23596    # The variable is not set by user, try to locate tool using the code snippet
23597    for ac_prog in codesign
23598do
23599  # Extract the first word of "$ac_prog", so it can be a program name with args.
23600set dummy $ac_prog; ac_word=$2
23601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23602$as_echo_n "checking for $ac_word... " >&6; }
23603if ${ac_cv_path_CODESIGN+:} false; then :
23604  $as_echo_n "(cached) " >&6
23605else
23606  case $CODESIGN in
23607  [\\/]* | ?:[\\/]*)
23608  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23609  ;;
23610  *)
23611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23612for as_dir in $PATH
23613do
23614  IFS=$as_save_IFS
23615  test -z "$as_dir" && as_dir=.
23616    for ac_exec_ext in '' $ac_executable_extensions; do
23617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23618    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23620    break 2
23621  fi
23622done
23623  done
23624IFS=$as_save_IFS
23625
23626  ;;
23627esac
23628fi
23629CODESIGN=$ac_cv_path_CODESIGN
23630if test -n "$CODESIGN"; then
23631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23632$as_echo "$CODESIGN" >&6; }
23633else
23634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23635$as_echo "no" >&6; }
23636fi
23637
23638
23639  test -n "$CODESIGN" && break
23640done
23641
23642  else
23643    # The variable is set, but is it from the command line or the environment?
23644
23645    # Try to remove the string !CODESIGN! from our list.
23646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23648      # If it failed, the variable was not from the command line. Ignore it,
23649      # but warn the user (except for BASH, which is always set by the calling BASH).
23650      if test "xCODESIGN" != xBASH; then
23651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23652$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23653      fi
23654      # Try to locate tool using the code snippet
23655      for ac_prog in codesign
23656do
23657  # Extract the first word of "$ac_prog", so it can be a program name with args.
23658set dummy $ac_prog; ac_word=$2
23659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23660$as_echo_n "checking for $ac_word... " >&6; }
23661if ${ac_cv_path_CODESIGN+:} false; then :
23662  $as_echo_n "(cached) " >&6
23663else
23664  case $CODESIGN in
23665  [\\/]* | ?:[\\/]*)
23666  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23667  ;;
23668  *)
23669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23670for as_dir in $PATH
23671do
23672  IFS=$as_save_IFS
23673  test -z "$as_dir" && as_dir=.
23674    for ac_exec_ext in '' $ac_executable_extensions; do
23675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23676    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23678    break 2
23679  fi
23680done
23681  done
23682IFS=$as_save_IFS
23683
23684  ;;
23685esac
23686fi
23687CODESIGN=$ac_cv_path_CODESIGN
23688if test -n "$CODESIGN"; then
23689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23690$as_echo "$CODESIGN" >&6; }
23691else
23692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23693$as_echo "no" >&6; }
23694fi
23695
23696
23697  test -n "$CODESIGN" && break
23698done
23699
23700    else
23701      # If it succeeded, then it was overridden by the user. We will use it
23702      # for the tool.
23703
23704      # First remove it from the list of overridden variables, so we can test
23705      # for unknown variables in the end.
23706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23707
23708      # Check if we try to supply an empty value
23709      if test "x$CODESIGN" = x; then
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23711$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23713$as_echo_n "checking for CODESIGN... " >&6; }
23714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23715$as_echo "disabled" >&6; }
23716      else
23717        # Check if the provided tool contains a complete path.
23718        tool_specified="$CODESIGN"
23719        tool_basename="${tool_specified##*/}"
23720        if test "x$tool_basename" = "x$tool_specified"; then
23721          # A command without a complete path is provided, search $PATH.
23722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23723$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23724          # Extract the first word of "$tool_basename", so it can be a program name with args.
23725set dummy $tool_basename; ac_word=$2
23726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23727$as_echo_n "checking for $ac_word... " >&6; }
23728if ${ac_cv_path_CODESIGN+:} false; then :
23729  $as_echo_n "(cached) " >&6
23730else
23731  case $CODESIGN in
23732  [\\/]* | ?:[\\/]*)
23733  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23734  ;;
23735  *)
23736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23737for as_dir in $PATH
23738do
23739  IFS=$as_save_IFS
23740  test -z "$as_dir" && as_dir=.
23741    for ac_exec_ext in '' $ac_executable_extensions; do
23742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23743    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23745    break 2
23746  fi
23747done
23748  done
23749IFS=$as_save_IFS
23750
23751  ;;
23752esac
23753fi
23754CODESIGN=$ac_cv_path_CODESIGN
23755if test -n "$CODESIGN"; then
23756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23757$as_echo "$CODESIGN" >&6; }
23758else
23759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23760$as_echo "no" >&6; }
23761fi
23762
23763
23764          if test "x$CODESIGN" = x; then
23765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23766          fi
23767        else
23768          # Otherwise we believe it is a complete path. Use it as it is.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23770$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23772$as_echo_n "checking for CODESIGN... " >&6; }
23773          if test ! -x "$tool_specified"; then
23774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23775$as_echo "not found" >&6; }
23776            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23777          fi
23778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23779$as_echo "$tool_specified" >&6; }
23780        fi
23781      fi
23782    fi
23783
23784  fi
23785
23786
23787    if test "x$CODESIGN" != "x"; then
23788      # Verify that the openjdk_codesign certificate is present
23789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23790$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23791      $RM codesign-testfile
23792      $TOUCH codesign-testfile
23793      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23794      $RM codesign-testfile
23795      if test "x$CODESIGN" = x; then
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23797$as_echo "no" >&6; }
23798      else
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23800$as_echo "yes" >&6; }
23801      fi
23802    fi
23803
23804
23805
23806  # Publish this variable in the help.
23807
23808
23809  if [ -z "${SETFILE+x}" ]; then
23810    # The variable is not set by user, try to locate tool using the code snippet
23811    for ac_prog in SetFile
23812do
23813  # Extract the first word of "$ac_prog", so it can be a program name with args.
23814set dummy $ac_prog; ac_word=$2
23815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23816$as_echo_n "checking for $ac_word... " >&6; }
23817if ${ac_cv_path_SETFILE+:} false; then :
23818  $as_echo_n "(cached) " >&6
23819else
23820  case $SETFILE in
23821  [\\/]* | ?:[\\/]*)
23822  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23823  ;;
23824  *)
23825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23826for as_dir in $PATH
23827do
23828  IFS=$as_save_IFS
23829  test -z "$as_dir" && as_dir=.
23830    for ac_exec_ext in '' $ac_executable_extensions; do
23831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23832    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23834    break 2
23835  fi
23836done
23837  done
23838IFS=$as_save_IFS
23839
23840  ;;
23841esac
23842fi
23843SETFILE=$ac_cv_path_SETFILE
23844if test -n "$SETFILE"; then
23845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23846$as_echo "$SETFILE" >&6; }
23847else
23848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23849$as_echo "no" >&6; }
23850fi
23851
23852
23853  test -n "$SETFILE" && break
23854done
23855
23856  else
23857    # The variable is set, but is it from the command line or the environment?
23858
23859    # Try to remove the string !SETFILE! from our list.
23860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23862      # If it failed, the variable was not from the command line. Ignore it,
23863      # but warn the user (except for BASH, which is always set by the calling BASH).
23864      if test "xSETFILE" != xBASH; then
23865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23866$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23867      fi
23868      # Try to locate tool using the code snippet
23869      for ac_prog in SetFile
23870do
23871  # Extract the first word of "$ac_prog", so it can be a program name with args.
23872set dummy $ac_prog; ac_word=$2
23873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23874$as_echo_n "checking for $ac_word... " >&6; }
23875if ${ac_cv_path_SETFILE+:} false; then :
23876  $as_echo_n "(cached) " >&6
23877else
23878  case $SETFILE in
23879  [\\/]* | ?:[\\/]*)
23880  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23881  ;;
23882  *)
23883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23884for as_dir in $PATH
23885do
23886  IFS=$as_save_IFS
23887  test -z "$as_dir" && as_dir=.
23888    for ac_exec_ext in '' $ac_executable_extensions; do
23889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23890    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23892    break 2
23893  fi
23894done
23895  done
23896IFS=$as_save_IFS
23897
23898  ;;
23899esac
23900fi
23901SETFILE=$ac_cv_path_SETFILE
23902if test -n "$SETFILE"; then
23903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23904$as_echo "$SETFILE" >&6; }
23905else
23906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23907$as_echo "no" >&6; }
23908fi
23909
23910
23911  test -n "$SETFILE" && break
23912done
23913
23914    else
23915      # If it succeeded, then it was overridden by the user. We will use it
23916      # for the tool.
23917
23918      # First remove it from the list of overridden variables, so we can test
23919      # for unknown variables in the end.
23920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23921
23922      # Check if we try to supply an empty value
23923      if test "x$SETFILE" = x; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23925$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23927$as_echo_n "checking for SETFILE... " >&6; }
23928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23929$as_echo "disabled" >&6; }
23930      else
23931        # Check if the provided tool contains a complete path.
23932        tool_specified="$SETFILE"
23933        tool_basename="${tool_specified##*/}"
23934        if test "x$tool_basename" = "x$tool_specified"; then
23935          # A command without a complete path is provided, search $PATH.
23936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23937$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23938          # Extract the first word of "$tool_basename", so it can be a program name with args.
23939set dummy $tool_basename; ac_word=$2
23940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23941$as_echo_n "checking for $ac_word... " >&6; }
23942if ${ac_cv_path_SETFILE+:} false; then :
23943  $as_echo_n "(cached) " >&6
23944else
23945  case $SETFILE in
23946  [\\/]* | ?:[\\/]*)
23947  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23948  ;;
23949  *)
23950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23951for as_dir in $PATH
23952do
23953  IFS=$as_save_IFS
23954  test -z "$as_dir" && as_dir=.
23955    for ac_exec_ext in '' $ac_executable_extensions; do
23956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23957    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23959    break 2
23960  fi
23961done
23962  done
23963IFS=$as_save_IFS
23964
23965  ;;
23966esac
23967fi
23968SETFILE=$ac_cv_path_SETFILE
23969if test -n "$SETFILE"; then
23970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23971$as_echo "$SETFILE" >&6; }
23972else
23973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23974$as_echo "no" >&6; }
23975fi
23976
23977
23978          if test "x$SETFILE" = x; then
23979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23980          fi
23981        else
23982          # Otherwise we believe it is a complete path. Use it as it is.
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23984$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23986$as_echo_n "checking for SETFILE... " >&6; }
23987          if test ! -x "$tool_specified"; then
23988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23989$as_echo "not found" >&6; }
23990            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23991          fi
23992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23993$as_echo "$tool_specified" >&6; }
23994        fi
23995      fi
23996    fi
23997
23998  fi
23999
24000
24001
24002  if test "x$SETFILE" = x; then
24003    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24004  fi
24005
24006
24007  fi
24008
24009
24010  # Test if bash supports pipefail.
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24012$as_echo_n "checking if bash supports pipefail... " >&6; }
24013  if ${BASH} -c 'set -o pipefail'; then
24014    BASH_ARGS="$BASH_ARGS -o pipefail"
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24016$as_echo "yes" >&6; }
24017  else
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24019$as_echo "no" >&6; }
24020  fi
24021
24022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24023$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24024  if ${BASH} -e -c 'true'; then
24025    BASH_ARGS="$BASH_ARGS -e"
24026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24027$as_echo "yes" >&6; }
24028  else
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24030$as_echo "no" >&6; }
24031  fi
24032
24033
24034
24035
24036# Check if pkg-config is available.
24037
24038
24039if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24040	if test -n "$ac_tool_prefix"; then
24041  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24042set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24044$as_echo_n "checking for $ac_word... " >&6; }
24045if ${ac_cv_path_PKG_CONFIG+:} false; then :
24046  $as_echo_n "(cached) " >&6
24047else
24048  case $PKG_CONFIG in
24049  [\\/]* | ?:[\\/]*)
24050  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24051  ;;
24052  *)
24053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24054for as_dir in $PATH
24055do
24056  IFS=$as_save_IFS
24057  test -z "$as_dir" && as_dir=.
24058    for ac_exec_ext in '' $ac_executable_extensions; do
24059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24060    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24062    break 2
24063  fi
24064done
24065  done
24066IFS=$as_save_IFS
24067
24068  ;;
24069esac
24070fi
24071PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24072if test -n "$PKG_CONFIG"; then
24073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24074$as_echo "$PKG_CONFIG" >&6; }
24075else
24076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24077$as_echo "no" >&6; }
24078fi
24079
24080
24081fi
24082if test -z "$ac_cv_path_PKG_CONFIG"; then
24083  ac_pt_PKG_CONFIG=$PKG_CONFIG
24084  # Extract the first word of "pkg-config", so it can be a program name with args.
24085set dummy pkg-config; ac_word=$2
24086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24087$as_echo_n "checking for $ac_word... " >&6; }
24088if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24089  $as_echo_n "(cached) " >&6
24090else
24091  case $ac_pt_PKG_CONFIG in
24092  [\\/]* | ?:[\\/]*)
24093  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24094  ;;
24095  *)
24096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24097for as_dir in $PATH
24098do
24099  IFS=$as_save_IFS
24100  test -z "$as_dir" && as_dir=.
24101    for ac_exec_ext in '' $ac_executable_extensions; do
24102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24103    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24105    break 2
24106  fi
24107done
24108  done
24109IFS=$as_save_IFS
24110
24111  ;;
24112esac
24113fi
24114ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24115if test -n "$ac_pt_PKG_CONFIG"; then
24116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24117$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24118else
24119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24120$as_echo "no" >&6; }
24121fi
24122
24123  if test "x$ac_pt_PKG_CONFIG" = x; then
24124    PKG_CONFIG=""
24125  else
24126    case $cross_compiling:$ac_tool_warned in
24127yes:)
24128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24130ac_tool_warned=yes ;;
24131esac
24132    PKG_CONFIG=$ac_pt_PKG_CONFIG
24133  fi
24134else
24135  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24136fi
24137
24138fi
24139if test -n "$PKG_CONFIG"; then
24140	_pkg_min_version=0.9.0
24141	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24142$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24143	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24144		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24145$as_echo "yes" >&6; }
24146	else
24147		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24148$as_echo "no" >&6; }
24149		PKG_CONFIG=""
24150	fi
24151
24152fi
24153
24154# After basic tools have been setup, we can check build os specific details.
24155
24156  ###############################################################################
24157
24158  # Note that this is the build platform OS version!
24159
24160  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24161  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24162  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24163  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24164
24165
24166
24167
24168
24169# Misc basic settings
24170
24171
24172# Check whether --with-default-make-target was given.
24173if test "${with_default_make_target+set}" = set; then :
24174  withval=$with_default_make_target;
24175fi
24176
24177  if test "x$with_default_make_target" = "x" \
24178      || test "x$with_default_make_target" = "xyes"; then
24179    DEFAULT_MAKE_TARGET="exploded-image"
24180  elif test "x$with_default_make_target" = "xno"; then
24181    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24182  else
24183    DEFAULT_MAKE_TARGET="$with_default_make_target"
24184  fi
24185
24186
24187
24188
24189###############################################################################
24190#
24191# Determine OpenJDK variants, options and version numbers.
24192#
24193###############################################################################
24194
24195# We need build & target for this.
24196
24197  # Should we build a JDK without a graphical UI?
24198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24199$as_echo_n "checking headless only... " >&6; }
24200  # Check whether --enable-headless-only was given.
24201if test "${enable_headless_only+set}" = set; then :
24202  enableval=$enable_headless_only;
24203fi
24204
24205
24206  if test "x$enable_headless_only" = "xyes"; then
24207    ENABLE_HEADLESS_ONLY="true"
24208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24209$as_echo "yes" >&6; }
24210  elif test "x$enable_headless_only" = "xno"; then
24211    ENABLE_HEADLESS_ONLY="false"
24212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24213$as_echo "no" >&6; }
24214  elif test "x$enable_headless_only" = "x"; then
24215    ENABLE_HEADLESS_ONLY="false"
24216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24217$as_echo "no" >&6; }
24218  else
24219    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24220  fi
24221
24222
24223
24224  # Choose cacerts source file
24225
24226# Check whether --with-cacerts-file was given.
24227if test "${with_cacerts_file+set}" = set; then :
24228  withval=$with_cacerts_file;
24229fi
24230
24231  if test "x$with_cacerts_file" != x; then
24232    CACERTS_FILE=$with_cacerts_file
24233  fi
24234
24235
24236  # Enable or disable unlimited crypto
24237  # Check whether --enable-unlimited-crypto was given.
24238if test "${enable_unlimited_crypto+set}" = set; then :
24239  enableval=$enable_unlimited_crypto;
24240else
24241  enable_unlimited_crypto=no
24242fi
24243
24244  if test "x$enable_unlimited_crypto" = "xyes"; then
24245    UNLIMITED_CRYPTO=true
24246  else
24247    UNLIMITED_CRYPTO=false
24248  fi
24249
24250
24251  # Should we build the serviceability agent (SA)?
24252  INCLUDE_SA=true
24253  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24254    INCLUDE_SA=false
24255  fi
24256  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24257    INCLUDE_SA=false
24258  fi
24259
24260
24261  # Compress jars
24262  COMPRESS_JARS=false
24263
24264
24265
24266  # Setup default copyright year. Mostly overridden when building close to a new year.
24267
24268# Check whether --with-copyright-year was given.
24269if test "${with_copyright_year+set}" = set; then :
24270  withval=$with_copyright_year;
24271fi
24272
24273  if test "x$with_copyright_year" = xyes; then
24274    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24275  elif test "x$with_copyright_year" != x; then
24276    COPYRIGHT_YEAR="$with_copyright_year"
24277  else
24278    COPYRIGHT_YEAR=`$DATE +'%Y'`
24279  fi
24280
24281
24282
24283  # Check whether --enable-keep-packaged-modules was given.
24284if test "${enable_keep_packaged_modules+set}" = set; then :
24285  enableval=$enable_keep_packaged_modules;
24286fi
24287
24288
24289  if test "x$enable_keep_packaged_modules" = "xyes"; then
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24291$as_echo_n "checking if packaged modules are kept... " >&6; }
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24293$as_echo "yes" >&6; }
24294    JLINK_KEEP_PACKAGED_MODULES=true
24295  elif test "x$enable_keep_packaged_modules" = "xno"; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24297$as_echo_n "checking if packaged modules are kept... " >&6; }
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24299$as_echo "no" >&6; }
24300    JLINK_KEEP_PACKAGED_MODULES=false
24301  elif test "x$enable_keep_packaged_modules" = "x"; then
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24303$as_echo "yes (default)" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=true
24305  else
24306    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24307  fi
24308
24309
24310
24311
24312  # Warn user that old version arguments are deprecated.
24313
24314
24315# Check whether --with-milestone was given.
24316if test "${with_milestone+set}" = set; then :
24317  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24318$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24319fi
24320
24321
24322
24323
24324# Check whether --with-update-version was given.
24325if test "${with_update_version+set}" = set; then :
24326  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24327$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24328fi
24329
24330
24331
24332
24333# Check whether --with-user-release-suffix was given.
24334if test "${with_user_release_suffix+set}" = set; then :
24335  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
24336$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341
24342# Check whether --with-build-number was given.
24343if test "${with_build_number+set}" = set; then :
24344  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24345$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24346fi
24347
24348
24349
24350  # Source the version numbers file
24351  . $AUTOCONF_DIR/version-numbers
24352
24353  # Some non-version number information is set in that file
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363  # Override version from arguments
24364
24365  # If --with-version-string is set, process it first. It is possible to
24366  # override parts with more specific flags, since these are processed later.
24367
24368# Check whether --with-version-string was given.
24369if test "${with_version_string+set}" = set; then :
24370  withval=$with_version_string;
24371fi
24372
24373  if test "x$with_version_string" = xyes; then
24374    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24375  elif test "x$with_version_string" != x; then
24376    # Additional [] needed to keep m4 from mangling shell constructs.
24377    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24378      VERSION_MAJOR=${BASH_REMATCH[1]}
24379      VERSION_MINOR=${BASH_REMATCH[3]}
24380      VERSION_SECURITY=${BASH_REMATCH[5]}
24381      VERSION_PATCH=${BASH_REMATCH[7]}
24382      VERSION_PRE=${BASH_REMATCH[9]}
24383      version_plus_separator=${BASH_REMATCH[11]}
24384      VERSION_BUILD=${BASH_REMATCH[12]}
24385      VERSION_OPT=${BASH_REMATCH[14]}
24386      # Unspecified numerical fields are interpreted as 0.
24387      if test "x$VERSION_MINOR" = x; then
24388        VERSION_MINOR=0
24389      fi
24390      if test "x$VERSION_SECURITY" = x; then
24391        VERSION_SECURITY=0
24392      fi
24393      if test "x$VERSION_PATCH" = x; then
24394        VERSION_PATCH=0
24395      fi
24396      if test "x$version_plus_separator" != x \
24397          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24398        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24399      fi
24400      # Stop the version part process from setting default values.
24401      # We still allow them to explicitely override though.
24402      NO_DEFAULT_VERSION_PARTS=true
24403    else
24404      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24405    fi
24406  fi
24407
24408
24409# Check whether --with-version-pre was given.
24410if test "${with_version_pre+set}" = set; then :
24411  withval=$with_version_pre; with_version_pre_present=true
24412else
24413  with_version_pre_present=false
24414fi
24415
24416
24417  if test "x$with_version_pre_present" = xtrue; then
24418    if test "x$with_version_pre" = xyes; then
24419      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24420    elif test "x$with_version_pre" = xno; then
24421      # Interpret --without-* as empty string instead of the literal "no"
24422      VERSION_PRE=
24423    else
24424      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24425       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24426      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24428$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24429      fi
24430    fi
24431  else
24432    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24433      # Default is to use "internal" as pre
24434      VERSION_PRE="internal"
24435    fi
24436  fi
24437
24438
24439# Check whether --with-version-opt was given.
24440if test "${with_version_opt+set}" = set; then :
24441  withval=$with_version_opt; with_version_opt_present=true
24442else
24443  with_version_opt_present=false
24444fi
24445
24446
24447  if test "x$with_version_opt_present" = xtrue; then
24448    if test "x$with_version_opt" = xyes; then
24449      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24450    elif test "x$with_version_opt" = xno; then
24451      # Interpret --without-* as empty string instead of the literal "no"
24452      VERSION_OPT=
24453    else
24454      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24455       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24456      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24458$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24459      fi
24460    fi
24461  else
24462    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24463      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24464      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24465      # Outer [ ] to quote m4.
24466       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24467      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24468    fi
24469  fi
24470
24471
24472# Check whether --with-version-build was given.
24473if test "${with_version_build+set}" = set; then :
24474  withval=$with_version_build; with_version_build_present=true
24475else
24476  with_version_build_present=false
24477fi
24478
24479
24480  if test "x$with_version_build_present" = xtrue; then
24481    if test "x$with_version_build" = xyes; then
24482      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24483    elif test "x$with_version_build" = xno; then
24484      # Interpret --without-* as empty string instead of the literal "no"
24485      VERSION_BUILD=
24486    elif test "x$with_version_build" = x; then
24487      VERSION_BUILD=
24488    else
24489
24490  # Additional [] needed to keep m4 from mangling shell constructs.
24491  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24492    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24493  fi
24494  # Extract the version number without leading zeros.
24495  cleaned_value=${BASH_REMATCH[1]}
24496  if test "x$cleaned_value" = x; then
24497    # Special case for zero
24498    cleaned_value=${BASH_REMATCH[2]}
24499  fi
24500
24501  if test $cleaned_value -gt 255; then
24502    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24503  fi
24504  if test "x$cleaned_value" != "x$with_version_build"; then
24505    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24506$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24507  fi
24508  VERSION_BUILD=$cleaned_value
24509
24510    fi
24511  else
24512    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24513      # Default is to not have a build number.
24514      VERSION_BUILD=""
24515      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24516      VERSION_BUILD=0
24517    fi
24518  fi
24519
24520
24521# Check whether --with-version-major was given.
24522if test "${with_version_major+set}" = set; then :
24523  withval=$with_version_major; with_version_major_present=true
24524else
24525  with_version_major_present=false
24526fi
24527
24528
24529  if test "x$with_version_major_present" = xtrue; then
24530    if test "x$with_version_major" = xyes; then
24531      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24532    else
24533
24534  # Additional [] needed to keep m4 from mangling shell constructs.
24535  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24536    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24537  fi
24538  # Extract the version number without leading zeros.
24539  cleaned_value=${BASH_REMATCH[1]}
24540  if test "x$cleaned_value" = x; then
24541    # Special case for zero
24542    cleaned_value=${BASH_REMATCH[2]}
24543  fi
24544
24545  if test $cleaned_value -gt 255; then
24546    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24547  fi
24548  if test "x$cleaned_value" != "x$with_version_major"; then
24549    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24550$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24551  fi
24552  VERSION_MAJOR=$cleaned_value
24553
24554    fi
24555  else
24556    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24557      # Default is to get value from version-numbers
24558      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24559    fi
24560  fi
24561
24562
24563# Check whether --with-version-minor was given.
24564if test "${with_version_minor+set}" = set; then :
24565  withval=$with_version_minor; with_version_minor_present=true
24566else
24567  with_version_minor_present=false
24568fi
24569
24570
24571  if test "x$with_version_minor_present" = xtrue; then
24572    if test "x$with_version_minor" = xyes; then
24573      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24574    elif test "x$with_version_minor" = xno; then
24575      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24576      VERSION_MINOR=0
24577    elif test "x$with_version_minor" = x; then
24578      VERSION_MINOR=0
24579    else
24580
24581  # Additional [] needed to keep m4 from mangling shell constructs.
24582  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24583    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24584  fi
24585  # Extract the version number without leading zeros.
24586  cleaned_value=${BASH_REMATCH[1]}
24587  if test "x$cleaned_value" = x; then
24588    # Special case for zero
24589    cleaned_value=${BASH_REMATCH[2]}
24590  fi
24591
24592  if test $cleaned_value -gt 255; then
24593    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24594  fi
24595  if test "x$cleaned_value" != "x$with_version_minor"; then
24596    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24597$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24598  fi
24599  VERSION_MINOR=$cleaned_value
24600
24601    fi
24602  else
24603    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24604      # Default is 0, if unspecified
24605      VERSION_MINOR=0
24606    fi
24607  fi
24608
24609
24610# Check whether --with-version-security was given.
24611if test "${with_version_security+set}" = set; then :
24612  withval=$with_version_security; with_version_security_present=true
24613else
24614  with_version_security_present=false
24615fi
24616
24617
24618  if test "x$with_version_security_present" = xtrue; then
24619    if test "x$with_version_security" = xyes; then
24620      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24621    elif test "x$with_version_security" = xno; then
24622      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24623      VERSION_SECURITY=0
24624    elif test "x$with_version_security" = x; then
24625      VERSION_SECURITY=0
24626    else
24627
24628  # Additional [] needed to keep m4 from mangling shell constructs.
24629  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24630    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24631  fi
24632  # Extract the version number without leading zeros.
24633  cleaned_value=${BASH_REMATCH[1]}
24634  if test "x$cleaned_value" = x; then
24635    # Special case for zero
24636    cleaned_value=${BASH_REMATCH[2]}
24637  fi
24638
24639  if test $cleaned_value -gt 255; then
24640    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24641  fi
24642  if test "x$cleaned_value" != "x$with_version_security"; then
24643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24644$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24645  fi
24646  VERSION_SECURITY=$cleaned_value
24647
24648    fi
24649  else
24650    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24651      # Default is 0, if unspecified
24652      VERSION_SECURITY=0
24653    fi
24654  fi
24655
24656
24657# Check whether --with-version-patch was given.
24658if test "${with_version_patch+set}" = set; then :
24659  withval=$with_version_patch; with_version_patch_present=true
24660else
24661  with_version_patch_present=false
24662fi
24663
24664
24665  if test "x$with_version_patch_present" = xtrue; then
24666    if test "x$with_version_patch" = xyes; then
24667      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24668    elif test "x$with_version_patch" = xno; then
24669      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24670      VERSION_PATCH=0
24671    elif test "x$with_version_patch" = x; then
24672      VERSION_PATCH=0
24673    else
24674
24675  # Additional [] needed to keep m4 from mangling shell constructs.
24676  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24677    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24678  fi
24679  # Extract the version number without leading zeros.
24680  cleaned_value=${BASH_REMATCH[1]}
24681  if test "x$cleaned_value" = x; then
24682    # Special case for zero
24683    cleaned_value=${BASH_REMATCH[2]}
24684  fi
24685
24686  if test $cleaned_value -gt 255; then
24687    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24688  fi
24689  if test "x$cleaned_value" != "x$with_version_patch"; then
24690    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24691$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24692  fi
24693  VERSION_PATCH=$cleaned_value
24694
24695    fi
24696  else
24697    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24698      # Default is 0, if unspecified
24699      VERSION_PATCH=0
24700    fi
24701  fi
24702
24703  # Calculate derived version properties
24704
24705  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24706  if test "x$VERSION_PRE" = x; then
24707    VERSION_IS_GA=true
24708  else
24709    VERSION_IS_GA=false
24710  fi
24711
24712  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24713  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24714
24715  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24716  # Strip trailing zeroes from stripped_version_number
24717  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24718  VERSION_NUMBER=$stripped_version_number
24719
24720  # The complete version string, with additional build information
24721  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24722    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24723  else
24724    # If either build or opt is set, we need a + separator
24725    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24726  fi
24727
24728  # The short version string, just VERSION_NUMBER and PRE, if present.
24729  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24730
24731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24732$as_echo_n "checking for version string... " >&6; }
24733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24734$as_echo "$VERSION_STRING" >&6; }
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750###############################################################################
24751#
24752# Setup BootJDK, used to bootstrap the build.
24753#
24754###############################################################################
24755
24756
24757  BOOT_JDK_FOUND=no
24758
24759# Check whether --with-boot-jdk was given.
24760if test "${with_boot_jdk+set}" = set; then :
24761  withval=$with_boot_jdk;
24762fi
24763
24764
24765  # We look for the Boot JDK through various means, going from more certain to
24766  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24767  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24768  # must check if this is indeed valid; otherwise we'll continue looking.
24769
24770  # Test: Is bootjdk explicitely set by command line arguments?
24771
24772  if test "x$BOOT_JDK_FOUND" = xno; then
24773    # Now execute the test
24774
24775  if test "x$with_boot_jdk" != x; then
24776    BOOT_JDK=$with_boot_jdk
24777    BOOT_JDK_FOUND=maybe
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24779$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24780  fi
24781
24782
24783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24785      # Do we have a bin/java?
24786      if test ! -x "$BOOT_JDK/bin/java"; then
24787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24789        BOOT_JDK_FOUND=no
24790      else
24791        # Do we have a bin/javac?
24792        if test ! -x "$BOOT_JDK/bin/javac"; then
24793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24797          BOOT_JDK_FOUND=no
24798        else
24799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24801
24802          # Extra M4 quote needed to protect [] in grep expression.
24803          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24804          if test "x$FOUND_CORRECT_VERSION" = x; then
24805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24809            BOOT_JDK_FOUND=no
24810          else
24811            # We're done! :-)
24812            BOOT_JDK_FOUND=yes
24813
24814  # Only process if variable expands to non-empty
24815
24816  if test "x$BOOT_JDK" != x; then
24817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24818
24819  # Input might be given as Windows format, start by converting to
24820  # unix format.
24821  path="$BOOT_JDK"
24822  new_path=`$CYGPATH -u "$path"`
24823
24824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24827  # "foo.exe" is OK but "foo" is an error.
24828  #
24829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24830  # It is also a way to make sure we got the proper file name for the real test later on.
24831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24832  if test "x$test_shortpath" = x; then
24833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24836  fi
24837
24838  # Call helper function which possibly converts this using DOS-style short mode.
24839  # If so, the updated path is stored in $new_path.
24840
24841  input_path="$new_path"
24842  # Check if we need to convert this using DOS-style short mode. If the path
24843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24844  # take no chances and rewrite it.
24845  # Note: m4 eats our [], so we need to use [ and ] instead.
24846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24847  if test "x$has_forbidden_chars" != x; then
24848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24852      # Going to short mode and back again did indeed matter. Since short mode is
24853      # case insensitive, let's make it lowercase to improve readability.
24854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24855      # Now convert it back to Unix-style (cygpath)
24856      input_path=`$CYGPATH -u "$shortmode_path"`
24857      new_path="$input_path"
24858    fi
24859  fi
24860
24861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24862  if test "x$test_cygdrive_prefix" = x; then
24863    # As a simple fix, exclude /usr/bin since it's not a real path.
24864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24866      # a path prefixed by /cygdrive for fixpath to work.
24867      new_path="$CYGWIN_ROOT_PATH$input_path"
24868    fi
24869  fi
24870
24871
24872  if test "x$path" != "x$new_path"; then
24873    BOOT_JDK="$new_path"
24874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24876  fi
24877
24878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24879
24880  path="$BOOT_JDK"
24881  has_colon=`$ECHO $path | $GREP ^.:`
24882  new_path="$path"
24883  if test "x$has_colon" = x; then
24884    # Not in mixed or Windows style, start by that.
24885    new_path=`cmd //c echo $path`
24886  fi
24887
24888
24889  input_path="$new_path"
24890  # Check if we need to convert this using DOS-style short mode. If the path
24891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24892  # take no chances and rewrite it.
24893  # Note: m4 eats our [], so we need to use [ and ] instead.
24894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24895  if test "x$has_forbidden_chars" != x; then
24896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24898  fi
24899
24900
24901  windows_path="$new_path"
24902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903    unix_path=`$CYGPATH -u "$windows_path"`
24904    new_path="$unix_path"
24905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24907    new_path="$unix_path"
24908  fi
24909
24910  if test "x$path" != "x$new_path"; then
24911    BOOT_JDK="$new_path"
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24914  fi
24915
24916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24918
24919    else
24920      # We're on a unix platform. Hooray! :)
24921      path="$BOOT_JDK"
24922      has_space=`$ECHO "$path" | $GREP " "`
24923      if test "x$has_space" != x; then
24924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24927      fi
24928
24929      # Use eval to expand a potential ~
24930      eval path="$path"
24931      if test ! -f "$path" && test ! -d "$path"; then
24932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24933      fi
24934
24935      if test -d "$path"; then
24936        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24937      else
24938        dir="`$DIRNAME "$path"`"
24939        base="`$BASENAME "$path"`"
24940        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24941      fi
24942    fi
24943  fi
24944
24945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24946$as_echo_n "checking for Boot JDK... " >&6; }
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24948$as_echo "$BOOT_JDK" >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24950$as_echo_n "checking Boot JDK version... " >&6; }
24951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24953$as_echo "$BOOT_JDK_VERSION" >&6; }
24954          fi # end check jdk version
24955        fi # end check javac
24956      fi # end check java
24957    fi # end check boot jdk found
24958  fi
24959
24960  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24961    # Having specified an argument which is incorrect will produce an instant failure;
24962    # we should not go on looking
24963    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24964  fi
24965
24966  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24967
24968  if test "x$BOOT_JDK_FOUND" = xno; then
24969    # Now execute the test
24970
24971  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24972    # First check at user selected default
24973
24974  if test "x$BOOT_JDK_FOUND" = xno; then
24975    # Now execute the test
24976
24977  if test -x /usr/libexec/java_home; then
24978    BOOT_JDK=`/usr/libexec/java_home `
24979    BOOT_JDK_FOUND=maybe
24980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24982  fi
24983
24984
24985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24987      # Do we have a bin/java?
24988      if test ! -x "$BOOT_JDK/bin/java"; then
24989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24991        BOOT_JDK_FOUND=no
24992      else
24993        # Do we have a bin/javac?
24994        if test ! -x "$BOOT_JDK/bin/javac"; then
24995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24999          BOOT_JDK_FOUND=no
25000        else
25001          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25002          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25003
25004          # Extra M4 quote needed to protect [] in grep expression.
25005          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25006          if test "x$FOUND_CORRECT_VERSION" = x; then
25007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25010$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25011            BOOT_JDK_FOUND=no
25012          else
25013            # We're done! :-)
25014            BOOT_JDK_FOUND=yes
25015
25016  # Only process if variable expands to non-empty
25017
25018  if test "x$BOOT_JDK" != x; then
25019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020
25021  # Input might be given as Windows format, start by converting to
25022  # unix format.
25023  path="$BOOT_JDK"
25024  new_path=`$CYGPATH -u "$path"`
25025
25026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029  # "foo.exe" is OK but "foo" is an error.
25030  #
25031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032  # It is also a way to make sure we got the proper file name for the real test later on.
25033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034  if test "x$test_shortpath" = x; then
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25038  fi
25039
25040  # Call helper function which possibly converts this using DOS-style short mode.
25041  # If so, the updated path is stored in $new_path.
25042
25043  input_path="$new_path"
25044  # Check if we need to convert this using DOS-style short mode. If the path
25045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046  # take no chances and rewrite it.
25047  # Note: m4 eats our [], so we need to use [ and ] instead.
25048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049  if test "x$has_forbidden_chars" != x; then
25050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054      # Going to short mode and back again did indeed matter. Since short mode is
25055      # case insensitive, let's make it lowercase to improve readability.
25056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057      # Now convert it back to Unix-style (cygpath)
25058      input_path=`$CYGPATH -u "$shortmode_path"`
25059      new_path="$input_path"
25060    fi
25061  fi
25062
25063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064  if test "x$test_cygdrive_prefix" = x; then
25065    # As a simple fix, exclude /usr/bin since it's not a real path.
25066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068      # a path prefixed by /cygdrive for fixpath to work.
25069      new_path="$CYGWIN_ROOT_PATH$input_path"
25070    fi
25071  fi
25072
25073
25074  if test "x$path" != "x$new_path"; then
25075    BOOT_JDK="$new_path"
25076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25078  fi
25079
25080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081
25082  path="$BOOT_JDK"
25083  has_colon=`$ECHO $path | $GREP ^.:`
25084  new_path="$path"
25085  if test "x$has_colon" = x; then
25086    # Not in mixed or Windows style, start by that.
25087    new_path=`cmd //c echo $path`
25088  fi
25089
25090
25091  input_path="$new_path"
25092  # Check if we need to convert this using DOS-style short mode. If the path
25093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094  # take no chances and rewrite it.
25095  # Note: m4 eats our [], so we need to use [ and ] instead.
25096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25097  if test "x$has_forbidden_chars" != x; then
25098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100  fi
25101
25102
25103  windows_path="$new_path"
25104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105    unix_path=`$CYGPATH -u "$windows_path"`
25106    new_path="$unix_path"
25107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25109    new_path="$unix_path"
25110  fi
25111
25112  if test "x$path" != "x$new_path"; then
25113    BOOT_JDK="$new_path"
25114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116  fi
25117
25118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25120
25121    else
25122      # We're on a unix platform. Hooray! :)
25123      path="$BOOT_JDK"
25124      has_space=`$ECHO "$path" | $GREP " "`
25125      if test "x$has_space" != x; then
25126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25129      fi
25130
25131      # Use eval to expand a potential ~
25132      eval path="$path"
25133      if test ! -f "$path" && test ! -d "$path"; then
25134        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25135      fi
25136
25137      if test -d "$path"; then
25138        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25139      else
25140        dir="`$DIRNAME "$path"`"
25141        base="`$BASENAME "$path"`"
25142        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25143      fi
25144    fi
25145  fi
25146
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25148$as_echo_n "checking for Boot JDK... " >&6; }
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25150$as_echo "$BOOT_JDK" >&6; }
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25152$as_echo_n "checking Boot JDK version... " >&6; }
25153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25155$as_echo "$BOOT_JDK_VERSION" >&6; }
25156          fi # end check jdk version
25157        fi # end check javac
25158      fi # end check java
25159    fi # end check boot jdk found
25160  fi
25161
25162    # If that did not work out (e.g. too old), try explicit versions instead
25163
25164  if test "x$BOOT_JDK_FOUND" = xno; then
25165    # Now execute the test
25166
25167  if test -x /usr/libexec/java_home; then
25168    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25169    BOOT_JDK_FOUND=maybe
25170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25171$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25172  fi
25173
25174
25175    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25176    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25177      # Do we have a bin/java?
25178      if test ! -x "$BOOT_JDK/bin/java"; then
25179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25181        BOOT_JDK_FOUND=no
25182      else
25183        # Do we have a bin/javac?
25184        if test ! -x "$BOOT_JDK/bin/javac"; then
25185          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25187          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25188$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25189          BOOT_JDK_FOUND=no
25190        else
25191          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25192          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25193
25194          # Extra M4 quote needed to protect [] in grep expression.
25195          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25196          if test "x$FOUND_CORRECT_VERSION" = x; then
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25200$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25201            BOOT_JDK_FOUND=no
25202          else
25203            # We're done! :-)
25204            BOOT_JDK_FOUND=yes
25205
25206  # Only process if variable expands to non-empty
25207
25208  if test "x$BOOT_JDK" != x; then
25209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25210
25211  # Input might be given as Windows format, start by converting to
25212  # unix format.
25213  path="$BOOT_JDK"
25214  new_path=`$CYGPATH -u "$path"`
25215
25216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25219  # "foo.exe" is OK but "foo" is an error.
25220  #
25221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25222  # It is also a way to make sure we got the proper file name for the real test later on.
25223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25224  if test "x$test_shortpath" = x; then
25225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25227    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25228  fi
25229
25230  # Call helper function which possibly converts this using DOS-style short mode.
25231  # If so, the updated path is stored in $new_path.
25232
25233  input_path="$new_path"
25234  # Check if we need to convert this using DOS-style short mode. If the path
25235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25236  # take no chances and rewrite it.
25237  # Note: m4 eats our [], so we need to use [ and ] instead.
25238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25239  if test "x$has_forbidden_chars" != x; then
25240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25244      # Going to short mode and back again did indeed matter. Since short mode is
25245      # case insensitive, let's make it lowercase to improve readability.
25246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25247      # Now convert it back to Unix-style (cygpath)
25248      input_path=`$CYGPATH -u "$shortmode_path"`
25249      new_path="$input_path"
25250    fi
25251  fi
25252
25253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25254  if test "x$test_cygdrive_prefix" = x; then
25255    # As a simple fix, exclude /usr/bin since it's not a real path.
25256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25258      # a path prefixed by /cygdrive for fixpath to work.
25259      new_path="$CYGWIN_ROOT_PATH$input_path"
25260    fi
25261  fi
25262
25263
25264  if test "x$path" != "x$new_path"; then
25265    BOOT_JDK="$new_path"
25266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25268  fi
25269
25270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271
25272  path="$BOOT_JDK"
25273  has_colon=`$ECHO $path | $GREP ^.:`
25274  new_path="$path"
25275  if test "x$has_colon" = x; then
25276    # Not in mixed or Windows style, start by that.
25277    new_path=`cmd //c echo $path`
25278  fi
25279
25280
25281  input_path="$new_path"
25282  # Check if we need to convert this using DOS-style short mode. If the path
25283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25284  # take no chances and rewrite it.
25285  # Note: m4 eats our [], so we need to use [ and ] instead.
25286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25287  if test "x$has_forbidden_chars" != x; then
25288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25290  fi
25291
25292
25293  windows_path="$new_path"
25294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25295    unix_path=`$CYGPATH -u "$windows_path"`
25296    new_path="$unix_path"
25297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25299    new_path="$unix_path"
25300  fi
25301
25302  if test "x$path" != "x$new_path"; then
25303    BOOT_JDK="$new_path"
25304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25306  fi
25307
25308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25310
25311    else
25312      # We're on a unix platform. Hooray! :)
25313      path="$BOOT_JDK"
25314      has_space=`$ECHO "$path" | $GREP " "`
25315      if test "x$has_space" != x; then
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25319      fi
25320
25321      # Use eval to expand a potential ~
25322      eval path="$path"
25323      if test ! -f "$path" && test ! -d "$path"; then
25324        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25325      fi
25326
25327      if test -d "$path"; then
25328        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25329      else
25330        dir="`$DIRNAME "$path"`"
25331        base="`$BASENAME "$path"`"
25332        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25333      fi
25334    fi
25335  fi
25336
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25338$as_echo_n "checking for Boot JDK... " >&6; }
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25340$as_echo "$BOOT_JDK" >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25342$as_echo_n "checking Boot JDK version... " >&6; }
25343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25345$as_echo "$BOOT_JDK_VERSION" >&6; }
25346          fi # end check jdk version
25347        fi # end check javac
25348      fi # end check java
25349    fi # end check boot jdk found
25350  fi
25351
25352
25353  if test "x$BOOT_JDK_FOUND" = xno; then
25354    # Now execute the test
25355
25356  if test -x /usr/libexec/java_home; then
25357    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25358    BOOT_JDK_FOUND=maybe
25359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25360$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25361  fi
25362
25363
25364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25366      # Do we have a bin/java?
25367      if test ! -x "$BOOT_JDK/bin/java"; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25370        BOOT_JDK_FOUND=no
25371      else
25372        # Do we have a bin/javac?
25373        if test ! -x "$BOOT_JDK/bin/javac"; then
25374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25378          BOOT_JDK_FOUND=no
25379        else
25380          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25381          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25382
25383          # Extra M4 quote needed to protect [] in grep expression.
25384          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25385          if test "x$FOUND_CORRECT_VERSION" = x; then
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25390            BOOT_JDK_FOUND=no
25391          else
25392            # We're done! :-)
25393            BOOT_JDK_FOUND=yes
25394
25395  # Only process if variable expands to non-empty
25396
25397  if test "x$BOOT_JDK" != x; then
25398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25399
25400  # Input might be given as Windows format, start by converting to
25401  # unix format.
25402  path="$BOOT_JDK"
25403  new_path=`$CYGPATH -u "$path"`
25404
25405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25408  # "foo.exe" is OK but "foo" is an error.
25409  #
25410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25411  # It is also a way to make sure we got the proper file name for the real test later on.
25412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25413  if test "x$test_shortpath" = x; then
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25417  fi
25418
25419  # Call helper function which possibly converts this using DOS-style short mode.
25420  # If so, the updated path is stored in $new_path.
25421
25422  input_path="$new_path"
25423  # Check if we need to convert this using DOS-style short mode. If the path
25424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425  # take no chances and rewrite it.
25426  # Note: m4 eats our [], so we need to use [ and ] instead.
25427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25428  if test "x$has_forbidden_chars" != x; then
25429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25433      # Going to short mode and back again did indeed matter. Since short mode is
25434      # case insensitive, let's make it lowercase to improve readability.
25435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436      # Now convert it back to Unix-style (cygpath)
25437      input_path=`$CYGPATH -u "$shortmode_path"`
25438      new_path="$input_path"
25439    fi
25440  fi
25441
25442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25443  if test "x$test_cygdrive_prefix" = x; then
25444    # As a simple fix, exclude /usr/bin since it's not a real path.
25445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25447      # a path prefixed by /cygdrive for fixpath to work.
25448      new_path="$CYGWIN_ROOT_PATH$input_path"
25449    fi
25450  fi
25451
25452
25453  if test "x$path" != "x$new_path"; then
25454    BOOT_JDK="$new_path"
25455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25457  fi
25458
25459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25460
25461  path="$BOOT_JDK"
25462  has_colon=`$ECHO $path | $GREP ^.:`
25463  new_path="$path"
25464  if test "x$has_colon" = x; then
25465    # Not in mixed or Windows style, start by that.
25466    new_path=`cmd //c echo $path`
25467  fi
25468
25469
25470  input_path="$new_path"
25471  # Check if we need to convert this using DOS-style short mode. If the path
25472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25473  # take no chances and rewrite it.
25474  # Note: m4 eats our [], so we need to use [ and ] instead.
25475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25476  if test "x$has_forbidden_chars" != x; then
25477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479  fi
25480
25481
25482  windows_path="$new_path"
25483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484    unix_path=`$CYGPATH -u "$windows_path"`
25485    new_path="$unix_path"
25486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25488    new_path="$unix_path"
25489  fi
25490
25491  if test "x$path" != "x$new_path"; then
25492    BOOT_JDK="$new_path"
25493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25495  fi
25496
25497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25499
25500    else
25501      # We're on a unix platform. Hooray! :)
25502      path="$BOOT_JDK"
25503      has_space=`$ECHO "$path" | $GREP " "`
25504      if test "x$has_space" != x; then
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25508      fi
25509
25510      # Use eval to expand a potential ~
25511      eval path="$path"
25512      if test ! -f "$path" && test ! -d "$path"; then
25513        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25514      fi
25515
25516      if test -d "$path"; then
25517        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25518      else
25519        dir="`$DIRNAME "$path"`"
25520        base="`$BASENAME "$path"`"
25521        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25522      fi
25523    fi
25524  fi
25525
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25527$as_echo_n "checking for Boot JDK... " >&6; }
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25529$as_echo "$BOOT_JDK" >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25531$as_echo_n "checking Boot JDK version... " >&6; }
25532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25534$as_echo "$BOOT_JDK_VERSION" >&6; }
25535          fi # end check jdk version
25536        fi # end check javac
25537      fi # end check java
25538    fi # end check boot jdk found
25539  fi
25540
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test -x /usr/libexec/java_home; then
25546    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25547    BOOT_JDK_FOUND=maybe
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25549$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730  fi
25731
25732
25733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25735      # Do we have a bin/java?
25736      if test ! -x "$BOOT_JDK/bin/java"; then
25737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25739        BOOT_JDK_FOUND=no
25740      else
25741        # Do we have a bin/javac?
25742        if test ! -x "$BOOT_JDK/bin/javac"; then
25743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25747          BOOT_JDK_FOUND=no
25748        else
25749          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25750          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25751
25752          # Extra M4 quote needed to protect [] in grep expression.
25753          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25754          if test "x$FOUND_CORRECT_VERSION" = x; then
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25758$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25759            BOOT_JDK_FOUND=no
25760          else
25761            # We're done! :-)
25762            BOOT_JDK_FOUND=yes
25763
25764  # Only process if variable expands to non-empty
25765
25766  if test "x$BOOT_JDK" != x; then
25767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25768
25769  # Input might be given as Windows format, start by converting to
25770  # unix format.
25771  path="$BOOT_JDK"
25772  new_path=`$CYGPATH -u "$path"`
25773
25774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25777  # "foo.exe" is OK but "foo" is an error.
25778  #
25779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25780  # It is also a way to make sure we got the proper file name for the real test later on.
25781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25782  if test "x$test_shortpath" = x; then
25783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25785    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25786  fi
25787
25788  # Call helper function which possibly converts this using DOS-style short mode.
25789  # If so, the updated path is stored in $new_path.
25790
25791  input_path="$new_path"
25792  # Check if we need to convert this using DOS-style short mode. If the path
25793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25794  # take no chances and rewrite it.
25795  # Note: m4 eats our [], so we need to use [ and ] instead.
25796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25797  if test "x$has_forbidden_chars" != x; then
25798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25802      # Going to short mode and back again did indeed matter. Since short mode is
25803      # case insensitive, let's make it lowercase to improve readability.
25804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25805      # Now convert it back to Unix-style (cygpath)
25806      input_path=`$CYGPATH -u "$shortmode_path"`
25807      new_path="$input_path"
25808    fi
25809  fi
25810
25811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25812  if test "x$test_cygdrive_prefix" = x; then
25813    # As a simple fix, exclude /usr/bin since it's not a real path.
25814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25816      # a path prefixed by /cygdrive for fixpath to work.
25817      new_path="$CYGWIN_ROOT_PATH$input_path"
25818    fi
25819  fi
25820
25821
25822  if test "x$path" != "x$new_path"; then
25823    BOOT_JDK="$new_path"
25824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25826  fi
25827
25828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25829
25830  path="$BOOT_JDK"
25831  has_colon=`$ECHO $path | $GREP ^.:`
25832  new_path="$path"
25833  if test "x$has_colon" = x; then
25834    # Not in mixed or Windows style, start by that.
25835    new_path=`cmd //c echo $path`
25836  fi
25837
25838
25839  input_path="$new_path"
25840  # Check if we need to convert this using DOS-style short mode. If the path
25841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842  # take no chances and rewrite it.
25843  # Note: m4 eats our [], so we need to use [ and ] instead.
25844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25845  if test "x$has_forbidden_chars" != x; then
25846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25848  fi
25849
25850
25851  windows_path="$new_path"
25852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25853    unix_path=`$CYGPATH -u "$windows_path"`
25854    new_path="$unix_path"
25855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25857    new_path="$unix_path"
25858  fi
25859
25860  if test "x$path" != "x$new_path"; then
25861    BOOT_JDK="$new_path"
25862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864  fi
25865
25866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25868
25869    else
25870      # We're on a unix platform. Hooray! :)
25871      path="$BOOT_JDK"
25872      has_space=`$ECHO "$path" | $GREP " "`
25873      if test "x$has_space" != x; then
25874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25877      fi
25878
25879      # Use eval to expand a potential ~
25880      eval path="$path"
25881      if test ! -f "$path" && test ! -d "$path"; then
25882        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25883      fi
25884
25885      if test -d "$path"; then
25886        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25887      else
25888        dir="`$DIRNAME "$path"`"
25889        base="`$BASENAME "$path"`"
25890        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25891      fi
25892    fi
25893  fi
25894
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25896$as_echo_n "checking for Boot JDK... " >&6; }
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25898$as_echo "$BOOT_JDK" >&6; }
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25900$as_echo_n "checking Boot JDK version... " >&6; }
25901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25903$as_echo "$BOOT_JDK_VERSION" >&6; }
25904          fi # end check jdk version
25905        fi # end check javac
25906      fi # end check java
25907    fi # end check boot jdk found
25908  fi
25909
25910
25911  # Test: Is $JAVA_HOME set?
25912
25913  if test "x$BOOT_JDK_FOUND" = xno; then
25914    # Now execute the test
25915
25916  if test "x$JAVA_HOME" != x; then
25917    JAVA_HOME_PROCESSED="$JAVA_HOME"
25918
25919  # Only process if variable expands to non-empty
25920
25921  if test "x$JAVA_HOME_PROCESSED" != x; then
25922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25923
25924  # Input might be given as Windows format, start by converting to
25925  # unix format.
25926  path="$JAVA_HOME_PROCESSED"
25927  new_path=`$CYGPATH -u "$path"`
25928
25929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25932  # "foo.exe" is OK but "foo" is an error.
25933  #
25934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25935  # It is also a way to make sure we got the proper file name for the real test later on.
25936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25937  if test "x$test_shortpath" = x; then
25938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25939$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25940    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25941  fi
25942
25943  # Call helper function which possibly converts this using DOS-style short mode.
25944  # If so, the updated path is stored in $new_path.
25945
25946  input_path="$new_path"
25947  # Check if we need to convert this using DOS-style short mode. If the path
25948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25949  # take no chances and rewrite it.
25950  # Note: m4 eats our [], so we need to use [ and ] instead.
25951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25952  if test "x$has_forbidden_chars" != x; then
25953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25957      # Going to short mode and back again did indeed matter. Since short mode is
25958      # case insensitive, let's make it lowercase to improve readability.
25959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25960      # Now convert it back to Unix-style (cygpath)
25961      input_path=`$CYGPATH -u "$shortmode_path"`
25962      new_path="$input_path"
25963    fi
25964  fi
25965
25966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25967  if test "x$test_cygdrive_prefix" = x; then
25968    # As a simple fix, exclude /usr/bin since it's not a real path.
25969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25971      # a path prefixed by /cygdrive for fixpath to work.
25972      new_path="$CYGWIN_ROOT_PATH$input_path"
25973    fi
25974  fi
25975
25976
25977  if test "x$path" != "x$new_path"; then
25978    JAVA_HOME_PROCESSED="$new_path"
25979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25980$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25981  fi
25982
25983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25984
25985  path="$JAVA_HOME_PROCESSED"
25986  has_colon=`$ECHO $path | $GREP ^.:`
25987  new_path="$path"
25988  if test "x$has_colon" = x; then
25989    # Not in mixed or Windows style, start by that.
25990    new_path=`cmd //c echo $path`
25991  fi
25992
25993
25994  input_path="$new_path"
25995  # Check if we need to convert this using DOS-style short mode. If the path
25996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25997  # take no chances and rewrite it.
25998  # Note: m4 eats our [], so we need to use [ and ] instead.
25999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26000  if test "x$has_forbidden_chars" != x; then
26001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26003  fi
26004
26005
26006  windows_path="$new_path"
26007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26008    unix_path=`$CYGPATH -u "$windows_path"`
26009    new_path="$unix_path"
26010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26012    new_path="$unix_path"
26013  fi
26014
26015  if test "x$path" != "x$new_path"; then
26016    JAVA_HOME_PROCESSED="$new_path"
26017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26018$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26019  fi
26020
26021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26023
26024    else
26025      # We're on a unix platform. Hooray! :)
26026      path="$JAVA_HOME_PROCESSED"
26027      has_space=`$ECHO "$path" | $GREP " "`
26028      if test "x$has_space" != x; then
26029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26030$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26032      fi
26033
26034      # Use eval to expand a potential ~
26035      eval path="$path"
26036      if test ! -f "$path" && test ! -d "$path"; then
26037        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26038      fi
26039
26040      if test -d "$path"; then
26041        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26042      else
26043        dir="`$DIRNAME "$path"`"
26044        base="`$BASENAME "$path"`"
26045        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26046      fi
26047    fi
26048  fi
26049
26050    if test ! -d "$JAVA_HOME_PROCESSED"; then
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26052$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26053    else
26054      # Aha, the user has set a JAVA_HOME
26055      # let us use that as the Boot JDK.
26056      BOOT_JDK="$JAVA_HOME_PROCESSED"
26057      BOOT_JDK_FOUND=maybe
26058      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26059$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26060    fi
26061  fi
26062
26063
26064    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26065    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26066      # Do we have a bin/java?
26067      if test ! -x "$BOOT_JDK/bin/java"; then
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26070        BOOT_JDK_FOUND=no
26071      else
26072        # Do we have a bin/javac?
26073        if test ! -x "$BOOT_JDK/bin/javac"; then
26074          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26076          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26077$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26078          BOOT_JDK_FOUND=no
26079        else
26080          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26081          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26082
26083          # Extra M4 quote needed to protect [] in grep expression.
26084          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26085          if test "x$FOUND_CORRECT_VERSION" = x; then
26086            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26089$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26090            BOOT_JDK_FOUND=no
26091          else
26092            # We're done! :-)
26093            BOOT_JDK_FOUND=yes
26094
26095  # Only process if variable expands to non-empty
26096
26097  if test "x$BOOT_JDK" != x; then
26098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099
26100  # Input might be given as Windows format, start by converting to
26101  # unix format.
26102  path="$BOOT_JDK"
26103  new_path=`$CYGPATH -u "$path"`
26104
26105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26108  # "foo.exe" is OK but "foo" is an error.
26109  #
26110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26111  # It is also a way to make sure we got the proper file name for the real test later on.
26112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26113  if test "x$test_shortpath" = x; then
26114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26116    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26117  fi
26118
26119  # Call helper function which possibly converts this using DOS-style short mode.
26120  # If so, the updated path is stored in $new_path.
26121
26122  input_path="$new_path"
26123  # Check if we need to convert this using DOS-style short mode. If the path
26124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26125  # take no chances and rewrite it.
26126  # Note: m4 eats our [], so we need to use [ and ] instead.
26127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26128  if test "x$has_forbidden_chars" != x; then
26129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26133      # Going to short mode and back again did indeed matter. Since short mode is
26134      # case insensitive, let's make it lowercase to improve readability.
26135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26136      # Now convert it back to Unix-style (cygpath)
26137      input_path=`$CYGPATH -u "$shortmode_path"`
26138      new_path="$input_path"
26139    fi
26140  fi
26141
26142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26143  if test "x$test_cygdrive_prefix" = x; then
26144    # As a simple fix, exclude /usr/bin since it's not a real path.
26145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26147      # a path prefixed by /cygdrive for fixpath to work.
26148      new_path="$CYGWIN_ROOT_PATH$input_path"
26149    fi
26150  fi
26151
26152
26153  if test "x$path" != "x$new_path"; then
26154    BOOT_JDK="$new_path"
26155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26157  fi
26158
26159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26160
26161  path="$BOOT_JDK"
26162  has_colon=`$ECHO $path | $GREP ^.:`
26163  new_path="$path"
26164  if test "x$has_colon" = x; then
26165    # Not in mixed or Windows style, start by that.
26166    new_path=`cmd //c echo $path`
26167  fi
26168
26169
26170  input_path="$new_path"
26171  # Check if we need to convert this using DOS-style short mode. If the path
26172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26173  # take no chances and rewrite it.
26174  # Note: m4 eats our [], so we need to use [ and ] instead.
26175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26176  if test "x$has_forbidden_chars" != x; then
26177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26179  fi
26180
26181
26182  windows_path="$new_path"
26183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184    unix_path=`$CYGPATH -u "$windows_path"`
26185    new_path="$unix_path"
26186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26188    new_path="$unix_path"
26189  fi
26190
26191  if test "x$path" != "x$new_path"; then
26192    BOOT_JDK="$new_path"
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26195  fi
26196
26197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26199
26200    else
26201      # We're on a unix platform. Hooray! :)
26202      path="$BOOT_JDK"
26203      has_space=`$ECHO "$path" | $GREP " "`
26204      if test "x$has_space" != x; then
26205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26206$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26208      fi
26209
26210      # Use eval to expand a potential ~
26211      eval path="$path"
26212      if test ! -f "$path" && test ! -d "$path"; then
26213        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26214      fi
26215
26216      if test -d "$path"; then
26217        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26218      else
26219        dir="`$DIRNAME "$path"`"
26220        base="`$BASENAME "$path"`"
26221        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26222      fi
26223    fi
26224  fi
26225
26226            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26227$as_echo_n "checking for Boot JDK... " >&6; }
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26229$as_echo "$BOOT_JDK" >&6; }
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26231$as_echo_n "checking Boot JDK version... " >&6; }
26232            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26234$as_echo "$BOOT_JDK_VERSION" >&6; }
26235          fi # end check jdk version
26236        fi # end check javac
26237      fi # end check java
26238    fi # end check boot jdk found
26239  fi
26240
26241
26242  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26243
26244  if test "x$BOOT_JDK_FOUND" = xno; then
26245    # Now execute the test
26246
26247  # Extract the first word of "javac", so it can be a program name with args.
26248set dummy javac; ac_word=$2
26249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26250$as_echo_n "checking for $ac_word... " >&6; }
26251if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26252  $as_echo_n "(cached) " >&6
26253else
26254  case $JAVAC_CHECK in
26255  [\\/]* | ?:[\\/]*)
26256  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26257  ;;
26258  *)
26259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26260for as_dir in $PATH
26261do
26262  IFS=$as_save_IFS
26263  test -z "$as_dir" && as_dir=.
26264    for ac_exec_ext in '' $ac_executable_extensions; do
26265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26266    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26268    break 2
26269  fi
26270done
26271  done
26272IFS=$as_save_IFS
26273
26274  ;;
26275esac
26276fi
26277JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26278if test -n "$JAVAC_CHECK"; then
26279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26280$as_echo "$JAVAC_CHECK" >&6; }
26281else
26282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26283$as_echo "no" >&6; }
26284fi
26285
26286
26287  # Extract the first word of "java", so it can be a program name with args.
26288set dummy java; ac_word=$2
26289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290$as_echo_n "checking for $ac_word... " >&6; }
26291if ${ac_cv_path_JAVA_CHECK+:} false; then :
26292  $as_echo_n "(cached) " >&6
26293else
26294  case $JAVA_CHECK in
26295  [\\/]* | ?:[\\/]*)
26296  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26297  ;;
26298  *)
26299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26300for as_dir in $PATH
26301do
26302  IFS=$as_save_IFS
26303  test -z "$as_dir" && as_dir=.
26304    for ac_exec_ext in '' $ac_executable_extensions; do
26305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26306    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26308    break 2
26309  fi
26310done
26311  done
26312IFS=$as_save_IFS
26313
26314  ;;
26315esac
26316fi
26317JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26318if test -n "$JAVA_CHECK"; then
26319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26320$as_echo "$JAVA_CHECK" >&6; }
26321else
26322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26323$as_echo "no" >&6; }
26324fi
26325
26326
26327  BINARY="$JAVAC_CHECK"
26328  if test "x$JAVAC_CHECK" = x; then
26329    BINARY="$JAVA_CHECK"
26330  fi
26331  if test "x$BINARY" != x; then
26332    # So there is a java(c) binary, it might be part of a JDK.
26333    # Lets find the JDK/JRE directory by following symbolic links.
26334    # Linux/GNU systems often have links from /usr/bin/java to
26335    # /etc/alternatives/java to the real JDK binary.
26336
26337  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26338    # Follow a chain of symbolic links. Use readlink
26339    # where it exists, else fall back to horribly
26340    # complicated shell code.
26341    if test "x$READLINK_TESTED" != yes; then
26342      # On MacOSX there is a readlink tool with a different
26343      # purpose than the GNU readlink tool. Check the found readlink.
26344      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26345      if test "x$ISGNU" = x; then
26346        # A readlink that we do not know how to use.
26347        # Are there other non-GNU readlinks out there?
26348        READLINK_TESTED=yes
26349        READLINK=
26350      fi
26351    fi
26352
26353    if test "x$READLINK" != x; then
26354      BINARY=`$READLINK -f $BINARY`
26355    else
26356      # Save the current directory for restoring afterwards
26357      STARTDIR=$PWD
26358      COUNTER=0
26359      sym_link_dir=`$DIRNAME $BINARY`
26360      sym_link_file=`$BASENAME $BINARY`
26361      cd $sym_link_dir
26362      # Use -P flag to resolve symlinks in directories.
26363      cd `$THEPWDCMD -P`
26364      sym_link_dir=`$THEPWDCMD -P`
26365      # Resolve file symlinks
26366      while test $COUNTER -lt 20; do
26367        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26368        if test "x$ISLINK" == x; then
26369          # This is not a symbolic link! We are done!
26370          break
26371        fi
26372        # Again resolve directory symlinks since the target of the just found
26373        # link could be in a different directory
26374        cd `$DIRNAME $ISLINK`
26375        sym_link_dir=`$THEPWDCMD -P`
26376        sym_link_file=`$BASENAME $ISLINK`
26377        let COUNTER=COUNTER+1
26378      done
26379      cd $STARTDIR
26380      BINARY=$sym_link_dir/$sym_link_file
26381    fi
26382  fi
26383
26384    BOOT_JDK=`dirname "$BINARY"`
26385    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26386    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26387      # Looks like we found ourselves an JDK
26388      BOOT_JDK_FOUND=maybe
26389      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26390$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26391    fi
26392  fi
26393
26394
26395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26397      # Do we have a bin/java?
26398      if test ! -x "$BOOT_JDK/bin/java"; then
26399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26401        BOOT_JDK_FOUND=no
26402      else
26403        # Do we have a bin/javac?
26404        if test ! -x "$BOOT_JDK/bin/javac"; then
26405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26409          BOOT_JDK_FOUND=no
26410        else
26411          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26412          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26413
26414          # Extra M4 quote needed to protect [] in grep expression.
26415          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26416          if test "x$FOUND_CORRECT_VERSION" = x; then
26417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26419            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26420$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26421            BOOT_JDK_FOUND=no
26422          else
26423            # We're done! :-)
26424            BOOT_JDK_FOUND=yes
26425
26426  # Only process if variable expands to non-empty
26427
26428  if test "x$BOOT_JDK" != x; then
26429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26430
26431  # Input might be given as Windows format, start by converting to
26432  # unix format.
26433  path="$BOOT_JDK"
26434  new_path=`$CYGPATH -u "$path"`
26435
26436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26439  # "foo.exe" is OK but "foo" is an error.
26440  #
26441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26442  # It is also a way to make sure we got the proper file name for the real test later on.
26443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26444  if test "x$test_shortpath" = x; then
26445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26447    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26448  fi
26449
26450  # Call helper function which possibly converts this using DOS-style short mode.
26451  # If so, the updated path is stored in $new_path.
26452
26453  input_path="$new_path"
26454  # Check if we need to convert this using DOS-style short mode. If the path
26455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26456  # take no chances and rewrite it.
26457  # Note: m4 eats our [], so we need to use [ and ] instead.
26458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26459  if test "x$has_forbidden_chars" != x; then
26460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26464      # Going to short mode and back again did indeed matter. Since short mode is
26465      # case insensitive, let's make it lowercase to improve readability.
26466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26467      # Now convert it back to Unix-style (cygpath)
26468      input_path=`$CYGPATH -u "$shortmode_path"`
26469      new_path="$input_path"
26470    fi
26471  fi
26472
26473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26474  if test "x$test_cygdrive_prefix" = x; then
26475    # As a simple fix, exclude /usr/bin since it's not a real path.
26476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26478      # a path prefixed by /cygdrive for fixpath to work.
26479      new_path="$CYGWIN_ROOT_PATH$input_path"
26480    fi
26481  fi
26482
26483
26484  if test "x$path" != "x$new_path"; then
26485    BOOT_JDK="$new_path"
26486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26488  fi
26489
26490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491
26492  path="$BOOT_JDK"
26493  has_colon=`$ECHO $path | $GREP ^.:`
26494  new_path="$path"
26495  if test "x$has_colon" = x; then
26496    # Not in mixed or Windows style, start by that.
26497    new_path=`cmd //c echo $path`
26498  fi
26499
26500
26501  input_path="$new_path"
26502  # Check if we need to convert this using DOS-style short mode. If the path
26503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26504  # take no chances and rewrite it.
26505  # Note: m4 eats our [], so we need to use [ and ] instead.
26506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26507  if test "x$has_forbidden_chars" != x; then
26508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26510  fi
26511
26512
26513  windows_path="$new_path"
26514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515    unix_path=`$CYGPATH -u "$windows_path"`
26516    new_path="$unix_path"
26517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26519    new_path="$unix_path"
26520  fi
26521
26522  if test "x$path" != "x$new_path"; then
26523    BOOT_JDK="$new_path"
26524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26526  fi
26527
26528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26530
26531    else
26532      # We're on a unix platform. Hooray! :)
26533      path="$BOOT_JDK"
26534      has_space=`$ECHO "$path" | $GREP " "`
26535      if test "x$has_space" != x; then
26536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26539      fi
26540
26541      # Use eval to expand a potential ~
26542      eval path="$path"
26543      if test ! -f "$path" && test ! -d "$path"; then
26544        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26545      fi
26546
26547      if test -d "$path"; then
26548        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26549      else
26550        dir="`$DIRNAME "$path"`"
26551        base="`$BASENAME "$path"`"
26552        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26553      fi
26554    fi
26555  fi
26556
26557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26558$as_echo_n "checking for Boot JDK... " >&6; }
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26560$as_echo "$BOOT_JDK" >&6; }
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26562$as_echo_n "checking Boot JDK version... " >&6; }
26563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26565$as_echo "$BOOT_JDK_VERSION" >&6; }
26566          fi # end check jdk version
26567        fi # end check javac
26568      fi # end check java
26569    fi # end check boot jdk found
26570  fi
26571
26572
26573  # Test: Is there a JDK installed in default, well-known locations?
26574
26575  if test "x$BOOT_JDK_FOUND" = xno; then
26576    # Now execute the test
26577
26578  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26579
26580  if test "x$BOOT_JDK_FOUND" = xno; then
26581    # Now execute the test
26582
26583  if test "x$ProgramW6432" != x; then
26584    VIRTUAL_DIR="$ProgramW6432/Java"
26585
26586  windows_path="$VIRTUAL_DIR"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VIRTUAL_DIR="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VIRTUAL_DIR="$unix_path"
26593  fi
26594
26595
26596  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26597  BOOT_JDK_SUFFIX=""
26598  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26599  if test "x$ALL_JDKS_FOUND" != x; then
26600    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26601
26602  if test "x$BOOT_JDK_FOUND" = xno; then
26603    # Now execute the test
26604
26605        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26606        if test -d "$BOOT_JDK"; then
26607          BOOT_JDK_FOUND=maybe
26608          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26609$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26610        fi
26611
26612
26613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26615      # Do we have a bin/java?
26616      if test ! -x "$BOOT_JDK/bin/java"; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26619        BOOT_JDK_FOUND=no
26620      else
26621        # Do we have a bin/javac?
26622        if test ! -x "$BOOT_JDK/bin/javac"; then
26623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26627          BOOT_JDK_FOUND=no
26628        else
26629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26631
26632          # Extra M4 quote needed to protect [] in grep expression.
26633          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26634          if test "x$FOUND_CORRECT_VERSION" = x; then
26635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26639            BOOT_JDK_FOUND=no
26640          else
26641            # We're done! :-)
26642            BOOT_JDK_FOUND=yes
26643
26644  # Only process if variable expands to non-empty
26645
26646  if test "x$BOOT_JDK" != x; then
26647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648
26649  # Input might be given as Windows format, start by converting to
26650  # unix format.
26651  path="$BOOT_JDK"
26652  new_path=`$CYGPATH -u "$path"`
26653
26654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26657  # "foo.exe" is OK but "foo" is an error.
26658  #
26659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26660  # It is also a way to make sure we got the proper file name for the real test later on.
26661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26662  if test "x$test_shortpath" = x; then
26663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26666  fi
26667
26668  # Call helper function which possibly converts this using DOS-style short mode.
26669  # If so, the updated path is stored in $new_path.
26670
26671  input_path="$new_path"
26672  # Check if we need to convert this using DOS-style short mode. If the path
26673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674  # take no chances and rewrite it.
26675  # Note: m4 eats our [], so we need to use [ and ] instead.
26676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26677  if test "x$has_forbidden_chars" != x; then
26678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26682      # Going to short mode and back again did indeed matter. Since short mode is
26683      # case insensitive, let's make it lowercase to improve readability.
26684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26685      # Now convert it back to Unix-style (cygpath)
26686      input_path=`$CYGPATH -u "$shortmode_path"`
26687      new_path="$input_path"
26688    fi
26689  fi
26690
26691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26692  if test "x$test_cygdrive_prefix" = x; then
26693    # As a simple fix, exclude /usr/bin since it's not a real path.
26694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26696      # a path prefixed by /cygdrive for fixpath to work.
26697      new_path="$CYGWIN_ROOT_PATH$input_path"
26698    fi
26699  fi
26700
26701
26702  if test "x$path" != "x$new_path"; then
26703    BOOT_JDK="$new_path"
26704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26706  fi
26707
26708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26709
26710  path="$BOOT_JDK"
26711  has_colon=`$ECHO $path | $GREP ^.:`
26712  new_path="$path"
26713  if test "x$has_colon" = x; then
26714    # Not in mixed or Windows style, start by that.
26715    new_path=`cmd //c echo $path`
26716  fi
26717
26718
26719  input_path="$new_path"
26720  # Check if we need to convert this using DOS-style short mode. If the path
26721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722  # take no chances and rewrite it.
26723  # Note: m4 eats our [], so we need to use [ and ] instead.
26724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26725  if test "x$has_forbidden_chars" != x; then
26726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26728  fi
26729
26730
26731  windows_path="$new_path"
26732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733    unix_path=`$CYGPATH -u "$windows_path"`
26734    new_path="$unix_path"
26735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26737    new_path="$unix_path"
26738  fi
26739
26740  if test "x$path" != "x$new_path"; then
26741    BOOT_JDK="$new_path"
26742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26744  fi
26745
26746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26748
26749    else
26750      # We're on a unix platform. Hooray! :)
26751      path="$BOOT_JDK"
26752      has_space=`$ECHO "$path" | $GREP " "`
26753      if test "x$has_space" != x; then
26754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26757      fi
26758
26759      # Use eval to expand a potential ~
26760      eval path="$path"
26761      if test ! -f "$path" && test ! -d "$path"; then
26762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26763      fi
26764
26765      if test -d "$path"; then
26766        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26767      else
26768        dir="`$DIRNAME "$path"`"
26769        base="`$BASENAME "$path"`"
26770        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26771      fi
26772    fi
26773  fi
26774
26775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26776$as_echo_n "checking for Boot JDK... " >&6; }
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26778$as_echo "$BOOT_JDK" >&6; }
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26780$as_echo_n "checking Boot JDK version... " >&6; }
26781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26783$as_echo "$BOOT_JDK_VERSION" >&6; }
26784          fi # end check jdk version
26785        fi # end check javac
26786      fi # end check java
26787    fi # end check boot jdk found
26788  fi
26789
26790    done
26791  fi
26792
26793  fi
26794
26795
26796    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26797    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26798      # Do we have a bin/java?
26799      if test ! -x "$BOOT_JDK/bin/java"; then
26800        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26802        BOOT_JDK_FOUND=no
26803      else
26804        # Do we have a bin/javac?
26805        if test ! -x "$BOOT_JDK/bin/javac"; then
26806          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26808          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26809$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26810          BOOT_JDK_FOUND=no
26811        else
26812          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26813          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26814
26815          # Extra M4 quote needed to protect [] in grep expression.
26816          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26817          if test "x$FOUND_CORRECT_VERSION" = x; then
26818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26820            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26821$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26822            BOOT_JDK_FOUND=no
26823          else
26824            # We're done! :-)
26825            BOOT_JDK_FOUND=yes
26826
26827  # Only process if variable expands to non-empty
26828
26829  if test "x$BOOT_JDK" != x; then
26830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831
26832  # Input might be given as Windows format, start by converting to
26833  # unix format.
26834  path="$BOOT_JDK"
26835  new_path=`$CYGPATH -u "$path"`
26836
26837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26840  # "foo.exe" is OK but "foo" is an error.
26841  #
26842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26843  # It is also a way to make sure we got the proper file name for the real test later on.
26844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26845  if test "x$test_shortpath" = x; then
26846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26848    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26849  fi
26850
26851  # Call helper function which possibly converts this using DOS-style short mode.
26852  # If so, the updated path is stored in $new_path.
26853
26854  input_path="$new_path"
26855  # Check if we need to convert this using DOS-style short mode. If the path
26856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26857  # take no chances and rewrite it.
26858  # Note: m4 eats our [], so we need to use [ and ] instead.
26859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26860  if test "x$has_forbidden_chars" != x; then
26861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26865      # Going to short mode and back again did indeed matter. Since short mode is
26866      # case insensitive, let's make it lowercase to improve readability.
26867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26868      # Now convert it back to Unix-style (cygpath)
26869      input_path=`$CYGPATH -u "$shortmode_path"`
26870      new_path="$input_path"
26871    fi
26872  fi
26873
26874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26875  if test "x$test_cygdrive_prefix" = x; then
26876    # As a simple fix, exclude /usr/bin since it's not a real path.
26877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26879      # a path prefixed by /cygdrive for fixpath to work.
26880      new_path="$CYGWIN_ROOT_PATH$input_path"
26881    fi
26882  fi
26883
26884
26885  if test "x$path" != "x$new_path"; then
26886    BOOT_JDK="$new_path"
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26889  fi
26890
26891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26892
26893  path="$BOOT_JDK"
26894  has_colon=`$ECHO $path | $GREP ^.:`
26895  new_path="$path"
26896  if test "x$has_colon" = x; then
26897    # Not in mixed or Windows style, start by that.
26898    new_path=`cmd //c echo $path`
26899  fi
26900
26901
26902  input_path="$new_path"
26903  # Check if we need to convert this using DOS-style short mode. If the path
26904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26905  # take no chances and rewrite it.
26906  # Note: m4 eats our [], so we need to use [ and ] instead.
26907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26908  if test "x$has_forbidden_chars" != x; then
26909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26911  fi
26912
26913
26914  windows_path="$new_path"
26915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916    unix_path=`$CYGPATH -u "$windows_path"`
26917    new_path="$unix_path"
26918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26920    new_path="$unix_path"
26921  fi
26922
26923  if test "x$path" != "x$new_path"; then
26924    BOOT_JDK="$new_path"
26925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927  fi
26928
26929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26931
26932    else
26933      # We're on a unix platform. Hooray! :)
26934      path="$BOOT_JDK"
26935      has_space=`$ECHO "$path" | $GREP " "`
26936      if test "x$has_space" != x; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26940      fi
26941
26942      # Use eval to expand a potential ~
26943      eval path="$path"
26944      if test ! -f "$path" && test ! -d "$path"; then
26945        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26946      fi
26947
26948      if test -d "$path"; then
26949        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26950      else
26951        dir="`$DIRNAME "$path"`"
26952        base="`$BASENAME "$path"`"
26953        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26954      fi
26955    fi
26956  fi
26957
26958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26959$as_echo_n "checking for Boot JDK... " >&6; }
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26961$as_echo "$BOOT_JDK" >&6; }
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26963$as_echo_n "checking Boot JDK version... " >&6; }
26964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26966$as_echo "$BOOT_JDK_VERSION" >&6; }
26967          fi # end check jdk version
26968        fi # end check javac
26969      fi # end check java
26970    fi # end check boot jdk found
26971  fi
26972
26973
26974  if test "x$BOOT_JDK_FOUND" = xno; then
26975    # Now execute the test
26976
26977  if test "x$PROGRAMW6432" != x; then
26978    VIRTUAL_DIR="$PROGRAMW6432/Java"
26979
26980  windows_path="$VIRTUAL_DIR"
26981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982    unix_path=`$CYGPATH -u "$windows_path"`
26983    VIRTUAL_DIR="$unix_path"
26984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26986    VIRTUAL_DIR="$unix_path"
26987  fi
26988
26989
26990  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26991  BOOT_JDK_SUFFIX=""
26992  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26993  if test "x$ALL_JDKS_FOUND" != x; then
26994    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26995
26996  if test "x$BOOT_JDK_FOUND" = xno; then
26997    # Now execute the test
26998
26999        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27000        if test -d "$BOOT_JDK"; then
27001          BOOT_JDK_FOUND=maybe
27002          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27003$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27004        fi
27005
27006
27007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27009      # Do we have a bin/java?
27010      if test ! -x "$BOOT_JDK/bin/java"; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27013        BOOT_JDK_FOUND=no
27014      else
27015        # Do we have a bin/javac?
27016        if test ! -x "$BOOT_JDK/bin/javac"; then
27017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27021          BOOT_JDK_FOUND=no
27022        else
27023          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27024          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27025
27026          # Extra M4 quote needed to protect [] in grep expression.
27027          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27028          if test "x$FOUND_CORRECT_VERSION" = x; then
27029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27031            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27032$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27033            BOOT_JDK_FOUND=no
27034          else
27035            # We're done! :-)
27036            BOOT_JDK_FOUND=yes
27037
27038  # Only process if variable expands to non-empty
27039
27040  if test "x$BOOT_JDK" != x; then
27041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042
27043  # Input might be given as Windows format, start by converting to
27044  # unix format.
27045  path="$BOOT_JDK"
27046  new_path=`$CYGPATH -u "$path"`
27047
27048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27051  # "foo.exe" is OK but "foo" is an error.
27052  #
27053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27054  # It is also a way to make sure we got the proper file name for the real test later on.
27055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27056  if test "x$test_shortpath" = x; then
27057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27060  fi
27061
27062  # Call helper function which possibly converts this using DOS-style short mode.
27063  # If so, the updated path is stored in $new_path.
27064
27065  input_path="$new_path"
27066  # Check if we need to convert this using DOS-style short mode. If the path
27067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27068  # take no chances and rewrite it.
27069  # Note: m4 eats our [], so we need to use [ and ] instead.
27070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27071  if test "x$has_forbidden_chars" != x; then
27072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27076      # Going to short mode and back again did indeed matter. Since short mode is
27077      # case insensitive, let's make it lowercase to improve readability.
27078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27079      # Now convert it back to Unix-style (cygpath)
27080      input_path=`$CYGPATH -u "$shortmode_path"`
27081      new_path="$input_path"
27082    fi
27083  fi
27084
27085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27086  if test "x$test_cygdrive_prefix" = x; then
27087    # As a simple fix, exclude /usr/bin since it's not a real path.
27088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27090      # a path prefixed by /cygdrive for fixpath to work.
27091      new_path="$CYGWIN_ROOT_PATH$input_path"
27092    fi
27093  fi
27094
27095
27096  if test "x$path" != "x$new_path"; then
27097    BOOT_JDK="$new_path"
27098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27100  fi
27101
27102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27103
27104  path="$BOOT_JDK"
27105  has_colon=`$ECHO $path | $GREP ^.:`
27106  new_path="$path"
27107  if test "x$has_colon" = x; then
27108    # Not in mixed or Windows style, start by that.
27109    new_path=`cmd //c echo $path`
27110  fi
27111
27112
27113  input_path="$new_path"
27114  # Check if we need to convert this using DOS-style short mode. If the path
27115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27116  # take no chances and rewrite it.
27117  # Note: m4 eats our [], so we need to use [ and ] instead.
27118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27119  if test "x$has_forbidden_chars" != x; then
27120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122  fi
27123
27124
27125  windows_path="$new_path"
27126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127    unix_path=`$CYGPATH -u "$windows_path"`
27128    new_path="$unix_path"
27129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131    new_path="$unix_path"
27132  fi
27133
27134  if test "x$path" != "x$new_path"; then
27135    BOOT_JDK="$new_path"
27136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27138  fi
27139
27140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27142
27143    else
27144      # We're on a unix platform. Hooray! :)
27145      path="$BOOT_JDK"
27146      has_space=`$ECHO "$path" | $GREP " "`
27147      if test "x$has_space" != x; then
27148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27151      fi
27152
27153      # Use eval to expand a potential ~
27154      eval path="$path"
27155      if test ! -f "$path" && test ! -d "$path"; then
27156        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27157      fi
27158
27159      if test -d "$path"; then
27160        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27161      else
27162        dir="`$DIRNAME "$path"`"
27163        base="`$BASENAME "$path"`"
27164        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27165      fi
27166    fi
27167  fi
27168
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27170$as_echo_n "checking for Boot JDK... " >&6; }
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27172$as_echo "$BOOT_JDK" >&6; }
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27174$as_echo_n "checking Boot JDK version... " >&6; }
27175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27177$as_echo "$BOOT_JDK_VERSION" >&6; }
27178          fi # end check jdk version
27179        fi # end check javac
27180      fi # end check java
27181    fi # end check boot jdk found
27182  fi
27183
27184    done
27185  fi
27186
27187  fi
27188
27189
27190    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27191    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27192      # Do we have a bin/java?
27193      if test ! -x "$BOOT_JDK/bin/java"; then
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27196        BOOT_JDK_FOUND=no
27197      else
27198        # Do we have a bin/javac?
27199        if test ! -x "$BOOT_JDK/bin/javac"; then
27200          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27202          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27203$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27204          BOOT_JDK_FOUND=no
27205        else
27206          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27207          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27208
27209          # Extra M4 quote needed to protect [] in grep expression.
27210          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27211          if test "x$FOUND_CORRECT_VERSION" = x; then
27212            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27214            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27215$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27216            BOOT_JDK_FOUND=no
27217          else
27218            # We're done! :-)
27219            BOOT_JDK_FOUND=yes
27220
27221  # Only process if variable expands to non-empty
27222
27223  if test "x$BOOT_JDK" != x; then
27224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225
27226  # Input might be given as Windows format, start by converting to
27227  # unix format.
27228  path="$BOOT_JDK"
27229  new_path=`$CYGPATH -u "$path"`
27230
27231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27234  # "foo.exe" is OK but "foo" is an error.
27235  #
27236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27237  # It is also a way to make sure we got the proper file name for the real test later on.
27238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27239  if test "x$test_shortpath" = x; then
27240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27242    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27243  fi
27244
27245  # Call helper function which possibly converts this using DOS-style short mode.
27246  # If so, the updated path is stored in $new_path.
27247
27248  input_path="$new_path"
27249  # Check if we need to convert this using DOS-style short mode. If the path
27250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27251  # take no chances and rewrite it.
27252  # Note: m4 eats our [], so we need to use [ and ] instead.
27253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27254  if test "x$has_forbidden_chars" != x; then
27255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27259      # Going to short mode and back again did indeed matter. Since short mode is
27260      # case insensitive, let's make it lowercase to improve readability.
27261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262      # Now convert it back to Unix-style (cygpath)
27263      input_path=`$CYGPATH -u "$shortmode_path"`
27264      new_path="$input_path"
27265    fi
27266  fi
27267
27268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27269  if test "x$test_cygdrive_prefix" = x; then
27270    # As a simple fix, exclude /usr/bin since it's not a real path.
27271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27273      # a path prefixed by /cygdrive for fixpath to work.
27274      new_path="$CYGWIN_ROOT_PATH$input_path"
27275    fi
27276  fi
27277
27278
27279  if test "x$path" != "x$new_path"; then
27280    BOOT_JDK="$new_path"
27281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27283  fi
27284
27285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27286
27287  path="$BOOT_JDK"
27288  has_colon=`$ECHO $path | $GREP ^.:`
27289  new_path="$path"
27290  if test "x$has_colon" = x; then
27291    # Not in mixed or Windows style, start by that.
27292    new_path=`cmd //c echo $path`
27293  fi
27294
27295
27296  input_path="$new_path"
27297  # Check if we need to convert this using DOS-style short mode. If the path
27298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27299  # take no chances and rewrite it.
27300  # Note: m4 eats our [], so we need to use [ and ] instead.
27301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27302  if test "x$has_forbidden_chars" != x; then
27303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27305  fi
27306
27307
27308  windows_path="$new_path"
27309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310    unix_path=`$CYGPATH -u "$windows_path"`
27311    new_path="$unix_path"
27312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314    new_path="$unix_path"
27315  fi
27316
27317  if test "x$path" != "x$new_path"; then
27318    BOOT_JDK="$new_path"
27319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27321  fi
27322
27323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27325
27326    else
27327      # We're on a unix platform. Hooray! :)
27328      path="$BOOT_JDK"
27329      has_space=`$ECHO "$path" | $GREP " "`
27330      if test "x$has_space" != x; then
27331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27333        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27334      fi
27335
27336      # Use eval to expand a potential ~
27337      eval path="$path"
27338      if test ! -f "$path" && test ! -d "$path"; then
27339        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27340      fi
27341
27342      if test -d "$path"; then
27343        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27344      else
27345        dir="`$DIRNAME "$path"`"
27346        base="`$BASENAME "$path"`"
27347        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27348      fi
27349    fi
27350  fi
27351
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27353$as_echo_n "checking for Boot JDK... " >&6; }
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27355$as_echo "$BOOT_JDK" >&6; }
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27357$as_echo_n "checking Boot JDK version... " >&6; }
27358            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27360$as_echo "$BOOT_JDK_VERSION" >&6; }
27361          fi # end check jdk version
27362        fi # end check javac
27363      fi # end check java
27364    fi # end check boot jdk found
27365  fi
27366
27367
27368  if test "x$BOOT_JDK_FOUND" = xno; then
27369    # Now execute the test
27370
27371  if test "x$PROGRAMFILES" != x; then
27372    VIRTUAL_DIR="$PROGRAMFILES/Java"
27373
27374  windows_path="$VIRTUAL_DIR"
27375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27376    unix_path=`$CYGPATH -u "$windows_path"`
27377    VIRTUAL_DIR="$unix_path"
27378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27380    VIRTUAL_DIR="$unix_path"
27381  fi
27382
27383
27384  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27385  BOOT_JDK_SUFFIX=""
27386  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27387  if test "x$ALL_JDKS_FOUND" != x; then
27388    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27389
27390  if test "x$BOOT_JDK_FOUND" = xno; then
27391    # Now execute the test
27392
27393        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27394        if test -d "$BOOT_JDK"; then
27395          BOOT_JDK_FOUND=maybe
27396          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27397$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27398        fi
27399
27400
27401    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27402    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27403      # Do we have a bin/java?
27404      if test ! -x "$BOOT_JDK/bin/java"; then
27405        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27407        BOOT_JDK_FOUND=no
27408      else
27409        # Do we have a bin/javac?
27410        if test ! -x "$BOOT_JDK/bin/javac"; then
27411          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27413          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27414$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27415          BOOT_JDK_FOUND=no
27416        else
27417          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27418          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27419
27420          # Extra M4 quote needed to protect [] in grep expression.
27421          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27422          if test "x$FOUND_CORRECT_VERSION" = x; then
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27426$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27427            BOOT_JDK_FOUND=no
27428          else
27429            # We're done! :-)
27430            BOOT_JDK_FOUND=yes
27431
27432  # Only process if variable expands to non-empty
27433
27434  if test "x$BOOT_JDK" != x; then
27435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27436
27437  # Input might be given as Windows format, start by converting to
27438  # unix format.
27439  path="$BOOT_JDK"
27440  new_path=`$CYGPATH -u "$path"`
27441
27442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27445  # "foo.exe" is OK but "foo" is an error.
27446  #
27447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27448  # It is also a way to make sure we got the proper file name for the real test later on.
27449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27450  if test "x$test_shortpath" = x; then
27451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27454  fi
27455
27456  # Call helper function which possibly converts this using DOS-style short mode.
27457  # If so, the updated path is stored in $new_path.
27458
27459  input_path="$new_path"
27460  # Check if we need to convert this using DOS-style short mode. If the path
27461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27462  # take no chances and rewrite it.
27463  # Note: m4 eats our [], so we need to use [ and ] instead.
27464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27465  if test "x$has_forbidden_chars" != x; then
27466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27470      # Going to short mode and back again did indeed matter. Since short mode is
27471      # case insensitive, let's make it lowercase to improve readability.
27472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27473      # Now convert it back to Unix-style (cygpath)
27474      input_path=`$CYGPATH -u "$shortmode_path"`
27475      new_path="$input_path"
27476    fi
27477  fi
27478
27479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27480  if test "x$test_cygdrive_prefix" = x; then
27481    # As a simple fix, exclude /usr/bin since it's not a real path.
27482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27484      # a path prefixed by /cygdrive for fixpath to work.
27485      new_path="$CYGWIN_ROOT_PATH$input_path"
27486    fi
27487  fi
27488
27489
27490  if test "x$path" != "x$new_path"; then
27491    BOOT_JDK="$new_path"
27492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27494  fi
27495
27496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27497
27498  path="$BOOT_JDK"
27499  has_colon=`$ECHO $path | $GREP ^.:`
27500  new_path="$path"
27501  if test "x$has_colon" = x; then
27502    # Not in mixed or Windows style, start by that.
27503    new_path=`cmd //c echo $path`
27504  fi
27505
27506
27507  input_path="$new_path"
27508  # Check if we need to convert this using DOS-style short mode. If the path
27509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27510  # take no chances and rewrite it.
27511  # Note: m4 eats our [], so we need to use [ and ] instead.
27512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27513  if test "x$has_forbidden_chars" != x; then
27514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27516  fi
27517
27518
27519  windows_path="$new_path"
27520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521    unix_path=`$CYGPATH -u "$windows_path"`
27522    new_path="$unix_path"
27523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27525    new_path="$unix_path"
27526  fi
27527
27528  if test "x$path" != "x$new_path"; then
27529    BOOT_JDK="$new_path"
27530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27532  fi
27533
27534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27536
27537    else
27538      # We're on a unix platform. Hooray! :)
27539      path="$BOOT_JDK"
27540      has_space=`$ECHO "$path" | $GREP " "`
27541      if test "x$has_space" != x; then
27542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27545      fi
27546
27547      # Use eval to expand a potential ~
27548      eval path="$path"
27549      if test ! -f "$path" && test ! -d "$path"; then
27550        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27551      fi
27552
27553      if test -d "$path"; then
27554        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27555      else
27556        dir="`$DIRNAME "$path"`"
27557        base="`$BASENAME "$path"`"
27558        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27559      fi
27560    fi
27561  fi
27562
27563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27564$as_echo_n "checking for Boot JDK... " >&6; }
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27566$as_echo "$BOOT_JDK" >&6; }
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27568$as_echo_n "checking Boot JDK version... " >&6; }
27569            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27571$as_echo "$BOOT_JDK_VERSION" >&6; }
27572          fi # end check jdk version
27573        fi # end check javac
27574      fi # end check java
27575    fi # end check boot jdk found
27576  fi
27577
27578    done
27579  fi
27580
27581  fi
27582
27583
27584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27586      # Do we have a bin/java?
27587      if test ! -x "$BOOT_JDK/bin/java"; then
27588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27590        BOOT_JDK_FOUND=no
27591      else
27592        # Do we have a bin/javac?
27593        if test ! -x "$BOOT_JDK/bin/javac"; then
27594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27598          BOOT_JDK_FOUND=no
27599        else
27600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27602
27603          # Extra M4 quote needed to protect [] in grep expression.
27604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27605          if test "x$FOUND_CORRECT_VERSION" = x; then
27606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27610            BOOT_JDK_FOUND=no
27611          else
27612            # We're done! :-)
27613            BOOT_JDK_FOUND=yes
27614
27615  # Only process if variable expands to non-empty
27616
27617  if test "x$BOOT_JDK" != x; then
27618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619
27620  # Input might be given as Windows format, start by converting to
27621  # unix format.
27622  path="$BOOT_JDK"
27623  new_path=`$CYGPATH -u "$path"`
27624
27625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27628  # "foo.exe" is OK but "foo" is an error.
27629  #
27630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27631  # It is also a way to make sure we got the proper file name for the real test later on.
27632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27633  if test "x$test_shortpath" = x; then
27634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27637  fi
27638
27639  # Call helper function which possibly converts this using DOS-style short mode.
27640  # If so, the updated path is stored in $new_path.
27641
27642  input_path="$new_path"
27643  # Check if we need to convert this using DOS-style short mode. If the path
27644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27645  # take no chances and rewrite it.
27646  # Note: m4 eats our [], so we need to use [ and ] instead.
27647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27648  if test "x$has_forbidden_chars" != x; then
27649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27653      # Going to short mode and back again did indeed matter. Since short mode is
27654      # case insensitive, let's make it lowercase to improve readability.
27655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27656      # Now convert it back to Unix-style (cygpath)
27657      input_path=`$CYGPATH -u "$shortmode_path"`
27658      new_path="$input_path"
27659    fi
27660  fi
27661
27662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27663  if test "x$test_cygdrive_prefix" = x; then
27664    # As a simple fix, exclude /usr/bin since it's not a real path.
27665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27667      # a path prefixed by /cygdrive for fixpath to work.
27668      new_path="$CYGWIN_ROOT_PATH$input_path"
27669    fi
27670  fi
27671
27672
27673  if test "x$path" != "x$new_path"; then
27674    BOOT_JDK="$new_path"
27675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27677  fi
27678
27679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680
27681  path="$BOOT_JDK"
27682  has_colon=`$ECHO $path | $GREP ^.:`
27683  new_path="$path"
27684  if test "x$has_colon" = x; then
27685    # Not in mixed or Windows style, start by that.
27686    new_path=`cmd //c echo $path`
27687  fi
27688
27689
27690  input_path="$new_path"
27691  # Check if we need to convert this using DOS-style short mode. If the path
27692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27693  # take no chances and rewrite it.
27694  # Note: m4 eats our [], so we need to use [ and ] instead.
27695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27696  if test "x$has_forbidden_chars" != x; then
27697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699  fi
27700
27701
27702  windows_path="$new_path"
27703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704    unix_path=`$CYGPATH -u "$windows_path"`
27705    new_path="$unix_path"
27706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27708    new_path="$unix_path"
27709  fi
27710
27711  if test "x$path" != "x$new_path"; then
27712    BOOT_JDK="$new_path"
27713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27715  fi
27716
27717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27719
27720    else
27721      # We're on a unix platform. Hooray! :)
27722      path="$BOOT_JDK"
27723      has_space=`$ECHO "$path" | $GREP " "`
27724      if test "x$has_space" != x; then
27725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27728      fi
27729
27730      # Use eval to expand a potential ~
27731      eval path="$path"
27732      if test ! -f "$path" && test ! -d "$path"; then
27733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27734      fi
27735
27736      if test -d "$path"; then
27737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27738      else
27739        dir="`$DIRNAME "$path"`"
27740        base="`$BASENAME "$path"`"
27741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27742      fi
27743    fi
27744  fi
27745
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27747$as_echo_n "checking for Boot JDK... " >&6; }
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27749$as_echo "$BOOT_JDK" >&6; }
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27751$as_echo_n "checking Boot JDK version... " >&6; }
27752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27754$as_echo "$BOOT_JDK_VERSION" >&6; }
27755          fi # end check jdk version
27756        fi # end check javac
27757      fi # end check java
27758    fi # end check boot jdk found
27759  fi
27760
27761
27762  if test "x$BOOT_JDK_FOUND" = xno; then
27763    # Now execute the test
27764
27765  if test "x$ProgramFiles" != x; then
27766    VIRTUAL_DIR="$ProgramFiles/Java"
27767
27768  windows_path="$VIRTUAL_DIR"
27769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770    unix_path=`$CYGPATH -u "$windows_path"`
27771    VIRTUAL_DIR="$unix_path"
27772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27774    VIRTUAL_DIR="$unix_path"
27775  fi
27776
27777
27778  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27779  BOOT_JDK_SUFFIX=""
27780  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27781  if test "x$ALL_JDKS_FOUND" != x; then
27782    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27783
27784  if test "x$BOOT_JDK_FOUND" = xno; then
27785    # Now execute the test
27786
27787        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27788        if test -d "$BOOT_JDK"; then
27789          BOOT_JDK_FOUND=maybe
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27791$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27792        fi
27793
27794
27795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27797      # Do we have a bin/java?
27798      if test ! -x "$BOOT_JDK/bin/java"; then
27799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27801        BOOT_JDK_FOUND=no
27802      else
27803        # Do we have a bin/javac?
27804        if test ! -x "$BOOT_JDK/bin/javac"; then
27805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27809          BOOT_JDK_FOUND=no
27810        else
27811          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27812          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27813
27814          # Extra M4 quote needed to protect [] in grep expression.
27815          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27816          if test "x$FOUND_CORRECT_VERSION" = x; then
27817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27820$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27821            BOOT_JDK_FOUND=no
27822          else
27823            # We're done! :-)
27824            BOOT_JDK_FOUND=yes
27825
27826  # Only process if variable expands to non-empty
27827
27828  if test "x$BOOT_JDK" != x; then
27829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830
27831  # Input might be given as Windows format, start by converting to
27832  # unix format.
27833  path="$BOOT_JDK"
27834  new_path=`$CYGPATH -u "$path"`
27835
27836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27839  # "foo.exe" is OK but "foo" is an error.
27840  #
27841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27842  # It is also a way to make sure we got the proper file name for the real test later on.
27843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27844  if test "x$test_shortpath" = x; then
27845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27847    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27848  fi
27849
27850  # Call helper function which possibly converts this using DOS-style short mode.
27851  # If so, the updated path is stored in $new_path.
27852
27853  input_path="$new_path"
27854  # Check if we need to convert this using DOS-style short mode. If the path
27855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27856  # take no chances and rewrite it.
27857  # Note: m4 eats our [], so we need to use [ and ] instead.
27858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27859  if test "x$has_forbidden_chars" != x; then
27860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27864      # Going to short mode and back again did indeed matter. Since short mode is
27865      # case insensitive, let's make it lowercase to improve readability.
27866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27867      # Now convert it back to Unix-style (cygpath)
27868      input_path=`$CYGPATH -u "$shortmode_path"`
27869      new_path="$input_path"
27870    fi
27871  fi
27872
27873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27874  if test "x$test_cygdrive_prefix" = x; then
27875    # As a simple fix, exclude /usr/bin since it's not a real path.
27876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27878      # a path prefixed by /cygdrive for fixpath to work.
27879      new_path="$CYGWIN_ROOT_PATH$input_path"
27880    fi
27881  fi
27882
27883
27884  if test "x$path" != "x$new_path"; then
27885    BOOT_JDK="$new_path"
27886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27888  fi
27889
27890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27891
27892  path="$BOOT_JDK"
27893  has_colon=`$ECHO $path | $GREP ^.:`
27894  new_path="$path"
27895  if test "x$has_colon" = x; then
27896    # Not in mixed or Windows style, start by that.
27897    new_path=`cmd //c echo $path`
27898  fi
27899
27900
27901  input_path="$new_path"
27902  # Check if we need to convert this using DOS-style short mode. If the path
27903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27904  # take no chances and rewrite it.
27905  # Note: m4 eats our [], so we need to use [ and ] instead.
27906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27907  if test "x$has_forbidden_chars" != x; then
27908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27910  fi
27911
27912
27913  windows_path="$new_path"
27914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27915    unix_path=`$CYGPATH -u "$windows_path"`
27916    new_path="$unix_path"
27917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27919    new_path="$unix_path"
27920  fi
27921
27922  if test "x$path" != "x$new_path"; then
27923    BOOT_JDK="$new_path"
27924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27926  fi
27927
27928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27930
27931    else
27932      # We're on a unix platform. Hooray! :)
27933      path="$BOOT_JDK"
27934      has_space=`$ECHO "$path" | $GREP " "`
27935      if test "x$has_space" != x; then
27936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27939      fi
27940
27941      # Use eval to expand a potential ~
27942      eval path="$path"
27943      if test ! -f "$path" && test ! -d "$path"; then
27944        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27945      fi
27946
27947      if test -d "$path"; then
27948        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27949      else
27950        dir="`$DIRNAME "$path"`"
27951        base="`$BASENAME "$path"`"
27952        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27953      fi
27954    fi
27955  fi
27956
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27958$as_echo_n "checking for Boot JDK... " >&6; }
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27960$as_echo "$BOOT_JDK" >&6; }
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27962$as_echo_n "checking Boot JDK version... " >&6; }
27963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27965$as_echo "$BOOT_JDK_VERSION" >&6; }
27966          fi # end check jdk version
27967        fi # end check javac
27968      fi # end check java
27969    fi # end check boot jdk found
27970  fi
27971
27972    done
27973  fi
27974
27975  fi
27976
27977
27978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27980      # Do we have a bin/java?
27981      if test ! -x "$BOOT_JDK/bin/java"; then
27982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27984        BOOT_JDK_FOUND=no
27985      else
27986        # Do we have a bin/javac?
27987        if test ! -x "$BOOT_JDK/bin/javac"; then
27988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27992          BOOT_JDK_FOUND=no
27993        else
27994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27996
27997          # Extra M4 quote needed to protect [] in grep expression.
27998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27999          if test "x$FOUND_CORRECT_VERSION" = x; then
28000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28004            BOOT_JDK_FOUND=no
28005          else
28006            # We're done! :-)
28007            BOOT_JDK_FOUND=yes
28008
28009  # Only process if variable expands to non-empty
28010
28011  if test "x$BOOT_JDK" != x; then
28012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013
28014  # Input might be given as Windows format, start by converting to
28015  # unix format.
28016  path="$BOOT_JDK"
28017  new_path=`$CYGPATH -u "$path"`
28018
28019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28022  # "foo.exe" is OK but "foo" is an error.
28023  #
28024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28025  # It is also a way to make sure we got the proper file name for the real test later on.
28026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28027  if test "x$test_shortpath" = x; then
28028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28031  fi
28032
28033  # Call helper function which possibly converts this using DOS-style short mode.
28034  # If so, the updated path is stored in $new_path.
28035
28036  input_path="$new_path"
28037  # Check if we need to convert this using DOS-style short mode. If the path
28038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28039  # take no chances and rewrite it.
28040  # Note: m4 eats our [], so we need to use [ and ] instead.
28041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28042  if test "x$has_forbidden_chars" != x; then
28043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28047      # Going to short mode and back again did indeed matter. Since short mode is
28048      # case insensitive, let's make it lowercase to improve readability.
28049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28050      # Now convert it back to Unix-style (cygpath)
28051      input_path=`$CYGPATH -u "$shortmode_path"`
28052      new_path="$input_path"
28053    fi
28054  fi
28055
28056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28057  if test "x$test_cygdrive_prefix" = x; then
28058    # As a simple fix, exclude /usr/bin since it's not a real path.
28059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28061      # a path prefixed by /cygdrive for fixpath to work.
28062      new_path="$CYGWIN_ROOT_PATH$input_path"
28063    fi
28064  fi
28065
28066
28067  if test "x$path" != "x$new_path"; then
28068    BOOT_JDK="$new_path"
28069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28071  fi
28072
28073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074
28075  path="$BOOT_JDK"
28076  has_colon=`$ECHO $path | $GREP ^.:`
28077  new_path="$path"
28078  if test "x$has_colon" = x; then
28079    # Not in mixed or Windows style, start by that.
28080    new_path=`cmd //c echo $path`
28081  fi
28082
28083
28084  input_path="$new_path"
28085  # Check if we need to convert this using DOS-style short mode. If the path
28086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28087  # take no chances and rewrite it.
28088  # Note: m4 eats our [], so we need to use [ and ] instead.
28089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28090  if test "x$has_forbidden_chars" != x; then
28091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28093  fi
28094
28095
28096  windows_path="$new_path"
28097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098    unix_path=`$CYGPATH -u "$windows_path"`
28099    new_path="$unix_path"
28100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28102    new_path="$unix_path"
28103  fi
28104
28105  if test "x$path" != "x$new_path"; then
28106    BOOT_JDK="$new_path"
28107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28109  fi
28110
28111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28113
28114    else
28115      # We're on a unix platform. Hooray! :)
28116      path="$BOOT_JDK"
28117      has_space=`$ECHO "$path" | $GREP " "`
28118      if test "x$has_space" != x; then
28119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28122      fi
28123
28124      # Use eval to expand a potential ~
28125      eval path="$path"
28126      if test ! -f "$path" && test ! -d "$path"; then
28127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28128      fi
28129
28130      if test -d "$path"; then
28131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28132      else
28133        dir="`$DIRNAME "$path"`"
28134        base="`$BASENAME "$path"`"
28135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28136      fi
28137    fi
28138  fi
28139
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28141$as_echo_n "checking for Boot JDK... " >&6; }
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28143$as_echo "$BOOT_JDK" >&6; }
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28145$as_echo_n "checking Boot JDK version... " >&6; }
28146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28148$as_echo "$BOOT_JDK_VERSION" >&6; }
28149          fi # end check jdk version
28150        fi # end check javac
28151      fi # end check java
28152    fi # end check boot jdk found
28153  fi
28154
28155
28156  if test "x$BOOT_JDK_FOUND" = xno; then
28157    # Now execute the test
28158
28159  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28160  BOOT_JDK_SUFFIX=""
28161  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28162  if test "x$ALL_JDKS_FOUND" != x; then
28163    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28164
28165  if test "x$BOOT_JDK_FOUND" = xno; then
28166    # Now execute the test
28167
28168        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28169        if test -d "$BOOT_JDK"; then
28170          BOOT_JDK_FOUND=maybe
28171          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28172$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28173        fi
28174
28175
28176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28178      # Do we have a bin/java?
28179      if test ! -x "$BOOT_JDK/bin/java"; then
28180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28182        BOOT_JDK_FOUND=no
28183      else
28184        # Do we have a bin/javac?
28185        if test ! -x "$BOOT_JDK/bin/javac"; then
28186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28190          BOOT_JDK_FOUND=no
28191        else
28192          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28193          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28194
28195          # Extra M4 quote needed to protect [] in grep expression.
28196          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28197          if test "x$FOUND_CORRECT_VERSION" = x; then
28198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28201$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28202            BOOT_JDK_FOUND=no
28203          else
28204            # We're done! :-)
28205            BOOT_JDK_FOUND=yes
28206
28207  # Only process if variable expands to non-empty
28208
28209  if test "x$BOOT_JDK" != x; then
28210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28211
28212  # Input might be given as Windows format, start by converting to
28213  # unix format.
28214  path="$BOOT_JDK"
28215  new_path=`$CYGPATH -u "$path"`
28216
28217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28220  # "foo.exe" is OK but "foo" is an error.
28221  #
28222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28223  # It is also a way to make sure we got the proper file name for the real test later on.
28224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28225  if test "x$test_shortpath" = x; then
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28229  fi
28230
28231  # Call helper function which possibly converts this using DOS-style short mode.
28232  # If so, the updated path is stored in $new_path.
28233
28234  input_path="$new_path"
28235  # Check if we need to convert this using DOS-style short mode. If the path
28236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28237  # take no chances and rewrite it.
28238  # Note: m4 eats our [], so we need to use [ and ] instead.
28239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28240  if test "x$has_forbidden_chars" != x; then
28241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28245      # Going to short mode and back again did indeed matter. Since short mode is
28246      # case insensitive, let's make it lowercase to improve readability.
28247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28248      # Now convert it back to Unix-style (cygpath)
28249      input_path=`$CYGPATH -u "$shortmode_path"`
28250      new_path="$input_path"
28251    fi
28252  fi
28253
28254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28255  if test "x$test_cygdrive_prefix" = x; then
28256    # As a simple fix, exclude /usr/bin since it's not a real path.
28257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28259      # a path prefixed by /cygdrive for fixpath to work.
28260      new_path="$CYGWIN_ROOT_PATH$input_path"
28261    fi
28262  fi
28263
28264
28265  if test "x$path" != "x$new_path"; then
28266    BOOT_JDK="$new_path"
28267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28269  fi
28270
28271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28272
28273  path="$BOOT_JDK"
28274  has_colon=`$ECHO $path | $GREP ^.:`
28275  new_path="$path"
28276  if test "x$has_colon" = x; then
28277    # Not in mixed or Windows style, start by that.
28278    new_path=`cmd //c echo $path`
28279  fi
28280
28281
28282  input_path="$new_path"
28283  # Check if we need to convert this using DOS-style short mode. If the path
28284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28285  # take no chances and rewrite it.
28286  # Note: m4 eats our [], so we need to use [ and ] instead.
28287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28288  if test "x$has_forbidden_chars" != x; then
28289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28291  fi
28292
28293
28294  windows_path="$new_path"
28295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28296    unix_path=`$CYGPATH -u "$windows_path"`
28297    new_path="$unix_path"
28298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28300    new_path="$unix_path"
28301  fi
28302
28303  if test "x$path" != "x$new_path"; then
28304    BOOT_JDK="$new_path"
28305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28307  fi
28308
28309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28311
28312    else
28313      # We're on a unix platform. Hooray! :)
28314      path="$BOOT_JDK"
28315      has_space=`$ECHO "$path" | $GREP " "`
28316      if test "x$has_space" != x; then
28317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28320      fi
28321
28322      # Use eval to expand a potential ~
28323      eval path="$path"
28324      if test ! -f "$path" && test ! -d "$path"; then
28325        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28326      fi
28327
28328      if test -d "$path"; then
28329        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28330      else
28331        dir="`$DIRNAME "$path"`"
28332        base="`$BASENAME "$path"`"
28333        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28334      fi
28335    fi
28336  fi
28337
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28339$as_echo_n "checking for Boot JDK... " >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28341$as_echo "$BOOT_JDK" >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28343$as_echo_n "checking Boot JDK version... " >&6; }
28344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28346$as_echo "$BOOT_JDK_VERSION" >&6; }
28347          fi # end check jdk version
28348        fi # end check javac
28349      fi # end check java
28350    fi # end check boot jdk found
28351  fi
28352
28353    done
28354  fi
28355
28356
28357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28359      # Do we have a bin/java?
28360      if test ! -x "$BOOT_JDK/bin/java"; then
28361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28363        BOOT_JDK_FOUND=no
28364      else
28365        # Do we have a bin/javac?
28366        if test ! -x "$BOOT_JDK/bin/javac"; then
28367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28371          BOOT_JDK_FOUND=no
28372        else
28373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28375
28376          # Extra M4 quote needed to protect [] in grep expression.
28377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28378          if test "x$FOUND_CORRECT_VERSION" = x; then
28379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28383            BOOT_JDK_FOUND=no
28384          else
28385            # We're done! :-)
28386            BOOT_JDK_FOUND=yes
28387
28388  # Only process if variable expands to non-empty
28389
28390  if test "x$BOOT_JDK" != x; then
28391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392
28393  # Input might be given as Windows format, start by converting to
28394  # unix format.
28395  path="$BOOT_JDK"
28396  new_path=`$CYGPATH -u "$path"`
28397
28398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401  # "foo.exe" is OK but "foo" is an error.
28402  #
28403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28404  # It is also a way to make sure we got the proper file name for the real test later on.
28405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406  if test "x$test_shortpath" = x; then
28407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28410  fi
28411
28412  # Call helper function which possibly converts this using DOS-style short mode.
28413  # If so, the updated path is stored in $new_path.
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28426      # Going to short mode and back again did indeed matter. Since short mode is
28427      # case insensitive, let's make it lowercase to improve readability.
28428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429      # Now convert it back to Unix-style (cygpath)
28430      input_path=`$CYGPATH -u "$shortmode_path"`
28431      new_path="$input_path"
28432    fi
28433  fi
28434
28435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28436  if test "x$test_cygdrive_prefix" = x; then
28437    # As a simple fix, exclude /usr/bin since it's not a real path.
28438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28440      # a path prefixed by /cygdrive for fixpath to work.
28441      new_path="$CYGWIN_ROOT_PATH$input_path"
28442    fi
28443  fi
28444
28445
28446  if test "x$path" != "x$new_path"; then
28447    BOOT_JDK="$new_path"
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28450  fi
28451
28452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28453
28454  path="$BOOT_JDK"
28455  has_colon=`$ECHO $path | $GREP ^.:`
28456  new_path="$path"
28457  if test "x$has_colon" = x; then
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $path`
28460  fi
28461
28462
28463  input_path="$new_path"
28464  # Check if we need to convert this using DOS-style short mode. If the path
28465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466  # take no chances and rewrite it.
28467  # Note: m4 eats our [], so we need to use [ and ] instead.
28468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28469  if test "x$has_forbidden_chars" != x; then
28470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28472  fi
28473
28474
28475  windows_path="$new_path"
28476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477    unix_path=`$CYGPATH -u "$windows_path"`
28478    new_path="$unix_path"
28479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481    new_path="$unix_path"
28482  fi
28483
28484  if test "x$path" != "x$new_path"; then
28485    BOOT_JDK="$new_path"
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488  fi
28489
28490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28492
28493    else
28494      # We're on a unix platform. Hooray! :)
28495      path="$BOOT_JDK"
28496      has_space=`$ECHO "$path" | $GREP " "`
28497      if test "x$has_space" != x; then
28498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28501      fi
28502
28503      # Use eval to expand a potential ~
28504      eval path="$path"
28505      if test ! -f "$path" && test ! -d "$path"; then
28506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28507      fi
28508
28509      if test -d "$path"; then
28510        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28511      else
28512        dir="`$DIRNAME "$path"`"
28513        base="`$BASENAME "$path"`"
28514        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28515      fi
28516    fi
28517  fi
28518
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28520$as_echo_n "checking for Boot JDK... " >&6; }
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28522$as_echo "$BOOT_JDK" >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28524$as_echo_n "checking Boot JDK version... " >&6; }
28525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28527$as_echo "$BOOT_JDK_VERSION" >&6; }
28528          fi # end check jdk version
28529        fi # end check javac
28530      fi # end check java
28531    fi # end check boot jdk found
28532  fi
28533
28534  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28535
28536  if test "x$BOOT_JDK_FOUND" = xno; then
28537    # Now execute the test
28538
28539  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28540  BOOT_JDK_SUFFIX="/Contents/Home"
28541  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28542  if test "x$ALL_JDKS_FOUND" != x; then
28543    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28544
28545  if test "x$BOOT_JDK_FOUND" = xno; then
28546    # Now execute the test
28547
28548        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28549        if test -d "$BOOT_JDK"; then
28550          BOOT_JDK_FOUND=maybe
28551          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28552$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28553        fi
28554
28555
28556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28558      # Do we have a bin/java?
28559      if test ! -x "$BOOT_JDK/bin/java"; then
28560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28562        BOOT_JDK_FOUND=no
28563      else
28564        # Do we have a bin/javac?
28565        if test ! -x "$BOOT_JDK/bin/javac"; then
28566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28570          BOOT_JDK_FOUND=no
28571        else
28572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28574
28575          # Extra M4 quote needed to protect [] in grep expression.
28576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28577          if test "x$FOUND_CORRECT_VERSION" = x; then
28578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28582            BOOT_JDK_FOUND=no
28583          else
28584            # We're done! :-)
28585            BOOT_JDK_FOUND=yes
28586
28587  # Only process if variable expands to non-empty
28588
28589  if test "x$BOOT_JDK" != x; then
28590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591
28592  # Input might be given as Windows format, start by converting to
28593  # unix format.
28594  path="$BOOT_JDK"
28595  new_path=`$CYGPATH -u "$path"`
28596
28597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28600  # "foo.exe" is OK but "foo" is an error.
28601  #
28602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28603  # It is also a way to make sure we got the proper file name for the real test later on.
28604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28605  if test "x$test_shortpath" = x; then
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28609  fi
28610
28611  # Call helper function which possibly converts this using DOS-style short mode.
28612  # If so, the updated path is stored in $new_path.
28613
28614  input_path="$new_path"
28615  # Check if we need to convert this using DOS-style short mode. If the path
28616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28617  # take no chances and rewrite it.
28618  # Note: m4 eats our [], so we need to use [ and ] instead.
28619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28620  if test "x$has_forbidden_chars" != x; then
28621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28625      # Going to short mode and back again did indeed matter. Since short mode is
28626      # case insensitive, let's make it lowercase to improve readability.
28627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28628      # Now convert it back to Unix-style (cygpath)
28629      input_path=`$CYGPATH -u "$shortmode_path"`
28630      new_path="$input_path"
28631    fi
28632  fi
28633
28634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28635  if test "x$test_cygdrive_prefix" = x; then
28636    # As a simple fix, exclude /usr/bin since it's not a real path.
28637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28639      # a path prefixed by /cygdrive for fixpath to work.
28640      new_path="$CYGWIN_ROOT_PATH$input_path"
28641    fi
28642  fi
28643
28644
28645  if test "x$path" != "x$new_path"; then
28646    BOOT_JDK="$new_path"
28647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28649  fi
28650
28651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28652
28653  path="$BOOT_JDK"
28654  has_colon=`$ECHO $path | $GREP ^.:`
28655  new_path="$path"
28656  if test "x$has_colon" = x; then
28657    # Not in mixed or Windows style, start by that.
28658    new_path=`cmd //c echo $path`
28659  fi
28660
28661
28662  input_path="$new_path"
28663  # Check if we need to convert this using DOS-style short mode. If the path
28664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28665  # take no chances and rewrite it.
28666  # Note: m4 eats our [], so we need to use [ and ] instead.
28667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28668  if test "x$has_forbidden_chars" != x; then
28669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28671  fi
28672
28673
28674  windows_path="$new_path"
28675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28676    unix_path=`$CYGPATH -u "$windows_path"`
28677    new_path="$unix_path"
28678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28680    new_path="$unix_path"
28681  fi
28682
28683  if test "x$path" != "x$new_path"; then
28684    BOOT_JDK="$new_path"
28685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28687  fi
28688
28689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28691
28692    else
28693      # We're on a unix platform. Hooray! :)
28694      path="$BOOT_JDK"
28695      has_space=`$ECHO "$path" | $GREP " "`
28696      if test "x$has_space" != x; then
28697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28700      fi
28701
28702      # Use eval to expand a potential ~
28703      eval path="$path"
28704      if test ! -f "$path" && test ! -d "$path"; then
28705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28706      fi
28707
28708      if test -d "$path"; then
28709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28710      else
28711        dir="`$DIRNAME "$path"`"
28712        base="`$BASENAME "$path"`"
28713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28714      fi
28715    fi
28716  fi
28717
28718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28719$as_echo_n "checking for Boot JDK... " >&6; }
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28721$as_echo "$BOOT_JDK" >&6; }
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28723$as_echo_n "checking Boot JDK version... " >&6; }
28724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28726$as_echo "$BOOT_JDK_VERSION" >&6; }
28727          fi # end check jdk version
28728        fi # end check javac
28729      fi # end check java
28730    fi # end check boot jdk found
28731  fi
28732
28733    done
28734  fi
28735
28736
28737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28739      # Do we have a bin/java?
28740      if test ! -x "$BOOT_JDK/bin/java"; then
28741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28743        BOOT_JDK_FOUND=no
28744      else
28745        # Do we have a bin/javac?
28746        if test ! -x "$BOOT_JDK/bin/javac"; then
28747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28751          BOOT_JDK_FOUND=no
28752        else
28753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28755
28756          # Extra M4 quote needed to protect [] in grep expression.
28757          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28758          if test "x$FOUND_CORRECT_VERSION" = x; then
28759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28763            BOOT_JDK_FOUND=no
28764          else
28765            # We're done! :-)
28766            BOOT_JDK_FOUND=yes
28767
28768  # Only process if variable expands to non-empty
28769
28770  if test "x$BOOT_JDK" != x; then
28771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28772
28773  # Input might be given as Windows format, start by converting to
28774  # unix format.
28775  path="$BOOT_JDK"
28776  new_path=`$CYGPATH -u "$path"`
28777
28778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28781  # "foo.exe" is OK but "foo" is an error.
28782  #
28783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28784  # It is also a way to make sure we got the proper file name for the real test later on.
28785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28786  if test "x$test_shortpath" = x; then
28787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28790  fi
28791
28792  # Call helper function which possibly converts this using DOS-style short mode.
28793  # If so, the updated path is stored in $new_path.
28794
28795  input_path="$new_path"
28796  # Check if we need to convert this using DOS-style short mode. If the path
28797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28798  # take no chances and rewrite it.
28799  # Note: m4 eats our [], so we need to use [ and ] instead.
28800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28801  if test "x$has_forbidden_chars" != x; then
28802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28806      # Going to short mode and back again did indeed matter. Since short mode is
28807      # case insensitive, let's make it lowercase to improve readability.
28808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28809      # Now convert it back to Unix-style (cygpath)
28810      input_path=`$CYGPATH -u "$shortmode_path"`
28811      new_path="$input_path"
28812    fi
28813  fi
28814
28815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28816  if test "x$test_cygdrive_prefix" = x; then
28817    # As a simple fix, exclude /usr/bin since it's not a real path.
28818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28820      # a path prefixed by /cygdrive for fixpath to work.
28821      new_path="$CYGWIN_ROOT_PATH$input_path"
28822    fi
28823  fi
28824
28825
28826  if test "x$path" != "x$new_path"; then
28827    BOOT_JDK="$new_path"
28828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28830  fi
28831
28832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28833
28834  path="$BOOT_JDK"
28835  has_colon=`$ECHO $path | $GREP ^.:`
28836  new_path="$path"
28837  if test "x$has_colon" = x; then
28838    # Not in mixed or Windows style, start by that.
28839    new_path=`cmd //c echo $path`
28840  fi
28841
28842
28843  input_path="$new_path"
28844  # Check if we need to convert this using DOS-style short mode. If the path
28845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28846  # take no chances and rewrite it.
28847  # Note: m4 eats our [], so we need to use [ and ] instead.
28848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28849  if test "x$has_forbidden_chars" != x; then
28850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28852  fi
28853
28854
28855  windows_path="$new_path"
28856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28857    unix_path=`$CYGPATH -u "$windows_path"`
28858    new_path="$unix_path"
28859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28861    new_path="$unix_path"
28862  fi
28863
28864  if test "x$path" != "x$new_path"; then
28865    BOOT_JDK="$new_path"
28866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28868  fi
28869
28870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28872
28873    else
28874      # We're on a unix platform. Hooray! :)
28875      path="$BOOT_JDK"
28876      has_space=`$ECHO "$path" | $GREP " "`
28877      if test "x$has_space" != x; then
28878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28881      fi
28882
28883      # Use eval to expand a potential ~
28884      eval path="$path"
28885      if test ! -f "$path" && test ! -d "$path"; then
28886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28887      fi
28888
28889      if test -d "$path"; then
28890        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28891      else
28892        dir="`$DIRNAME "$path"`"
28893        base="`$BASENAME "$path"`"
28894        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28895      fi
28896    fi
28897  fi
28898
28899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28900$as_echo_n "checking for Boot JDK... " >&6; }
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28902$as_echo "$BOOT_JDK" >&6; }
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28904$as_echo_n "checking Boot JDK version... " >&6; }
28905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28907$as_echo "$BOOT_JDK_VERSION" >&6; }
28908          fi # end check jdk version
28909        fi # end check javac
28910      fi # end check java
28911    fi # end check boot jdk found
28912  fi
28913
28914
28915  if test "x$BOOT_JDK_FOUND" = xno; then
28916    # Now execute the test
28917
28918  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28919  BOOT_JDK_SUFFIX="/Contents/Home"
28920  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28921  if test "x$ALL_JDKS_FOUND" != x; then
28922    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28923
28924  if test "x$BOOT_JDK_FOUND" = xno; then
28925    # Now execute the test
28926
28927        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28928        if test -d "$BOOT_JDK"; then
28929          BOOT_JDK_FOUND=maybe
28930          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28931$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28932        fi
28933
28934
28935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28937      # Do we have a bin/java?
28938      if test ! -x "$BOOT_JDK/bin/java"; then
28939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28941        BOOT_JDK_FOUND=no
28942      else
28943        # Do we have a bin/javac?
28944        if test ! -x "$BOOT_JDK/bin/javac"; then
28945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28949          BOOT_JDK_FOUND=no
28950        else
28951          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28952          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28953
28954          # Extra M4 quote needed to protect [] in grep expression.
28955          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28956          if test "x$FOUND_CORRECT_VERSION" = x; then
28957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28960$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28961            BOOT_JDK_FOUND=no
28962          else
28963            # We're done! :-)
28964            BOOT_JDK_FOUND=yes
28965
28966  # Only process if variable expands to non-empty
28967
28968  if test "x$BOOT_JDK" != x; then
28969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28970
28971  # Input might be given as Windows format, start by converting to
28972  # unix format.
28973  path="$BOOT_JDK"
28974  new_path=`$CYGPATH -u "$path"`
28975
28976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28979  # "foo.exe" is OK but "foo" is an error.
28980  #
28981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28982  # It is also a way to make sure we got the proper file name for the real test later on.
28983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28984  if test "x$test_shortpath" = x; then
28985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28987    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28988  fi
28989
28990  # Call helper function which possibly converts this using DOS-style short mode.
28991  # If so, the updated path is stored in $new_path.
28992
28993  input_path="$new_path"
28994  # Check if we need to convert this using DOS-style short mode. If the path
28995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28996  # take no chances and rewrite it.
28997  # Note: m4 eats our [], so we need to use [ and ] instead.
28998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28999  if test "x$has_forbidden_chars" != x; then
29000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29004      # Going to short mode and back again did indeed matter. Since short mode is
29005      # case insensitive, let's make it lowercase to improve readability.
29006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29007      # Now convert it back to Unix-style (cygpath)
29008      input_path=`$CYGPATH -u "$shortmode_path"`
29009      new_path="$input_path"
29010    fi
29011  fi
29012
29013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29014  if test "x$test_cygdrive_prefix" = x; then
29015    # As a simple fix, exclude /usr/bin since it's not a real path.
29016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29018      # a path prefixed by /cygdrive for fixpath to work.
29019      new_path="$CYGWIN_ROOT_PATH$input_path"
29020    fi
29021  fi
29022
29023
29024  if test "x$path" != "x$new_path"; then
29025    BOOT_JDK="$new_path"
29026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29027$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29028  fi
29029
29030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29031
29032  path="$BOOT_JDK"
29033  has_colon=`$ECHO $path | $GREP ^.:`
29034  new_path="$path"
29035  if test "x$has_colon" = x; then
29036    # Not in mixed or Windows style, start by that.
29037    new_path=`cmd //c echo $path`
29038  fi
29039
29040
29041  input_path="$new_path"
29042  # Check if we need to convert this using DOS-style short mode. If the path
29043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29044  # take no chances and rewrite it.
29045  # Note: m4 eats our [], so we need to use [ and ] instead.
29046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29047  if test "x$has_forbidden_chars" != x; then
29048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29050  fi
29051
29052
29053  windows_path="$new_path"
29054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29055    unix_path=`$CYGPATH -u "$windows_path"`
29056    new_path="$unix_path"
29057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29059    new_path="$unix_path"
29060  fi
29061
29062  if test "x$path" != "x$new_path"; then
29063    BOOT_JDK="$new_path"
29064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29066  fi
29067
29068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29070
29071    else
29072      # We're on a unix platform. Hooray! :)
29073      path="$BOOT_JDK"
29074      has_space=`$ECHO "$path" | $GREP " "`
29075      if test "x$has_space" != x; then
29076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29079      fi
29080
29081      # Use eval to expand a potential ~
29082      eval path="$path"
29083      if test ! -f "$path" && test ! -d "$path"; then
29084        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29085      fi
29086
29087      if test -d "$path"; then
29088        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29089      else
29090        dir="`$DIRNAME "$path"`"
29091        base="`$BASENAME "$path"`"
29092        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29093      fi
29094    fi
29095  fi
29096
29097            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29098$as_echo_n "checking for Boot JDK... " >&6; }
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29100$as_echo "$BOOT_JDK" >&6; }
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29102$as_echo_n "checking Boot JDK version... " >&6; }
29103            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29105$as_echo "$BOOT_JDK_VERSION" >&6; }
29106          fi # end check jdk version
29107        fi # end check javac
29108      fi # end check java
29109    fi # end check boot jdk found
29110  fi
29111
29112    done
29113  fi
29114
29115
29116    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29117    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29118      # Do we have a bin/java?
29119      if test ! -x "$BOOT_JDK/bin/java"; then
29120        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29122        BOOT_JDK_FOUND=no
29123      else
29124        # Do we have a bin/javac?
29125        if test ! -x "$BOOT_JDK/bin/javac"; then
29126          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29129$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29130          BOOT_JDK_FOUND=no
29131        else
29132          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29133          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29134
29135          # Extra M4 quote needed to protect [] in grep expression.
29136          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29137          if test "x$FOUND_CORRECT_VERSION" = x; then
29138            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29140            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29141$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29142            BOOT_JDK_FOUND=no
29143          else
29144            # We're done! :-)
29145            BOOT_JDK_FOUND=yes
29146
29147  # Only process if variable expands to non-empty
29148
29149  if test "x$BOOT_JDK" != x; then
29150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29151
29152  # Input might be given as Windows format, start by converting to
29153  # unix format.
29154  path="$BOOT_JDK"
29155  new_path=`$CYGPATH -u "$path"`
29156
29157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29160  # "foo.exe" is OK but "foo" is an error.
29161  #
29162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29163  # It is also a way to make sure we got the proper file name for the real test later on.
29164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29165  if test "x$test_shortpath" = x; then
29166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29169  fi
29170
29171  # Call helper function which possibly converts this using DOS-style short mode.
29172  # If so, the updated path is stored in $new_path.
29173
29174  input_path="$new_path"
29175  # Check if we need to convert this using DOS-style short mode. If the path
29176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29177  # take no chances and rewrite it.
29178  # Note: m4 eats our [], so we need to use [ and ] instead.
29179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29180  if test "x$has_forbidden_chars" != x; then
29181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29185      # Going to short mode and back again did indeed matter. Since short mode is
29186      # case insensitive, let's make it lowercase to improve readability.
29187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29188      # Now convert it back to Unix-style (cygpath)
29189      input_path=`$CYGPATH -u "$shortmode_path"`
29190      new_path="$input_path"
29191    fi
29192  fi
29193
29194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29195  if test "x$test_cygdrive_prefix" = x; then
29196    # As a simple fix, exclude /usr/bin since it's not a real path.
29197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29199      # a path prefixed by /cygdrive for fixpath to work.
29200      new_path="$CYGWIN_ROOT_PATH$input_path"
29201    fi
29202  fi
29203
29204
29205  if test "x$path" != "x$new_path"; then
29206    BOOT_JDK="$new_path"
29207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29209  fi
29210
29211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29212
29213  path="$BOOT_JDK"
29214  has_colon=`$ECHO $path | $GREP ^.:`
29215  new_path="$path"
29216  if test "x$has_colon" = x; then
29217    # Not in mixed or Windows style, start by that.
29218    new_path=`cmd //c echo $path`
29219  fi
29220
29221
29222  input_path="$new_path"
29223  # Check if we need to convert this using DOS-style short mode. If the path
29224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29225  # take no chances and rewrite it.
29226  # Note: m4 eats our [], so we need to use [ and ] instead.
29227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29228  if test "x$has_forbidden_chars" != x; then
29229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29231  fi
29232
29233
29234  windows_path="$new_path"
29235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29236    unix_path=`$CYGPATH -u "$windows_path"`
29237    new_path="$unix_path"
29238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29240    new_path="$unix_path"
29241  fi
29242
29243  if test "x$path" != "x$new_path"; then
29244    BOOT_JDK="$new_path"
29245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29247  fi
29248
29249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29251
29252    else
29253      # We're on a unix platform. Hooray! :)
29254      path="$BOOT_JDK"
29255      has_space=`$ECHO "$path" | $GREP " "`
29256      if test "x$has_space" != x; then
29257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29260      fi
29261
29262      # Use eval to expand a potential ~
29263      eval path="$path"
29264      if test ! -f "$path" && test ! -d "$path"; then
29265        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29266      fi
29267
29268      if test -d "$path"; then
29269        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29270      else
29271        dir="`$DIRNAME "$path"`"
29272        base="`$BASENAME "$path"`"
29273        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29274      fi
29275    fi
29276  fi
29277
29278            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29279$as_echo_n "checking for Boot JDK... " >&6; }
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29281$as_echo "$BOOT_JDK" >&6; }
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29283$as_echo_n "checking Boot JDK version... " >&6; }
29284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29286$as_echo "$BOOT_JDK_VERSION" >&6; }
29287          fi # end check jdk version
29288        fi # end check javac
29289      fi # end check java
29290    fi # end check boot jdk found
29291  fi
29292
29293  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29294
29295  if test "x$BOOT_JDK_FOUND" = xno; then
29296    # Now execute the test
29297
29298  BOOT_JDK_PREFIX="/usr/lib/jvm"
29299  BOOT_JDK_SUFFIX=""
29300  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29301  if test "x$ALL_JDKS_FOUND" != x; then
29302    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29303
29304  if test "x$BOOT_JDK_FOUND" = xno; then
29305    # Now execute the test
29306
29307        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29308        if test -d "$BOOT_JDK"; then
29309          BOOT_JDK_FOUND=maybe
29310          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29311$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29312        fi
29313
29314
29315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29317      # Do we have a bin/java?
29318      if test ! -x "$BOOT_JDK/bin/java"; then
29319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29321        BOOT_JDK_FOUND=no
29322      else
29323        # Do we have a bin/javac?
29324        if test ! -x "$BOOT_JDK/bin/javac"; then
29325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29329          BOOT_JDK_FOUND=no
29330        else
29331          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29332          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29333
29334          # Extra M4 quote needed to protect [] in grep expression.
29335          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29336          if test "x$FOUND_CORRECT_VERSION" = x; then
29337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29339            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29340$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29341            BOOT_JDK_FOUND=no
29342          else
29343            # We're done! :-)
29344            BOOT_JDK_FOUND=yes
29345
29346  # Only process if variable expands to non-empty
29347
29348  if test "x$BOOT_JDK" != x; then
29349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29350
29351  # Input might be given as Windows format, start by converting to
29352  # unix format.
29353  path="$BOOT_JDK"
29354  new_path=`$CYGPATH -u "$path"`
29355
29356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29359  # "foo.exe" is OK but "foo" is an error.
29360  #
29361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29362  # It is also a way to make sure we got the proper file name for the real test later on.
29363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29364  if test "x$test_shortpath" = x; then
29365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29368  fi
29369
29370  # Call helper function which possibly converts this using DOS-style short mode.
29371  # If so, the updated path is stored in $new_path.
29372
29373  input_path="$new_path"
29374  # Check if we need to convert this using DOS-style short mode. If the path
29375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29376  # take no chances and rewrite it.
29377  # Note: m4 eats our [], so we need to use [ and ] instead.
29378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29379  if test "x$has_forbidden_chars" != x; then
29380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29384      # Going to short mode and back again did indeed matter. Since short mode is
29385      # case insensitive, let's make it lowercase to improve readability.
29386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29387      # Now convert it back to Unix-style (cygpath)
29388      input_path=`$CYGPATH -u "$shortmode_path"`
29389      new_path="$input_path"
29390    fi
29391  fi
29392
29393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29394  if test "x$test_cygdrive_prefix" = x; then
29395    # As a simple fix, exclude /usr/bin since it's not a real path.
29396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29398      # a path prefixed by /cygdrive for fixpath to work.
29399      new_path="$CYGWIN_ROOT_PATH$input_path"
29400    fi
29401  fi
29402
29403
29404  if test "x$path" != "x$new_path"; then
29405    BOOT_JDK="$new_path"
29406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29408  fi
29409
29410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29411
29412  path="$BOOT_JDK"
29413  has_colon=`$ECHO $path | $GREP ^.:`
29414  new_path="$path"
29415  if test "x$has_colon" = x; then
29416    # Not in mixed or Windows style, start by that.
29417    new_path=`cmd //c echo $path`
29418  fi
29419
29420
29421  input_path="$new_path"
29422  # Check if we need to convert this using DOS-style short mode. If the path
29423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29424  # take no chances and rewrite it.
29425  # Note: m4 eats our [], so we need to use [ and ] instead.
29426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29427  if test "x$has_forbidden_chars" != x; then
29428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29430  fi
29431
29432
29433  windows_path="$new_path"
29434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29435    unix_path=`$CYGPATH -u "$windows_path"`
29436    new_path="$unix_path"
29437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29439    new_path="$unix_path"
29440  fi
29441
29442  if test "x$path" != "x$new_path"; then
29443    BOOT_JDK="$new_path"
29444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29446  fi
29447
29448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29450
29451    else
29452      # We're on a unix platform. Hooray! :)
29453      path="$BOOT_JDK"
29454      has_space=`$ECHO "$path" | $GREP " "`
29455      if test "x$has_space" != x; then
29456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29459      fi
29460
29461      # Use eval to expand a potential ~
29462      eval path="$path"
29463      if test ! -f "$path" && test ! -d "$path"; then
29464        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29465      fi
29466
29467      if test -d "$path"; then
29468        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29469      else
29470        dir="`$DIRNAME "$path"`"
29471        base="`$BASENAME "$path"`"
29472        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29473      fi
29474    fi
29475  fi
29476
29477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29478$as_echo_n "checking for Boot JDK... " >&6; }
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29480$as_echo "$BOOT_JDK" >&6; }
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29482$as_echo_n "checking Boot JDK version... " >&6; }
29483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29485$as_echo "$BOOT_JDK_VERSION" >&6; }
29486          fi # end check jdk version
29487        fi # end check javac
29488      fi # end check java
29489    fi # end check boot jdk found
29490  fi
29491
29492    done
29493  fi
29494
29495
29496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29498      # Do we have a bin/java?
29499      if test ! -x "$BOOT_JDK/bin/java"; then
29500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29502        BOOT_JDK_FOUND=no
29503      else
29504        # Do we have a bin/javac?
29505        if test ! -x "$BOOT_JDK/bin/javac"; then
29506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29510          BOOT_JDK_FOUND=no
29511        else
29512          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29513          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29514
29515          # Extra M4 quote needed to protect [] in grep expression.
29516          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29517          if test "x$FOUND_CORRECT_VERSION" = x; then
29518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29520            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29521$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29522            BOOT_JDK_FOUND=no
29523          else
29524            # We're done! :-)
29525            BOOT_JDK_FOUND=yes
29526
29527  # Only process if variable expands to non-empty
29528
29529  if test "x$BOOT_JDK" != x; then
29530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29531
29532  # Input might be given as Windows format, start by converting to
29533  # unix format.
29534  path="$BOOT_JDK"
29535  new_path=`$CYGPATH -u "$path"`
29536
29537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29540  # "foo.exe" is OK but "foo" is an error.
29541  #
29542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29543  # It is also a way to make sure we got the proper file name for the real test later on.
29544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29545  if test "x$test_shortpath" = x; then
29546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29549  fi
29550
29551  # Call helper function which possibly converts this using DOS-style short mode.
29552  # If so, the updated path is stored in $new_path.
29553
29554  input_path="$new_path"
29555  # Check if we need to convert this using DOS-style short mode. If the path
29556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29557  # take no chances and rewrite it.
29558  # Note: m4 eats our [], so we need to use [ and ] instead.
29559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29560  if test "x$has_forbidden_chars" != x; then
29561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29565      # Going to short mode and back again did indeed matter. Since short mode is
29566      # case insensitive, let's make it lowercase to improve readability.
29567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29568      # Now convert it back to Unix-style (cygpath)
29569      input_path=`$CYGPATH -u "$shortmode_path"`
29570      new_path="$input_path"
29571    fi
29572  fi
29573
29574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29575  if test "x$test_cygdrive_prefix" = x; then
29576    # As a simple fix, exclude /usr/bin since it's not a real path.
29577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29579      # a path prefixed by /cygdrive for fixpath to work.
29580      new_path="$CYGWIN_ROOT_PATH$input_path"
29581    fi
29582  fi
29583
29584
29585  if test "x$path" != "x$new_path"; then
29586    BOOT_JDK="$new_path"
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29589  fi
29590
29591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29592
29593  path="$BOOT_JDK"
29594  has_colon=`$ECHO $path | $GREP ^.:`
29595  new_path="$path"
29596  if test "x$has_colon" = x; then
29597    # Not in mixed or Windows style, start by that.
29598    new_path=`cmd //c echo $path`
29599  fi
29600
29601
29602  input_path="$new_path"
29603  # Check if we need to convert this using DOS-style short mode. If the path
29604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29605  # take no chances and rewrite it.
29606  # Note: m4 eats our [], so we need to use [ and ] instead.
29607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29608  if test "x$has_forbidden_chars" != x; then
29609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29611  fi
29612
29613
29614  windows_path="$new_path"
29615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29616    unix_path=`$CYGPATH -u "$windows_path"`
29617    new_path="$unix_path"
29618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29620    new_path="$unix_path"
29621  fi
29622
29623  if test "x$path" != "x$new_path"; then
29624    BOOT_JDK="$new_path"
29625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29627  fi
29628
29629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29631
29632    else
29633      # We're on a unix platform. Hooray! :)
29634      path="$BOOT_JDK"
29635      has_space=`$ECHO "$path" | $GREP " "`
29636      if test "x$has_space" != x; then
29637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29639        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29640      fi
29641
29642      # Use eval to expand a potential ~
29643      eval path="$path"
29644      if test ! -f "$path" && test ! -d "$path"; then
29645        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29646      fi
29647
29648      if test -d "$path"; then
29649        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29650      else
29651        dir="`$DIRNAME "$path"`"
29652        base="`$BASENAME "$path"`"
29653        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29654      fi
29655    fi
29656  fi
29657
29658            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29659$as_echo_n "checking for Boot JDK... " >&6; }
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29661$as_echo "$BOOT_JDK" >&6; }
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29663$as_echo_n "checking Boot JDK version... " >&6; }
29664            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29666$as_echo "$BOOT_JDK_VERSION" >&6; }
29667          fi # end check jdk version
29668        fi # end check javac
29669      fi # end check java
29670    fi # end check boot jdk found
29671  fi
29672
29673  fi
29674
29675
29676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29678      # Do we have a bin/java?
29679      if test ! -x "$BOOT_JDK/bin/java"; then
29680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29682        BOOT_JDK_FOUND=no
29683      else
29684        # Do we have a bin/javac?
29685        if test ! -x "$BOOT_JDK/bin/javac"; then
29686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29690          BOOT_JDK_FOUND=no
29691        else
29692          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29693          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29694
29695          # Extra M4 quote needed to protect [] in grep expression.
29696          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29697          if test "x$FOUND_CORRECT_VERSION" = x; then
29698            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29700            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29701$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29702            BOOT_JDK_FOUND=no
29703          else
29704            # We're done! :-)
29705            BOOT_JDK_FOUND=yes
29706
29707  # Only process if variable expands to non-empty
29708
29709  if test "x$BOOT_JDK" != x; then
29710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29711
29712  # Input might be given as Windows format, start by converting to
29713  # unix format.
29714  path="$BOOT_JDK"
29715  new_path=`$CYGPATH -u "$path"`
29716
29717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29720  # "foo.exe" is OK but "foo" is an error.
29721  #
29722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29723  # It is also a way to make sure we got the proper file name for the real test later on.
29724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29725  if test "x$test_shortpath" = x; then
29726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29728    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29729  fi
29730
29731  # Call helper function which possibly converts this using DOS-style short mode.
29732  # If so, the updated path is stored in $new_path.
29733
29734  input_path="$new_path"
29735  # Check if we need to convert this using DOS-style short mode. If the path
29736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29737  # take no chances and rewrite it.
29738  # Note: m4 eats our [], so we need to use [ and ] instead.
29739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29740  if test "x$has_forbidden_chars" != x; then
29741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29745      # Going to short mode and back again did indeed matter. Since short mode is
29746      # case insensitive, let's make it lowercase to improve readability.
29747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29748      # Now convert it back to Unix-style (cygpath)
29749      input_path=`$CYGPATH -u "$shortmode_path"`
29750      new_path="$input_path"
29751    fi
29752  fi
29753
29754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29755  if test "x$test_cygdrive_prefix" = x; then
29756    # As a simple fix, exclude /usr/bin since it's not a real path.
29757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29759      # a path prefixed by /cygdrive for fixpath to work.
29760      new_path="$CYGWIN_ROOT_PATH$input_path"
29761    fi
29762  fi
29763
29764
29765  if test "x$path" != "x$new_path"; then
29766    BOOT_JDK="$new_path"
29767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29769  fi
29770
29771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772
29773  path="$BOOT_JDK"
29774  has_colon=`$ECHO $path | $GREP ^.:`
29775  new_path="$path"
29776  if test "x$has_colon" = x; then
29777    # Not in mixed or Windows style, start by that.
29778    new_path=`cmd //c echo $path`
29779  fi
29780
29781
29782  input_path="$new_path"
29783  # Check if we need to convert this using DOS-style short mode. If the path
29784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29785  # take no chances and rewrite it.
29786  # Note: m4 eats our [], so we need to use [ and ] instead.
29787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29788  if test "x$has_forbidden_chars" != x; then
29789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29791  fi
29792
29793
29794  windows_path="$new_path"
29795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29796    unix_path=`$CYGPATH -u "$windows_path"`
29797    new_path="$unix_path"
29798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29800    new_path="$unix_path"
29801  fi
29802
29803  if test "x$path" != "x$new_path"; then
29804    BOOT_JDK="$new_path"
29805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29807  fi
29808
29809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29811
29812    else
29813      # We're on a unix platform. Hooray! :)
29814      path="$BOOT_JDK"
29815      has_space=`$ECHO "$path" | $GREP " "`
29816      if test "x$has_space" != x; then
29817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29820      fi
29821
29822      # Use eval to expand a potential ~
29823      eval path="$path"
29824      if test ! -f "$path" && test ! -d "$path"; then
29825        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29826      fi
29827
29828      if test -d "$path"; then
29829        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29830      else
29831        dir="`$DIRNAME "$path"`"
29832        base="`$BASENAME "$path"`"
29833        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29834      fi
29835    fi
29836  fi
29837
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29839$as_echo_n "checking for Boot JDK... " >&6; }
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29841$as_echo "$BOOT_JDK" >&6; }
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29843$as_echo_n "checking Boot JDK version... " >&6; }
29844            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29846$as_echo "$BOOT_JDK_VERSION" >&6; }
29847          fi # end check jdk version
29848        fi # end check javac
29849      fi # end check java
29850    fi # end check boot jdk found
29851  fi
29852
29853
29854  # If we haven't found anything yet, we've truly lost. Give up.
29855  if test "x$BOOT_JDK_FOUND" = xno; then
29856
29857  # Print a helpful message on how to acquire the necessary build dependency.
29858  # openjdk is the help tag: freetype, cups, alsa etc
29859  MISSING_DEPENDENCY=openjdk
29860
29861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29862    cygwin_help $MISSING_DEPENDENCY
29863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29864    msys_help $MISSING_DEPENDENCY
29865  else
29866    PKGHANDLER_COMMAND=
29867
29868    case $PKGHANDLER in
29869      apt-get)
29870        apt_help     $MISSING_DEPENDENCY ;;
29871      yum)
29872        yum_help     $MISSING_DEPENDENCY ;;
29873      port)
29874        port_help    $MISSING_DEPENDENCY ;;
29875      pkgutil)
29876        pkgutil_help $MISSING_DEPENDENCY ;;
29877      pkgadd)
29878        pkgadd_help  $MISSING_DEPENDENCY ;;
29879    esac
29880
29881    if test "x$PKGHANDLER_COMMAND" != x; then
29882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29883    fi
29884  fi
29885
29886    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29887$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29889$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29890    as_fn_error $? "Cannot continue" "$LINENO" 5
29891  fi
29892
29893
29894
29895  # Setup tools from the Boot JDK.
29896
29897  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29898
29899  # Publish this variable in the help.
29900
29901
29902  if [ -z "${JAVA+x}" ]; then
29903    # The variable is not set by user, try to locate tool using the code snippet
29904
29905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29906$as_echo_n "checking for java in Boot JDK... " >&6; }
29907      JAVA=$BOOT_JDK/bin/java
29908      if test ! -x $JAVA; then
29909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29910$as_echo "not found" >&6; }
29911        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29912$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29913        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29914      fi
29915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29916$as_echo "ok" >&6; }
29917
29918
29919  else
29920    # The variable is set, but is it from the command line or the environment?
29921
29922    # Try to remove the string !JAVA! from our list.
29923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29925      # If it failed, the variable was not from the command line. Ignore it,
29926      # but warn the user (except for BASH, which is always set by the calling BASH).
29927      if test "xJAVA" != xBASH; then
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29929$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29930      fi
29931      # 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      # If it succeeded, then it was overridden by the user. We will use it
29949      # for the tool.
29950
29951      # First remove it from the list of overridden variables, so we can test
29952      # for unknown variables in the end.
29953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29954
29955      # Check if we try to supply an empty value
29956      if test "x$JAVA" = x; then
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29958$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29960$as_echo_n "checking for JAVA... " >&6; }
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29962$as_echo "disabled" >&6; }
29963      else
29964        # Check if the provided tool contains a complete path.
29965        tool_specified="$JAVA"
29966        tool_basename="${tool_specified##*/}"
29967        if test "x$tool_basename" = "x$tool_specified"; then
29968          # A command without a complete path is provided, search $PATH.
29969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29970$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29971          # Extract the first word of "$tool_basename", so it can be a program name with args.
29972set dummy $tool_basename; ac_word=$2
29973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29974$as_echo_n "checking for $ac_word... " >&6; }
29975if ${ac_cv_path_JAVA+:} false; then :
29976  $as_echo_n "(cached) " >&6
29977else
29978  case $JAVA in
29979  [\\/]* | ?:[\\/]*)
29980  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29981  ;;
29982  *)
29983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29984for as_dir in $PATH
29985do
29986  IFS=$as_save_IFS
29987  test -z "$as_dir" && as_dir=.
29988    for ac_exec_ext in '' $ac_executable_extensions; do
29989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29990    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29992    break 2
29993  fi
29994done
29995  done
29996IFS=$as_save_IFS
29997
29998  ;;
29999esac
30000fi
30001JAVA=$ac_cv_path_JAVA
30002if test -n "$JAVA"; then
30003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30004$as_echo "$JAVA" >&6; }
30005else
30006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30007$as_echo "no" >&6; }
30008fi
30009
30010
30011          if test "x$JAVA" = x; then
30012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30013          fi
30014        else
30015          # Otherwise we believe it is a complete path. Use it as it is.
30016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30017$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30019$as_echo_n "checking for JAVA... " >&6; }
30020          if test ! -x "$tool_specified"; then
30021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022$as_echo "not found" >&6; }
30023            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30024          fi
30025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30026$as_echo "$tool_specified" >&6; }
30027        fi
30028      fi
30029    fi
30030
30031  fi
30032
30033
30034
30035  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30036
30037  # Publish this variable in the help.
30038
30039
30040  if [ -z "${JAVAC+x}" ]; then
30041    # The variable is not set by user, try to locate tool using the code snippet
30042
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30044$as_echo_n "checking for javac in Boot JDK... " >&6; }
30045      JAVAC=$BOOT_JDK/bin/javac
30046      if test ! -x $JAVAC; then
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30048$as_echo "not found" >&6; }
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30050$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30051        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30052      fi
30053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30054$as_echo "ok" >&6; }
30055
30056
30057  else
30058    # The variable is set, but is it from the command line or the environment?
30059
30060    # Try to remove the string !JAVAC! from our list.
30061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30063      # If it failed, the variable was not from the command line. Ignore it,
30064      # but warn the user (except for BASH, which is always set by the calling BASH).
30065      if test "xJAVAC" != xBASH; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30067$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30068      fi
30069      # 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      # If it succeeded, then it was overridden by the user. We will use it
30087      # for the tool.
30088
30089      # First remove it from the list of overridden variables, so we can test
30090      # for unknown variables in the end.
30091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30092
30093      # Check if we try to supply an empty value
30094      if test "x$JAVAC" = x; then
30095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30096$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30098$as_echo_n "checking for JAVAC... " >&6; }
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30100$as_echo "disabled" >&6; }
30101      else
30102        # Check if the provided tool contains a complete path.
30103        tool_specified="$JAVAC"
30104        tool_basename="${tool_specified##*/}"
30105        if test "x$tool_basename" = "x$tool_specified"; then
30106          # A command without a complete path is provided, search $PATH.
30107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30108$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30109          # Extract the first word of "$tool_basename", so it can be a program name with args.
30110set dummy $tool_basename; ac_word=$2
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30112$as_echo_n "checking for $ac_word... " >&6; }
30113if ${ac_cv_path_JAVAC+:} false; then :
30114  $as_echo_n "(cached) " >&6
30115else
30116  case $JAVAC in
30117  [\\/]* | ?:[\\/]*)
30118  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30119  ;;
30120  *)
30121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30122for as_dir in $PATH
30123do
30124  IFS=$as_save_IFS
30125  test -z "$as_dir" && as_dir=.
30126    for ac_exec_ext in '' $ac_executable_extensions; do
30127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30128    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30130    break 2
30131  fi
30132done
30133  done
30134IFS=$as_save_IFS
30135
30136  ;;
30137esac
30138fi
30139JAVAC=$ac_cv_path_JAVAC
30140if test -n "$JAVAC"; then
30141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30142$as_echo "$JAVAC" >&6; }
30143else
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30145$as_echo "no" >&6; }
30146fi
30147
30148
30149          if test "x$JAVAC" = x; then
30150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30151          fi
30152        else
30153          # Otherwise we believe it is a complete path. Use it as it is.
30154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30155$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30157$as_echo_n "checking for JAVAC... " >&6; }
30158          if test ! -x "$tool_specified"; then
30159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30160$as_echo "not found" >&6; }
30161            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30162          fi
30163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30164$as_echo "$tool_specified" >&6; }
30165        fi
30166      fi
30167    fi
30168
30169  fi
30170
30171
30172
30173  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30174
30175  # Publish this variable in the help.
30176
30177
30178  if [ -z "${JAVAH+x}" ]; then
30179    # The variable is not set by user, try to locate tool using the code snippet
30180
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30182$as_echo_n "checking for javah in Boot JDK... " >&6; }
30183      JAVAH=$BOOT_JDK/bin/javah
30184      if test ! -x $JAVAH; then
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30186$as_echo "not found" >&6; }
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30188$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30189        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30190      fi
30191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30192$as_echo "ok" >&6; }
30193
30194
30195  else
30196    # The variable is set, but is it from the command line or the environment?
30197
30198    # Try to remove the string !JAVAH! from our list.
30199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30201      # If it failed, the variable was not from the command line. Ignore it,
30202      # but warn the user (except for BASH, which is always set by the calling BASH).
30203      if test "xJAVAH" != xBASH; then
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30205$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30206      fi
30207      # 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      # If it succeeded, then it was overridden by the user. We will use it
30225      # for the tool.
30226
30227      # First remove it from the list of overridden variables, so we can test
30228      # for unknown variables in the end.
30229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30230
30231      # Check if we try to supply an empty value
30232      if test "x$JAVAH" = x; then
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30234$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30236$as_echo_n "checking for JAVAH... " >&6; }
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30238$as_echo "disabled" >&6; }
30239      else
30240        # Check if the provided tool contains a complete path.
30241        tool_specified="$JAVAH"
30242        tool_basename="${tool_specified##*/}"
30243        if test "x$tool_basename" = "x$tool_specified"; then
30244          # A command without a complete path is provided, search $PATH.
30245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30246$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30247          # Extract the first word of "$tool_basename", so it can be a program name with args.
30248set dummy $tool_basename; ac_word=$2
30249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30250$as_echo_n "checking for $ac_word... " >&6; }
30251if ${ac_cv_path_JAVAH+:} false; then :
30252  $as_echo_n "(cached) " >&6
30253else
30254  case $JAVAH in
30255  [\\/]* | ?:[\\/]*)
30256  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30257  ;;
30258  *)
30259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30260for as_dir in $PATH
30261do
30262  IFS=$as_save_IFS
30263  test -z "$as_dir" && as_dir=.
30264    for ac_exec_ext in '' $ac_executable_extensions; do
30265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30266    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30268    break 2
30269  fi
30270done
30271  done
30272IFS=$as_save_IFS
30273
30274  ;;
30275esac
30276fi
30277JAVAH=$ac_cv_path_JAVAH
30278if test -n "$JAVAH"; then
30279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30280$as_echo "$JAVAH" >&6; }
30281else
30282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30283$as_echo "no" >&6; }
30284fi
30285
30286
30287          if test "x$JAVAH" = x; then
30288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30289          fi
30290        else
30291          # Otherwise we believe it is a complete path. Use it as it is.
30292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30293$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30295$as_echo_n "checking for JAVAH... " >&6; }
30296          if test ! -x "$tool_specified"; then
30297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30298$as_echo "not found" >&6; }
30299            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30300          fi
30301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30302$as_echo "$tool_specified" >&6; }
30303        fi
30304      fi
30305    fi
30306
30307  fi
30308
30309
30310
30311  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30312
30313  # Publish this variable in the help.
30314
30315
30316  if [ -z "${JAR+x}" ]; then
30317    # The variable is not set by user, try to locate tool using the code snippet
30318
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30320$as_echo_n "checking for jar in Boot JDK... " >&6; }
30321      JAR=$BOOT_JDK/bin/jar
30322      if test ! -x $JAR; then
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30324$as_echo "not found" >&6; }
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30326$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30327        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30328      fi
30329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30330$as_echo "ok" >&6; }
30331
30332
30333  else
30334    # The variable is set, but is it from the command line or the environment?
30335
30336    # Try to remove the string !JAR! from our list.
30337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30339      # If it failed, the variable was not from the command line. Ignore it,
30340      # but warn the user (except for BASH, which is always set by the calling BASH).
30341      if test "xJAR" != xBASH; then
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30343$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30344      fi
30345      # 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      # If it succeeded, then it was overridden by the user. We will use it
30363      # for the tool.
30364
30365      # First remove it from the list of overridden variables, so we can test
30366      # for unknown variables in the end.
30367      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30368
30369      # Check if we try to supply an empty value
30370      if test "x$JAR" = x; then
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30372$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30374$as_echo_n "checking for JAR... " >&6; }
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30376$as_echo "disabled" >&6; }
30377      else
30378        # Check if the provided tool contains a complete path.
30379        tool_specified="$JAR"
30380        tool_basename="${tool_specified##*/}"
30381        if test "x$tool_basename" = "x$tool_specified"; then
30382          # A command without a complete path is provided, search $PATH.
30383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30384$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30385          # Extract the first word of "$tool_basename", so it can be a program name with args.
30386set dummy $tool_basename; ac_word=$2
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30388$as_echo_n "checking for $ac_word... " >&6; }
30389if ${ac_cv_path_JAR+:} false; then :
30390  $as_echo_n "(cached) " >&6
30391else
30392  case $JAR in
30393  [\\/]* | ?:[\\/]*)
30394  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30395  ;;
30396  *)
30397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30398for as_dir in $PATH
30399do
30400  IFS=$as_save_IFS
30401  test -z "$as_dir" && as_dir=.
30402    for ac_exec_ext in '' $ac_executable_extensions; do
30403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30404    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30406    break 2
30407  fi
30408done
30409  done
30410IFS=$as_save_IFS
30411
30412  ;;
30413esac
30414fi
30415JAR=$ac_cv_path_JAR
30416if test -n "$JAR"; then
30417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30418$as_echo "$JAR" >&6; }
30419else
30420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30421$as_echo "no" >&6; }
30422fi
30423
30424
30425          if test "x$JAR" = x; then
30426            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30427          fi
30428        else
30429          # Otherwise we believe it is a complete path. Use it as it is.
30430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30431$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30432          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30433$as_echo_n "checking for JAR... " >&6; }
30434          if test ! -x "$tool_specified"; then
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30436$as_echo "not found" >&6; }
30437            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30438          fi
30439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30440$as_echo "$tool_specified" >&6; }
30441        fi
30442      fi
30443    fi
30444
30445  fi
30446
30447
30448
30449  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30450
30451  # Publish this variable in the help.
30452
30453
30454  if [ -z "${JARSIGNER+x}" ]; then
30455    # The variable is not set by user, try to locate tool using the code snippet
30456
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30458$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30459      JARSIGNER=$BOOT_JDK/bin/jarsigner
30460      if test ! -x $JARSIGNER; then
30461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30462$as_echo "not found" >&6; }
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30464$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30465        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30466      fi
30467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30468$as_echo "ok" >&6; }
30469
30470
30471  else
30472    # The variable is set, but is it from the command line or the environment?
30473
30474    # Try to remove the string !JARSIGNER! from our list.
30475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30477      # If it failed, the variable was not from the command line. Ignore it,
30478      # but warn the user (except for BASH, which is always set by the calling BASH).
30479      if test "xJARSIGNER" != xBASH; then
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30481$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30482      fi
30483      # 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      # If it succeeded, then it was overridden by the user. We will use it
30501      # for the tool.
30502
30503      # First remove it from the list of overridden variables, so we can test
30504      # for unknown variables in the end.
30505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30506
30507      # Check if we try to supply an empty value
30508      if test "x$JARSIGNER" = x; then
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30510$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30512$as_echo_n "checking for JARSIGNER... " >&6; }
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30514$as_echo "disabled" >&6; }
30515      else
30516        # Check if the provided tool contains a complete path.
30517        tool_specified="$JARSIGNER"
30518        tool_basename="${tool_specified##*/}"
30519        if test "x$tool_basename" = "x$tool_specified"; then
30520          # A command without a complete path is provided, search $PATH.
30521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30522$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30523          # Extract the first word of "$tool_basename", so it can be a program name with args.
30524set dummy $tool_basename; ac_word=$2
30525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30526$as_echo_n "checking for $ac_word... " >&6; }
30527if ${ac_cv_path_JARSIGNER+:} false; then :
30528  $as_echo_n "(cached) " >&6
30529else
30530  case $JARSIGNER in
30531  [\\/]* | ?:[\\/]*)
30532  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30533  ;;
30534  *)
30535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30536for as_dir in $PATH
30537do
30538  IFS=$as_save_IFS
30539  test -z "$as_dir" && as_dir=.
30540    for ac_exec_ext in '' $ac_executable_extensions; do
30541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30542    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30544    break 2
30545  fi
30546done
30547  done
30548IFS=$as_save_IFS
30549
30550  ;;
30551esac
30552fi
30553JARSIGNER=$ac_cv_path_JARSIGNER
30554if test -n "$JARSIGNER"; then
30555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30556$as_echo "$JARSIGNER" >&6; }
30557else
30558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30559$as_echo "no" >&6; }
30560fi
30561
30562
30563          if test "x$JARSIGNER" = x; then
30564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30565          fi
30566        else
30567          # Otherwise we believe it is a complete path. Use it as it is.
30568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30569$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30571$as_echo_n "checking for JARSIGNER... " >&6; }
30572          if test ! -x "$tool_specified"; then
30573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30574$as_echo "not found" >&6; }
30575            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30576          fi
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30578$as_echo "$tool_specified" >&6; }
30579        fi
30580      fi
30581    fi
30582
30583  fi
30584
30585
30586
30587  # Finally, set some other options...
30588
30589  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30590  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30591
30592
30593
30594  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30595  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30596  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30597  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30598  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30599  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30600    dummy="$dummy --patch-module foo=bar"
30601    JVM_ARG_OK=true
30602  else
30603    $ECHO "Arg failed:" >&5
30604    $ECHO "$OUTPUT" >&5
30605    JVM_ARG_OK=false
30606  fi
30607
30608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30609$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30610  if test "x$JVM_ARG_OK" = "xtrue"; then
30611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30612$as_echo "yes" >&6; }
30613    BOOT_JDK_MODULAR="true"
30614  else
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30616$as_echo "no" >&6; }
30617    BOOT_JDK_MODULAR="false"
30618  fi
30619
30620
30621
30622
30623  # Check if the boot jdk is 32 or 64 bit
30624  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30625    BOOT_JDK_BITS="64"
30626  else
30627    BOOT_JDK_BITS="32"
30628  fi
30629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30630$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30632$as_echo "$BOOT_JDK_BITS" >&6; }
30633
30634
30635
30636
30637# Check whether --with-build-jdk was given.
30638if test "${with_build_jdk+set}" = set; then :
30639  withval=$with_build_jdk;
30640fi
30641
30642
30643  CREATE_BUILDJDK=false
30644  EXTERNAL_BUILDJDK=false
30645  BUILD_JDK_FOUND="no"
30646  if test "x$with_build_jdk" != "x"; then
30647
30648  if test "x$BUILD_JDK_FOUND" = xno; then
30649    # Execute the test
30650
30651       if test "x$with_build_jdk" != x; then
30652         BUILD_JDK=$with_build_jdk
30653         BUILD_JDK_FOUND=maybe
30654         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30655$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30656       fi
30657
30658    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30659    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30660      # Do we have a bin/java?
30661      if test ! -x "$BUILD_JDK/bin/java"; then
30662        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30663$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30664        BUILD_JDK_FOUND=no
30665      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30668        BUILD_JDK_FOUND=no
30669      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30672        BUILD_JDK_FOUND=no
30673      elif test ! -x "$BUILD_JDK/bin/javac"; then
30674        # Do we have a bin/javac?
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30678$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30679        BUILD_JDK_FOUND=no
30680      else
30681        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30682        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30683
30684        # Extra M4 quote needed to protect [] in grep expression.
30685        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30686        if test "x$FOUND_CORRECT_VERSION" = x; then
30687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30688$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30690$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30691          BUILD_JDK_FOUND=no
30692        else
30693          # We're done!
30694          BUILD_JDK_FOUND=yes
30695
30696  # Only process if variable expands to non-empty
30697
30698  if test "x$BUILD_JDK" != x; then
30699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700
30701  # Input might be given as Windows format, start by converting to
30702  # unix format.
30703  path="$BUILD_JDK"
30704  new_path=`$CYGPATH -u "$path"`
30705
30706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30709  # "foo.exe" is OK but "foo" is an error.
30710  #
30711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30712  # It is also a way to make sure we got the proper file name for the real test later on.
30713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30714  if test "x$test_shortpath" = x; then
30715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30716$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30717    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30718  fi
30719
30720  # Call helper function which possibly converts this using DOS-style short mode.
30721  # If so, the updated path is stored in $new_path.
30722
30723  input_path="$new_path"
30724  # Check if we need to convert this using DOS-style short mode. If the path
30725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30726  # take no chances and rewrite it.
30727  # Note: m4 eats our [], so we need to use [ and ] instead.
30728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30729  if test "x$has_forbidden_chars" != x; then
30730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30734      # Going to short mode and back again did indeed matter. Since short mode is
30735      # case insensitive, let's make it lowercase to improve readability.
30736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30737      # Now convert it back to Unix-style (cygpath)
30738      input_path=`$CYGPATH -u "$shortmode_path"`
30739      new_path="$input_path"
30740    fi
30741  fi
30742
30743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30744  if test "x$test_cygdrive_prefix" = x; then
30745    # As a simple fix, exclude /usr/bin since it's not a real path.
30746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30748      # a path prefixed by /cygdrive for fixpath to work.
30749      new_path="$CYGWIN_ROOT_PATH$input_path"
30750    fi
30751  fi
30752
30753
30754  if test "x$path" != "x$new_path"; then
30755    BUILD_JDK="$new_path"
30756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30757$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30758  fi
30759
30760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30761
30762  path="$BUILD_JDK"
30763  has_colon=`$ECHO $path | $GREP ^.:`
30764  new_path="$path"
30765  if test "x$has_colon" = x; then
30766    # Not in mixed or Windows style, start by that.
30767    new_path=`cmd //c echo $path`
30768  fi
30769
30770
30771  input_path="$new_path"
30772  # Check if we need to convert this using DOS-style short mode. If the path
30773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30774  # take no chances and rewrite it.
30775  # Note: m4 eats our [], so we need to use [ and ] instead.
30776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30777  if test "x$has_forbidden_chars" != x; then
30778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30780  fi
30781
30782
30783  windows_path="$new_path"
30784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30785    unix_path=`$CYGPATH -u "$windows_path"`
30786    new_path="$unix_path"
30787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30789    new_path="$unix_path"
30790  fi
30791
30792  if test "x$path" != "x$new_path"; then
30793    BUILD_JDK="$new_path"
30794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30795$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30796  fi
30797
30798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30800
30801    else
30802      # We're on a unix platform. Hooray! :)
30803      path="$BUILD_JDK"
30804      has_space=`$ECHO "$path" | $GREP " "`
30805      if test "x$has_space" != x; then
30806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30807$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30809      fi
30810
30811      # Use eval to expand a potential ~
30812      eval path="$path"
30813      if test ! -f "$path" && test ! -d "$path"; then
30814        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30815      fi
30816
30817      if test -d "$path"; then
30818        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30819      else
30820        dir="`$DIRNAME "$path"`"
30821        base="`$BASENAME "$path"`"
30822        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30823      fi
30824    fi
30825  fi
30826
30827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30828$as_echo_n "checking for Build JDK... " >&6; }
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30830$as_echo "$BUILD_JDK" >&6; }
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30832$as_echo_n "checking Build JDK version... " >&6; }
30833          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30835$as_echo "$BUILD_JDK_VERSION" >&6; }
30836        fi # end check jdk version
30837      fi # end check java
30838    fi # end check build jdk found
30839  fi
30840
30841    EXTERNAL_BUILDJDK=true
30842  else
30843    if test "x$COMPILE_TYPE" = "xcross"; then
30844      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30845      BUILD_JDK_FOUND=yes
30846      CREATE_BUILDJDK=true
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30848$as_echo_n "checking for Build JDK... " >&6; }
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30850$as_echo "yes, will build it for the host platform" >&6; }
30851    else
30852      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30853      BUILD_JDK_FOUND=yes
30854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30855$as_echo_n "checking for Build JDK... " >&6; }
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30857$as_echo "yes, will use output dir" >&6; }
30858    fi
30859  fi
30860
30861  JMOD="$BUILD_JDK/bin/jmod"
30862  JLINK="$BUILD_JDK/bin/jlink"
30863
30864
30865
30866  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30868$as_echo_n "checking for Build JDK... " >&6; }
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30870$as_echo "no" >&6; }
30871    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30872  fi
30873
30874
30875
30876
30877
30878
30879###############################################################################
30880#
30881# Configure the sources to use. We can add or override individual directories.
30882#
30883###############################################################################
30884
30885
30886  # Where are the sources.
30887  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30888  CORBA_TOPDIR="$SRC_ROOT/corba"
30889  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30890  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30891  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30892  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30893  JDK_TOPDIR="$SRC_ROOT/jdk"
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903  # This feature is no longer supported.
30904
30905
30906
30907# Check whether --with-add-source-root was given.
30908if test "${with_add_source_root+set}" = set; then :
30909  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
30910$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30911fi
30912
30913
30914
30915
30916# Check whether --with-override-source-root was given.
30917if test "${with_override_source_root+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-adds-and-overrides was given.
30926if test "${with_adds_and_overrides+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-override-langtools was given.
30935if test "${with_override_langtools+set}" = set; then :
30936  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30937$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-corba was given.
30944if test "${with_override_corba+set}" = set; then :
30945  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-jaxp was given.
30953if test "${with_override_jaxp+set}" = set; then :
30954  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-jaxws was given.
30962if test "${with_override_jaxws+set}" = set; then :
30963  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-hotspot was given.
30971if test "${with_override_hotspot+set}" = set; then :
30972  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-nashorn was given.
30980if test "${with_override_nashorn+set}" = set; then :
30981  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-jdk was given.
30989if test "${with_override_jdk+set}" = set; then :
30990  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997  BUILD_OUTPUT="$OUTPUT_ROOT"
30998
30999
31000  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31001  BUILD_HOTSPOT=true
31002
31003
31004
31005# Check whether --with-import-hotspot was given.
31006if test "${with_import_hotspot+set}" = set; then :
31007  withval=$with_import_hotspot;
31008fi
31009
31010  if test "x$with_import_hotspot" != x; then
31011    CURDIR="$PWD"
31012    cd "$with_import_hotspot"
31013    HOTSPOT_DIST="`pwd`"
31014    cd "$CURDIR"
31015    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31016      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31017    fi
31018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31019$as_echo_n "checking if hotspot should be imported... " >&6; }
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31021$as_echo "yes from $HOTSPOT_DIST" >&6; }
31022    BUILD_HOTSPOT=false
31023  fi
31024
31025  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31026
31027
31028
31029
31030# Check whether --with-import-modules was given.
31031if test "${with_import_modules+set}" = set; then :
31032  withval=$with_import_modules;
31033fi
31034
31035
31036  if test "x$with_import_modules" != x \
31037      && test "x$with_import_modules" != "xno"; then
31038    if test -d "$with_import_modules"; then
31039      IMPORT_MODULES_TOPDIR="$with_import_modules"
31040
31041  # Only process if variable expands to non-empty
31042
31043  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31045
31046  # Input might be given as Windows format, start by converting to
31047  # unix format.
31048  path="$IMPORT_MODULES_TOPDIR"
31049  new_path=`$CYGPATH -u "$path"`
31050
31051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31054  # "foo.exe" is OK but "foo" is an error.
31055  #
31056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31057  # It is also a way to make sure we got the proper file name for the real test later on.
31058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31059  if test "x$test_shortpath" = x; then
31060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31061$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31062    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31063  fi
31064
31065  # Call helper function which possibly converts this using DOS-style short mode.
31066  # If so, the updated path is stored in $new_path.
31067
31068  input_path="$new_path"
31069  # Check if we need to convert this using DOS-style short mode. If the path
31070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31071  # take no chances and rewrite it.
31072  # Note: m4 eats our [], so we need to use [ and ] instead.
31073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31074  if test "x$has_forbidden_chars" != x; then
31075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31079      # Going to short mode and back again did indeed matter. Since short mode is
31080      # case insensitive, let's make it lowercase to improve readability.
31081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31082      # Now convert it back to Unix-style (cygpath)
31083      input_path=`$CYGPATH -u "$shortmode_path"`
31084      new_path="$input_path"
31085    fi
31086  fi
31087
31088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31089  if test "x$test_cygdrive_prefix" = x; then
31090    # As a simple fix, exclude /usr/bin since it's not a real path.
31091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31093      # a path prefixed by /cygdrive for fixpath to work.
31094      new_path="$CYGWIN_ROOT_PATH$input_path"
31095    fi
31096  fi
31097
31098
31099  if test "x$path" != "x$new_path"; then
31100    IMPORT_MODULES_TOPDIR="$new_path"
31101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31102$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31103  fi
31104
31105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31106
31107  path="$IMPORT_MODULES_TOPDIR"
31108  has_colon=`$ECHO $path | $GREP ^.:`
31109  new_path="$path"
31110  if test "x$has_colon" = x; then
31111    # Not in mixed or Windows style, start by that.
31112    new_path=`cmd //c echo $path`
31113  fi
31114
31115
31116  input_path="$new_path"
31117  # Check if we need to convert this using DOS-style short mode. If the path
31118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31119  # take no chances and rewrite it.
31120  # Note: m4 eats our [], so we need to use [ and ] instead.
31121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31122  if test "x$has_forbidden_chars" != x; then
31123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31125  fi
31126
31127
31128  windows_path="$new_path"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    new_path="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    new_path="$unix_path"
31135  fi
31136
31137  if test "x$path" != "x$new_path"; then
31138    IMPORT_MODULES_TOPDIR="$new_path"
31139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31140$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31141  fi
31142
31143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31145
31146    else
31147      # We're on a unix platform. Hooray! :)
31148      path="$IMPORT_MODULES_TOPDIR"
31149      has_space=`$ECHO "$path" | $GREP " "`
31150      if test "x$has_space" != x; then
31151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31152$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31154      fi
31155
31156      # Use eval to expand a potential ~
31157      eval path="$path"
31158      if test ! -f "$path" && test ! -d "$path"; then
31159        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31160      fi
31161
31162      if test -d "$path"; then
31163        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31164      else
31165        dir="`$DIRNAME "$path"`"
31166        base="`$BASENAME "$path"`"
31167        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31168      fi
31169    fi
31170  fi
31171
31172    elif test -e "$with_import_modules"; then
31173      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31174      $RM -rf "$IMPORT_MODULES_TOPDIR"
31175      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31176      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31177        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31178      fi
31179    else
31180      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31181    fi
31182  fi
31183
31184  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31185    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31186  fi
31187  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31188    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31189  fi
31190  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31191    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31192  fi
31193  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31194    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31195  fi
31196  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31197    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31198  fi
31199  # Workaround for using different imported module-info.java in Jake due to a
31200  # change in format. Remove once new format is standard in JDK 9 and javafx
31201  # delivers just that.
31202  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31203    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31204  fi
31205  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31206    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31207  fi
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217###############################################################################
31218#
31219# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31220# native code.
31221#
31222###############################################################################
31223
31224# See if we are doing a complete static build or not
31225
31226  # Check whether --enable-static-build was given.
31227if test "${enable_static_build+set}" = set; then :
31228  enableval=$enable_static_build;
31229fi
31230
31231  STATIC_BUILD=false
31232  if test "x$enable_static_build" = "xyes"; then
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31234$as_echo_n "checking if static build is enabled... " >&6; }
31235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31236$as_echo "yes" >&6; }
31237    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31238      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31239    fi
31240    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31241    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31242    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31243    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31244    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31245    STATIC_BUILD=true
31246  elif test "x$enable_static_build" = "xno"; then
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31248$as_echo_n "checking if static build is enabled... " >&6; }
31249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31250$as_echo "no" >&6; }
31251  elif test "x$enable_static_build" != "x"; then
31252    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31253  fi
31254
31255
31256
31257
31258# First determine the toolchain type (compiler family)
31259
31260
31261# Check whether --with-toolchain-type was given.
31262if test "${with_toolchain_type+set}" = set; then :
31263  withval=$with_toolchain_type;
31264fi
31265
31266
31267  # Use indirect variable referencing
31268  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31269  VALID_TOOLCHAINS=${!toolchain_var_name}
31270
31271  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31272    if test -n "$XCODEBUILD"; then
31273      # On Mac OS X, default toolchain to clang after Xcode 5
31274      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31275      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31276      if test $? -ne 0; then
31277        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31278      fi
31279      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31280          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31281          $CUT -f 1 -d .`
31282      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31283$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31284      if test $XCODE_MAJOR_VERSION -ge 5; then
31285          DEFAULT_TOOLCHAIN="clang"
31286      else
31287          DEFAULT_TOOLCHAIN="gcc"
31288      fi
31289    else
31290      # If Xcode is not installed, but the command line tools are
31291      # then we can't run xcodebuild. On these systems we should
31292      # default to clang
31293      DEFAULT_TOOLCHAIN="clang"
31294    fi
31295  else
31296    # First toolchain type in the list is the default
31297    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31298  fi
31299
31300  if test "x$with_toolchain_type" = xlist; then
31301    # List all toolchains
31302    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31303$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31304    for toolchain in $VALID_TOOLCHAINS; do
31305      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31306      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31307      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31308    done
31309
31310    exit 0
31311  elif test "x$with_toolchain_type" != x; then
31312    # User override; check that it is valid
31313    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31315$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31316      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31317$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31318      as_fn_error $? "Cannot continue." "$LINENO" 5
31319    fi
31320    TOOLCHAIN_TYPE=$with_toolchain_type
31321  else
31322    # No flag given, use default
31323    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31324  fi
31325
31326
31327  TOOLCHAIN_CC_BINARY_clang="clang"
31328  TOOLCHAIN_CC_BINARY_gcc="gcc"
31329  TOOLCHAIN_CC_BINARY_microsoft="cl"
31330  TOOLCHAIN_CC_BINARY_solstudio="cc"
31331  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31332
31333  TOOLCHAIN_CXX_BINARY_clang="clang++"
31334  TOOLCHAIN_CXX_BINARY_gcc="g++"
31335  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31336  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31337  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31338
31339  # Use indirect variable referencing
31340  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31346  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31347  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31348
31349
31350  # Define filename patterns
31351  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31352    LIBRARY_PREFIX=
31353    SHARED_LIBRARY_SUFFIX='.dll'
31354    STATIC_LIBRARY_SUFFIX='.lib'
31355    SHARED_LIBRARY='$1.dll'
31356    STATIC_LIBRARY='$1.lib'
31357    OBJ_SUFFIX='.obj'
31358    EXE_SUFFIX='.exe'
31359  else
31360    LIBRARY_PREFIX=lib
31361    SHARED_LIBRARY_SUFFIX='.so'
31362    STATIC_LIBRARY_SUFFIX='.a'
31363    SHARED_LIBRARY='lib$1.so'
31364    STATIC_LIBRARY='lib$1.a'
31365    OBJ_SUFFIX='.o'
31366    EXE_SUFFIX=''
31367    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31368      # For full static builds, we're overloading the SHARED_LIBRARY
31369      # variables in order to limit the amount of changes required.
31370      # It would be better to remove SHARED and just use LIBRARY and
31371      # LIBRARY_SUFFIX for libraries that can be built either
31372      # shared or static and use STATIC_* for libraries that are
31373      # always built statically.
31374      if test "x$STATIC_BUILD" = xtrue; then
31375        SHARED_LIBRARY='lib$1.a'
31376        SHARED_LIBRARY_SUFFIX='.a'
31377      else
31378        SHARED_LIBRARY='lib$1.dylib'
31379        SHARED_LIBRARY_SUFFIX='.dylib'
31380      fi
31381    fi
31382  fi
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31394    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31395$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31396  else
31397    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31398$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31399  fi
31400
31401
31402# User supplied flags should be used when configure detects compilers
31403
31404  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31406$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31407  fi
31408
31409  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31411$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31412  fi
31413
31414  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31415    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31416$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31417  fi
31418
31419
31420# Check whether --with-extra-cflags was given.
31421if test "${with_extra_cflags+set}" = set; then :
31422  withval=$with_extra_cflags;
31423fi
31424
31425
31426
31427# Check whether --with-extra-cxxflags was given.
31428if test "${with_extra_cxxflags+set}" = set; then :
31429  withval=$with_extra_cxxflags;
31430fi
31431
31432
31433
31434# Check whether --with-extra-ldflags was given.
31435if test "${with_extra_ldflags+set}" = set; then :
31436  withval=$with_extra_ldflags;
31437fi
31438
31439
31440  EXTRA_CFLAGS="$with_extra_cflags"
31441  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31442  EXTRA_LDFLAGS="$with_extra_ldflags"
31443
31444  # Hotspot needs these set in their legacy form
31445  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31446  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31447  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457  # The global CFLAGS and LDLAGS variables are used by configure tests and
31458  # should include the extra parameters
31459  CFLAGS="$EXTRA_CFLAGS"
31460  CXXFLAGS="$EXTRA_CXXFLAGS"
31461  LDFLAGS="$EXTRA_LDFLAGS"
31462  CPPFLAGS=""
31463
31464# The sysroot cflags are needed for configure to be able to run the compilers
31465
31466  if test "x$SYSROOT" != "x"; then
31467    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31468      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31469        # Solaris Studio does not have a concept of sysroot. Instead we must
31470        # make sure the default include and lib dirs are appended to each
31471        # compile and link command line. Must also add -I-xbuiltin to enable
31472        # inlining of system functions and intrinsics.
31473        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31474        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31475            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31476      fi
31477    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31478      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31479      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31480    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31481      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31482      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31483    fi
31484    # Propagate the sysroot args to hotspot
31485    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31487    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31488    # The global CFLAGS and LDFLAGS variables need these for configure to function
31489    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31490    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31491    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31492    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31493  fi
31494
31495  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31496    # We also need -iframework<path>/System/Library/Frameworks
31497    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31499    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31500    # set this here so it doesn't have to be peppered throughout the forest
31501    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31503  fi
31504
31505
31506
31507
31508
31509# Then detect the actual binaries needed
31510
31511  # FIXME: Is this needed?
31512  ac_ext=cpp
31513ac_cpp='$CXXCPP $CPPFLAGS'
31514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31517
31518
31519  # Store the CFLAGS etc passed to the configure script.
31520  ORG_CFLAGS="$CFLAGS"
31521  ORG_CXXFLAGS="$CXXFLAGS"
31522
31523  # autoconf magic only relies on PATH, so update it if tools dir is specified
31524  OLD_PATH="$PATH"
31525
31526  # On Windows, we need to detect the visual studio installation first.
31527  # This will change the PATH, but we need to keep that new PATH even
31528  # after toolchain detection is done, since the compiler (on x86) uses
31529  # it for DLL resolution in runtime.
31530  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31531      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31532
31533  # Store path to cygwin link.exe to help excluding it when searching for
31534  # VS linker. This must be done before changing the PATH when looking for VS.
31535  # Extract the first word of "link", so it can be a program name with args.
31536set dummy link; ac_word=$2
31537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31538$as_echo_n "checking for $ac_word... " >&6; }
31539if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31540  $as_echo_n "(cached) " >&6
31541else
31542  case $CYGWIN_LINK in
31543  [\\/]* | ?:[\\/]*)
31544  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31545  ;;
31546  *)
31547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31548for as_dir in $PATH
31549do
31550  IFS=$as_save_IFS
31551  test -z "$as_dir" && as_dir=.
31552    for ac_exec_ext in '' $ac_executable_extensions; do
31553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31554    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31556    break 2
31557  fi
31558done
31559  done
31560IFS=$as_save_IFS
31561
31562  ;;
31563esac
31564fi
31565CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31566if test -n "$CYGWIN_LINK"; then
31567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31568$as_echo "$CYGWIN_LINK" >&6; }
31569else
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31571$as_echo "no" >&6; }
31572fi
31573
31574
31575  if test "x$CYGWIN_LINK" != x; then
31576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31577$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31578    "$CYGWIN_LINK" --version > /dev/null
31579    if test $? -eq 0 ; then
31580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31581$as_echo "yes" >&6; }
31582    else
31583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585      # This might be the VS linker. Don't exclude it later on.
31586      CYGWIN_LINK=""
31587    fi
31588  fi
31589
31590  # First-hand choice is to locate and run the vsvars bat file.
31591
31592
31593# Check whether --with-toolchain-version was given.
31594if test "${with_toolchain_version+set}" = set; then :
31595  withval=$with_toolchain_version;
31596fi
31597
31598
31599  if test "x$with_toolchain_version" = xlist; then
31600    # List all toolchains
31601    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31602$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31603    for version in $VALID_VS_VERSIONS; do
31604      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31605      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31606    done
31607
31608    exit 0
31609  elif test "x$DEVKIT_VS_VERSION" != x; then
31610    VS_VERSION=$DEVKIT_VS_VERSION
31611    TOOLCHAIN_VERSION=$VS_VERSION
31612    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31613    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31614    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31615    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31616    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31617    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31618
31619    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31620    # can still be exported as INCLUDE for compiler invocations without
31621    # SYSROOT_CFLAGS
31622    OLDIFS="$IFS"
31623    IFS=";"
31624    for i in $DEVKIT_VS_INCLUDE; do
31625      ipath=$i
31626
31627  unix_path="$ipath"
31628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629    windows_path=`$CYGPATH -m "$unix_path"`
31630    ipath="$windows_path"
31631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632    windows_path=`cmd //c echo $unix_path`
31633    ipath="$windows_path"
31634  fi
31635
31636      VS_INCLUDE="$VS_INCLUDE;$ipath"
31637    done
31638    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31639    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31640    for i in $DEVKIT_VS_LIB; do
31641      libpath=$i
31642
31643  unix_path="$libpath"
31644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645    windows_path=`$CYGPATH -m "$unix_path"`
31646    libpath="$windows_path"
31647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648    windows_path=`cmd //c echo $unix_path`
31649    libpath="$windows_path"
31650  fi
31651
31652      VS_LIB="$VS_LIB;$libpath"
31653    done
31654    IFS="$OLDIFS"
31655
31656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31657$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31658
31659  elif test "x$with_toolchain_version" != x; then
31660    # User override; check that it is valid
31661    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31662      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31663$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31664      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31665$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31666      as_fn_error $? "Cannot continue." "$LINENO" 5
31667    fi
31668    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31669  else
31670    # No flag given, use default
31671    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31672  fi
31673
31674  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31675
31676  VS_VERSION="$VS_VERSION"
31677  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31678  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31679  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31680  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31681
31682  # When using --with-tools-dir, assume it points to the correct and default
31683  # version of Visual Studio or that --with-toolchain-version was also set.
31684  if test "x$with_tools_dir" != x; then
31685
31686  if test "x$VS_ENV_CMD" = x; then
31687    VS_VERSION="${VS_VERSION}"
31688    VS_BASE="$with_tools_dir/../.."
31689    METHOD="--with-tools-dir"
31690
31691    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31692      VCVARSFILE="vc/bin/vcvars32.bat"
31693    else
31694      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31695    fi
31696
31697
31698  windows_path="$VS_BASE"
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    unix_path=`$CYGPATH -u "$windows_path"`
31701    VS_BASE="$unix_path"
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31704    VS_BASE="$unix_path"
31705  fi
31706
31707    if test -d "$VS_BASE"; then
31708      if test -f "$VS_BASE/$VCVARSFILE"; then
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31712        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31713        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31714        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31715      else
31716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31717$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31719$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31720      fi
31721    fi
31722  fi
31723
31724
31725  if test "x$VS_ENV_CMD" = x; then
31726    VS_VERSION="${VS_VERSION}"
31727    VS_BASE="$with_tools_dir/../../.."
31728    METHOD="--with-tools-dir"
31729
31730    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31731      VCVARSFILE="vc/bin/vcvars32.bat"
31732    else
31733      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31734    fi
31735
31736
31737  windows_path="$VS_BASE"
31738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739    unix_path=`$CYGPATH -u "$windows_path"`
31740    VS_BASE="$unix_path"
31741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743    VS_BASE="$unix_path"
31744  fi
31745
31746    if test -d "$VS_BASE"; then
31747      if test -f "$VS_BASE/$VCVARSFILE"; then
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31751        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31752        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31753        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31754      else
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31758$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31759      fi
31760    fi
31761  fi
31762
31763    if test "x$VS_ENV_CMD" = x; then
31764      # Having specified an argument which is incorrect will produce an instant failure;
31765      # we should not go on looking
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31767$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31769$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31771$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31772      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31773    fi
31774  fi
31775
31776  VS_ENV_CMD=""
31777  VS_ENV_ARGS=""
31778
31779  if test "x$VS_COMNTOOLS" != x; then
31780
31781  if test "x$VS_ENV_CMD" = x; then
31782    VS_VERSION="${VS_VERSION}"
31783    VS_BASE="$VS_COMNTOOLS/../.."
31784    METHOD="$VS_COMNTOOLS_VAR variable"
31785
31786    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31787      VCVARSFILE="vc/bin/vcvars32.bat"
31788    else
31789      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31790    fi
31791
31792
31793  windows_path="$VS_BASE"
31794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31795    unix_path=`$CYGPATH -u "$windows_path"`
31796    VS_BASE="$unix_path"
31797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31799    VS_BASE="$unix_path"
31800  fi
31801
31802    if test -d "$VS_BASE"; then
31803      if test -f "$VS_BASE/$VCVARSFILE"; then
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31807        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31808        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31809        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31810      else
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31812$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31815      fi
31816    fi
31817  fi
31818
31819  fi
31820  if test "x$PROGRAMFILES" != x; then
31821
31822  if test "x$VS_ENV_CMD" = x; then
31823    VS_VERSION="${VS_VERSION}"
31824    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31825    METHOD="well-known name"
31826
31827    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31828      VCVARSFILE="vc/bin/vcvars32.bat"
31829    else
31830      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31831    fi
31832
31833
31834  windows_path="$VS_BASE"
31835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836    unix_path=`$CYGPATH -u "$windows_path"`
31837    VS_BASE="$unix_path"
31838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840    VS_BASE="$unix_path"
31841  fi
31842
31843    if test -d "$VS_BASE"; then
31844      if test -f "$VS_BASE/$VCVARSFILE"; then
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31848        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31849        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31850        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31851      else
31852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31853$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31856      fi
31857    fi
31858  fi
31859
31860  fi
31861  # Work around the insanely named ProgramFiles(x86) env variable
31862  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31863  if test "x$PROGRAMFILES_X86" != x; then
31864
31865  if test "x$VS_ENV_CMD" = x; then
31866    VS_VERSION="${VS_VERSION}"
31867    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31868    METHOD="well-known name"
31869
31870    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31871      VCVARSFILE="vc/bin/vcvars32.bat"
31872    else
31873      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31874    fi
31875
31876
31877  windows_path="$VS_BASE"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    VS_BASE="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    VS_BASE="$unix_path"
31884  fi
31885
31886    if test -d "$VS_BASE"; then
31887      if test -f "$VS_BASE/$VCVARSFILE"; then
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31891        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31892        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31893        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31894      else
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31896$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31898$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31899      fi
31900    fi
31901  fi
31902
31903  fi
31904
31905  if test "x$VS_ENV_CMD" = x; then
31906    VS_VERSION="${VS_VERSION}"
31907    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31908    METHOD="well-known name"
31909
31910    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31911      VCVARSFILE="vc/bin/vcvars32.bat"
31912    else
31913      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31914    fi
31915
31916
31917  windows_path="$VS_BASE"
31918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919    unix_path=`$CYGPATH -u "$windows_path"`
31920    VS_BASE="$unix_path"
31921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923    VS_BASE="$unix_path"
31924  fi
31925
31926    if test -d "$VS_BASE"; then
31927      if test -f "$VS_BASE/$VCVARSFILE"; then
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31931        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31932        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31933        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31934      else
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31936$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31938$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31939      fi
31940    fi
31941  fi
31942
31943
31944  if test "x$VS_ENV_CMD" = x; then
31945    VS_VERSION="${VS_VERSION}"
31946    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31947    METHOD="well-known name"
31948
31949    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31950      VCVARSFILE="vc/bin/vcvars32.bat"
31951    else
31952      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31953    fi
31954
31955
31956  windows_path="$VS_BASE"
31957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958    unix_path=`$CYGPATH -u "$windows_path"`
31959    VS_BASE="$unix_path"
31960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962    VS_BASE="$unix_path"
31963  fi
31964
31965    if test -d "$VS_BASE"; then
31966      if test -f "$VS_BASE/$VCVARSFILE"; then
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31970        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31971        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31972        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31973      else
31974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31975$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31977$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31978      fi
31979    fi
31980  fi
31981
31982
31983  if test "x$SDK_INSTALL_DIR" != x; then
31984    if test "x$ProgramW6432" != x; then
31985
31986  if test "x$VS_ENV_CMD" = x; then
31987    VS_VERSION="${VS_VERSION}"
31988    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31989    METHOD="well-known name"
31990
31991  windows_path="$WIN_SDK_BASE"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    WIN_SDK_BASE="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    WIN_SDK_BASE="$unix_path"
31998  fi
31999
32000    if test -d "$WIN_SDK_BASE"; then
32001      # There have been cases of partial or broken SDK installations. A missing
32002      # lib dir is not going to work.
32003      if test ! -d "$WIN_SDK_BASE/lib"; then
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32005$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32007$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32008      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32011        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32012        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32013          VS_ENV_ARGS="/x86"
32014        else
32015          VS_ENV_ARGS="/x64"
32016        fi
32017        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32018        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32019        # TODO: improve detection for other versions of SDK
32020        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32021      else
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32025$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32026      fi
32027    fi
32028  fi
32029
32030    fi
32031    if test "x$PROGRAMW6432" != x; then
32032
32033  if test "x$VS_ENV_CMD" = x; then
32034    VS_VERSION="${VS_VERSION}"
32035    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32036    METHOD="well-known name"
32037
32038  windows_path="$WIN_SDK_BASE"
32039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32040    unix_path=`$CYGPATH -u "$windows_path"`
32041    WIN_SDK_BASE="$unix_path"
32042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32044    WIN_SDK_BASE="$unix_path"
32045  fi
32046
32047    if test -d "$WIN_SDK_BASE"; then
32048      # There have been cases of partial or broken SDK installations. A missing
32049      # lib dir is not going to work.
32050      if test ! -d "$WIN_SDK_BASE/lib"; then
32051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32054$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32055      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32059        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32060          VS_ENV_ARGS="/x86"
32061        else
32062          VS_ENV_ARGS="/x64"
32063        fi
32064        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32065        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32066        # TODO: improve detection for other versions of SDK
32067        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32068      else
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32072$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32073      fi
32074    fi
32075  fi
32076
32077    fi
32078    if test "x$PROGRAMFILES" != x; then
32079
32080  if test "x$VS_ENV_CMD" = x; then
32081    VS_VERSION="${VS_VERSION}"
32082    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32083    METHOD="well-known name"
32084
32085  windows_path="$WIN_SDK_BASE"
32086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32087    unix_path=`$CYGPATH -u "$windows_path"`
32088    WIN_SDK_BASE="$unix_path"
32089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32091    WIN_SDK_BASE="$unix_path"
32092  fi
32093
32094    if test -d "$WIN_SDK_BASE"; then
32095      # There have been cases of partial or broken SDK installations. A missing
32096      # lib dir is not going to work.
32097      if test ! -d "$WIN_SDK_BASE/lib"; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32099$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32101$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32102      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32103        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32106        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32107          VS_ENV_ARGS="/x86"
32108        else
32109          VS_ENV_ARGS="/x64"
32110        fi
32111        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32112        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32113        # TODO: improve detection for other versions of SDK
32114        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32115      else
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32119$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32120      fi
32121    fi
32122  fi
32123
32124    fi
32125
32126  if test "x$VS_ENV_CMD" = x; then
32127    VS_VERSION="${VS_VERSION}"
32128    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32129    METHOD="well-known name"
32130
32131  windows_path="$WIN_SDK_BASE"
32132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133    unix_path=`$CYGPATH -u "$windows_path"`
32134    WIN_SDK_BASE="$unix_path"
32135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32137    WIN_SDK_BASE="$unix_path"
32138  fi
32139
32140    if test -d "$WIN_SDK_BASE"; then
32141      # There have been cases of partial or broken SDK installations. A missing
32142      # lib dir is not going to work.
32143      if test ! -d "$WIN_SDK_BASE/lib"; then
32144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32147$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32148      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32149        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32150$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32151        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32152        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32153          VS_ENV_ARGS="/x86"
32154        else
32155          VS_ENV_ARGS="/x64"
32156        fi
32157        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32158        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32159        # TODO: improve detection for other versions of SDK
32160        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32161      else
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32164        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32165$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32166      fi
32167    fi
32168  fi
32169
32170
32171  if test "x$VS_ENV_CMD" = x; then
32172    VS_VERSION="${VS_VERSION}"
32173    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32174    METHOD="well-known name"
32175
32176  windows_path="$WIN_SDK_BASE"
32177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32178    unix_path=`$CYGPATH -u "$windows_path"`
32179    WIN_SDK_BASE="$unix_path"
32180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32182    WIN_SDK_BASE="$unix_path"
32183  fi
32184
32185    if test -d "$WIN_SDK_BASE"; then
32186      # There have been cases of partial or broken SDK installations. A missing
32187      # lib dir is not going to work.
32188      if test ! -d "$WIN_SDK_BASE/lib"; then
32189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32192$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32193      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32195$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32196        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32197        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32198          VS_ENV_ARGS="/x86"
32199        else
32200          VS_ENV_ARGS="/x64"
32201        fi
32202        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32203        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32204        # TODO: improve detection for other versions of SDK
32205        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32206      else
32207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32210$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32211      fi
32212    fi
32213  fi
32214
32215  fi
32216
32217    if test "x$VS_ENV_CMD" != x; then
32218      TOOLCHAIN_VERSION=$VS_VERSION
32219      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32220      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32221      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32222      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32223      # The rest of the variables are already evaled while probing
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32225$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32226      break
32227    fi
32228  done
32229
32230
32231  # If we have a devkit, skip all of the below.
32232  if test "x$DEVKIT_VS_VERSION" = x; then
32233    if test "x$VS_ENV_CMD" != x; then
32234      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32235
32236  # Only process if variable expands to non-empty
32237
32238  if test "x$VS_ENV_CMD" != x; then
32239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240
32241  # First separate the path from the arguments. This will split at the first
32242  # space.
32243  complete="$VS_ENV_CMD"
32244  path="${complete%% *}"
32245  tmp="$complete EOL"
32246  arguments="${tmp#* }"
32247
32248  # Input might be given as Windows format, start by converting to
32249  # unix format.
32250  new_path=`$CYGPATH -u "$path"`
32251
32252  # Now try to locate executable using which
32253  new_path=`$WHICH "$new_path" 2> /dev/null`
32254  # bat and cmd files are not always considered executable in cygwin causing which
32255  # to not find them
32256  if test "x$new_path" = x \
32257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32259    new_path=`$CYGPATH -u "$path"`
32260  fi
32261  if test "x$new_path" = x; then
32262    # Oops. Which didn't find the executable.
32263    # The splitting of arguments from the executable at a space might have been incorrect,
32264    # since paths with space are more likely in Windows. Give it another try with the whole
32265    # argument.
32266    path="$complete"
32267    arguments="EOL"
32268    new_path=`$CYGPATH -u "$path"`
32269    new_path=`$WHICH "$new_path" 2> /dev/null`
32270    # bat and cmd files are not always considered executable in cygwin causing which
32271    # to not find them
32272    if test "x$new_path" = x \
32273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32275      new_path=`$CYGPATH -u "$path"`
32276    fi
32277    if test "x$new_path" = x; then
32278      # It's still not found. Now this is an unrecoverable error.
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32280$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32281      has_space=`$ECHO "$complete" | $GREP " "`
32282      if test "x$has_space" != x; then
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32285      fi
32286      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32287    fi
32288  fi
32289
32290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32293  # "foo.exe" is OK but "foo" is an error.
32294  #
32295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32296  # It is also a way to make sure we got the proper file name for the real test later on.
32297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32298  if test "x$test_shortpath" = x; then
32299    # Short path failed, file does not exist as specified.
32300    # Try adding .exe or .cmd
32301    if test -f "${new_path}.exe"; then
32302      input_to_shortpath="${new_path}.exe"
32303    elif test -f "${new_path}.cmd"; then
32304      input_to_shortpath="${new_path}.cmd"
32305    else
32306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32307$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32310      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32311    fi
32312  else
32313    input_to_shortpath="$new_path"
32314  fi
32315
32316  # Call helper function which possibly converts this using DOS-style short mode.
32317  # If so, the updated path is stored in $new_path.
32318  new_path="$input_to_shortpath"
32319
32320  input_path="$input_to_shortpath"
32321  # Check if we need to convert this using DOS-style short mode. If the path
32322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32323  # take no chances and rewrite it.
32324  # Note: m4 eats our [], so we need to use [ and ] instead.
32325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32326  if test "x$has_forbidden_chars" != x; then
32327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32331      # Going to short mode and back again did indeed matter. Since short mode is
32332      # case insensitive, let's make it lowercase to improve readability.
32333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32334      # Now convert it back to Unix-style (cygpath)
32335      input_path=`$CYGPATH -u "$shortmode_path"`
32336      new_path="$input_path"
32337    fi
32338  fi
32339
32340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32341  if test "x$test_cygdrive_prefix" = x; then
32342    # As a simple fix, exclude /usr/bin since it's not a real path.
32343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32345      # a path prefixed by /cygdrive for fixpath to work.
32346      new_path="$CYGWIN_ROOT_PATH$input_path"
32347    fi
32348  fi
32349
32350  # remove trailing .exe if any
32351  new_path="${new_path/%.exe/}"
32352
32353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354
32355  # First separate the path from the arguments. This will split at the first
32356  # space.
32357  complete="$VS_ENV_CMD"
32358  path="${complete%% *}"
32359  tmp="$complete EOL"
32360  arguments="${tmp#* }"
32361
32362  # Input might be given as Windows format, start by converting to
32363  # unix format.
32364  new_path="$path"
32365
32366  windows_path="$new_path"
32367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32368    unix_path=`$CYGPATH -u "$windows_path"`
32369    new_path="$unix_path"
32370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32372    new_path="$unix_path"
32373  fi
32374
32375
32376  # Now try to locate executable using which
32377  new_path=`$WHICH "$new_path" 2> /dev/null`
32378
32379  if test "x$new_path" = x; then
32380    # Oops. Which didn't find the executable.
32381    # The splitting of arguments from the executable at a space might have been incorrect,
32382    # since paths with space are more likely in Windows. Give it another try with the whole
32383    # argument.
32384    path="$complete"
32385    arguments="EOL"
32386    new_path="$path"
32387
32388  windows_path="$new_path"
32389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32390    unix_path=`$CYGPATH -u "$windows_path"`
32391    new_path="$unix_path"
32392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32394    new_path="$unix_path"
32395  fi
32396
32397
32398    new_path=`$WHICH "$new_path" 2> /dev/null`
32399    # bat and cmd files are not always considered executable in MSYS causing which
32400    # to not find them
32401    if test "x$new_path" = x \
32402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32404      new_path="$path"
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415    fi
32416
32417    if test "x$new_path" = x; then
32418      # It's still not found. Now this is an unrecoverable error.
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32420$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32421      has_space=`$ECHO "$complete" | $GREP " "`
32422      if test "x$has_space" != x; then
32423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32425      fi
32426      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32427    fi
32428  fi
32429
32430  # Now new_path has a complete unix path to the binary
32431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32432    # Keep paths in /bin as-is, but remove trailing .exe if any
32433    new_path="${new_path/%.exe/}"
32434    # Do not save /bin paths to all_fixpath_prefixes!
32435  else
32436    # Not in mixed or Windows style, start by that.
32437    new_path=`cmd //c echo $new_path`
32438
32439  input_path="$new_path"
32440  # Check if we need to convert this using DOS-style short mode. If the path
32441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32442  # take no chances and rewrite it.
32443  # Note: m4 eats our [], so we need to use [ and ] instead.
32444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32445  if test "x$has_forbidden_chars" != x; then
32446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32448  fi
32449
32450    # Output is in $new_path
32451
32452  windows_path="$new_path"
32453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32454    unix_path=`$CYGPATH -u "$windows_path"`
32455    new_path="$unix_path"
32456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32458    new_path="$unix_path"
32459  fi
32460
32461    # remove trailing .exe if any
32462    new_path="${new_path/%.exe/}"
32463
32464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32466  fi
32467
32468    else
32469      # We're on a unix platform. Hooray! :)
32470      # First separate the path from the arguments. This will split at the first
32471      # space.
32472      complete="$VS_ENV_CMD"
32473      path="${complete%% *}"
32474      tmp="$complete EOL"
32475      arguments="${tmp#* }"
32476
32477      # Cannot rely on the command "which" here since it doesn't always work.
32478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32479      if test -z "$is_absolute_path"; then
32480        # Path to executable is not absolute. Find it.
32481        IFS_save="$IFS"
32482        IFS=:
32483        for p in $PATH; do
32484          if test -f "$p/$path" && test -x "$p/$path"; then
32485            new_path="$p/$path"
32486            break
32487          fi
32488        done
32489        IFS="$IFS_save"
32490      else
32491        # This is an absolute path, we can use it without further modifications.
32492        new_path="$path"
32493      fi
32494
32495      if test "x$new_path" = x; then
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32497$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32498        has_space=`$ECHO "$complete" | $GREP " "`
32499        if test "x$has_space" != x; then
32500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32502        fi
32503        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32504      fi
32505    fi
32506
32507    # Now join together the path and the arguments once again
32508    if test "x$arguments" != xEOL; then
32509      new_complete="$new_path ${arguments% *}"
32510    else
32511      new_complete="$new_path"
32512    fi
32513
32514    if test "x$complete" != "x$new_complete"; then
32515      VS_ENV_CMD="$new_complete"
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32517$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32518    fi
32519  fi
32520
32521
32522      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32523      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32524$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32525
32526      # We need to create a couple of temporary files.
32527      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32528      $MKDIR -p $VS_ENV_TMP_DIR
32529
32530      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32531      # Instead create a shell script which will set the relevant variables when run.
32532      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32533
32534  unix_path="$WINPATH_VS_ENV_CMD"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    windows_path=`$CYGPATH -m "$unix_path"`
32537    WINPATH_VS_ENV_CMD="$windows_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    windows_path=`cmd //c echo $unix_path`
32540    WINPATH_VS_ENV_CMD="$windows_path"
32541  fi
32542
32543      WINPATH_BASH="$BASH"
32544
32545  unix_path="$WINPATH_BASH"
32546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547    windows_path=`$CYGPATH -m "$unix_path"`
32548    WINPATH_BASH="$windows_path"
32549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550    windows_path=`cmd //c echo $unix_path`
32551    WINPATH_BASH="$windows_path"
32552  fi
32553
32554
32555      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32556      # script (executable by bash) that will setup the important variables.
32557      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32558      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32559      # This will end up something like:
32560      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32561      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32562      # These will end up something like:
32563      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32564      # The trailing space for everyone except PATH is no typo, but is needed due
32565      # to trailing \ in the Windows paths. These will be stripped later.
32566      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32575          >> $EXTRACT_VC_ENV_BAT_FILE
32576      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32577          >> $EXTRACT_VC_ENV_BAT_FILE
32578
32579      # Now execute the newly created bat file.
32580      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32581      # Change directory so we don't need to mess with Windows paths in redirects.
32582      cd $VS_ENV_TMP_DIR
32583      cmd /c extract-vs-env.bat | $CAT
32584      cd $CURDIR
32585
32586      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32588$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32590$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32592$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32593        as_fn_error $? "Cannot continue" "$LINENO" 5
32594      fi
32595
32596      # Now set all paths and other env variables. This will allow the rest of
32597      # the configure script to find and run the compiler in the proper way.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32599$as_echo "$as_me: Setting extracted environment variables" >&6;}
32600      . $VS_ENV_TMP_DIR/set-vs-env.sh
32601      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32602      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32603    else
32604      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32605      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32606$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32607    fi
32608  fi
32609
32610  # At this point, we should have correct variables in the environment, or we can't continue.
32611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32612$as_echo_n "checking for Visual Studio variables... " >&6; }
32613
32614  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32615      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32616    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32618$as_echo "present but broken" >&6; }
32619      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32620    else
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32622$as_echo "ok" >&6; }
32623      # Remove any trailing "\" ";" and " " from the variables.
32624      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32625      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32626      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32627      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32628      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32629      # Remove any paths containing # (typically F#) as that messes up make. This
32630      # is needed if visual studio was installed with F# support.
32631      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32632
32633
32634
32635
32636
32637      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32638      OLDIFS="$IFS"
32639      IFS=";"
32640      for i in $VS_INCLUDE; do
32641        ipath=$i
32642        # Only process non-empty elements
32643        if test "x$ipath" != x; then
32644          IFS="$OLDIFS"
32645          # Check that directory exists before calling fixup_path
32646          testpath=$ipath
32647
32648  windows_path="$testpath"
32649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32650    unix_path=`$CYGPATH -u "$windows_path"`
32651    testpath="$unix_path"
32652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32654    testpath="$unix_path"
32655  fi
32656
32657          if test -d "$testpath"; then
32658
32659  # Only process if variable expands to non-empty
32660
32661  if test "x$ipath" != x; then
32662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663
32664  # Input might be given as Windows format, start by converting to
32665  # unix format.
32666  path="$ipath"
32667  new_path=`$CYGPATH -u "$path"`
32668
32669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32672  # "foo.exe" is OK but "foo" is an error.
32673  #
32674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32675  # It is also a way to make sure we got the proper file name for the real test later on.
32676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32677  if test "x$test_shortpath" = x; then
32678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32679$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32680    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32681  fi
32682
32683  # Call helper function which possibly converts this using DOS-style short mode.
32684  # If so, the updated path is stored in $new_path.
32685
32686  input_path="$new_path"
32687  # Check if we need to convert this using DOS-style short mode. If the path
32688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32689  # take no chances and rewrite it.
32690  # Note: m4 eats our [], so we need to use [ and ] instead.
32691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32692  if test "x$has_forbidden_chars" != x; then
32693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32697      # Going to short mode and back again did indeed matter. Since short mode is
32698      # case insensitive, let's make it lowercase to improve readability.
32699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32700      # Now convert it back to Unix-style (cygpath)
32701      input_path=`$CYGPATH -u "$shortmode_path"`
32702      new_path="$input_path"
32703    fi
32704  fi
32705
32706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32707  if test "x$test_cygdrive_prefix" = x; then
32708    # As a simple fix, exclude /usr/bin since it's not a real path.
32709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32711      # a path prefixed by /cygdrive for fixpath to work.
32712      new_path="$CYGWIN_ROOT_PATH$input_path"
32713    fi
32714  fi
32715
32716
32717  if test "x$path" != "x$new_path"; then
32718    ipath="$new_path"
32719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32720$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32721  fi
32722
32723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32724
32725  path="$ipath"
32726  has_colon=`$ECHO $path | $GREP ^.:`
32727  new_path="$path"
32728  if test "x$has_colon" = x; then
32729    # Not in mixed or Windows style, start by that.
32730    new_path=`cmd //c echo $path`
32731  fi
32732
32733
32734  input_path="$new_path"
32735  # Check if we need to convert this using DOS-style short mode. If the path
32736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737  # take no chances and rewrite it.
32738  # Note: m4 eats our [], so we need to use [ and ] instead.
32739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32740  if test "x$has_forbidden_chars" != x; then
32741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32743  fi
32744
32745
32746  windows_path="$new_path"
32747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748    unix_path=`$CYGPATH -u "$windows_path"`
32749    new_path="$unix_path"
32750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752    new_path="$unix_path"
32753  fi
32754
32755  if test "x$path" != "x$new_path"; then
32756    ipath="$new_path"
32757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32758$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32759  fi
32760
32761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32763
32764    else
32765      # We're on a unix platform. Hooray! :)
32766      path="$ipath"
32767      has_space=`$ECHO "$path" | $GREP " "`
32768      if test "x$has_space" != x; then
32769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32770$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32772      fi
32773
32774      # Use eval to expand a potential ~
32775      eval path="$path"
32776      if test ! -f "$path" && test ! -d "$path"; then
32777        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32778      fi
32779
32780      if test -d "$path"; then
32781        ipath="`cd "$path"; $THEPWDCMD -L`"
32782      else
32783        dir="`$DIRNAME "$path"`"
32784        base="`$BASENAME "$path"`"
32785        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32786      fi
32787    fi
32788  fi
32789
32790            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32791          fi
32792          IFS=";"
32793        fi
32794      done
32795      # Convert VS_LIB into SYSROOT_LDFLAGS
32796      for i in $VS_LIB; do
32797        libpath=$i
32798        # Only process non-empty elements
32799        if test "x$libpath" != x; then
32800          IFS="$OLDIFS"
32801          # Check that directory exists before calling fixup_path
32802          testpath=$libpath
32803
32804  windows_path="$testpath"
32805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32806    unix_path=`$CYGPATH -u "$windows_path"`
32807    testpath="$unix_path"
32808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32810    testpath="$unix_path"
32811  fi
32812
32813          if test -d "$testpath"; then
32814
32815  # Only process if variable expands to non-empty
32816
32817  if test "x$libpath" != x; then
32818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819
32820  # Input might be given as Windows format, start by converting to
32821  # unix format.
32822  path="$libpath"
32823  new_path=`$CYGPATH -u "$path"`
32824
32825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32828  # "foo.exe" is OK but "foo" is an error.
32829  #
32830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32831  # It is also a way to make sure we got the proper file name for the real test later on.
32832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32833  if test "x$test_shortpath" = x; then
32834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32835$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32836    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32837  fi
32838
32839  # Call helper function which possibly converts this using DOS-style short mode.
32840  # If so, the updated path is stored in $new_path.
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32853      # Going to short mode and back again did indeed matter. Since short mode is
32854      # case insensitive, let's make it lowercase to improve readability.
32855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856      # Now convert it back to Unix-style (cygpath)
32857      input_path=`$CYGPATH -u "$shortmode_path"`
32858      new_path="$input_path"
32859    fi
32860  fi
32861
32862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32863  if test "x$test_cygdrive_prefix" = x; then
32864    # As a simple fix, exclude /usr/bin since it's not a real path.
32865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32867      # a path prefixed by /cygdrive for fixpath to work.
32868      new_path="$CYGWIN_ROOT_PATH$input_path"
32869    fi
32870  fi
32871
32872
32873  if test "x$path" != "x$new_path"; then
32874    libpath="$new_path"
32875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32876$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32877  fi
32878
32879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880
32881  path="$libpath"
32882  has_colon=`$ECHO $path | $GREP ^.:`
32883  new_path="$path"
32884  if test "x$has_colon" = x; then
32885    # Not in mixed or Windows style, start by that.
32886    new_path=`cmd //c echo $path`
32887  fi
32888
32889
32890  input_path="$new_path"
32891  # Check if we need to convert this using DOS-style short mode. If the path
32892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32893  # take no chances and rewrite it.
32894  # Note: m4 eats our [], so we need to use [ and ] instead.
32895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32896  if test "x$has_forbidden_chars" != x; then
32897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899  fi
32900
32901
32902  windows_path="$new_path"
32903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904    unix_path=`$CYGPATH -u "$windows_path"`
32905    new_path="$unix_path"
32906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908    new_path="$unix_path"
32909  fi
32910
32911  if test "x$path" != "x$new_path"; then
32912    libpath="$new_path"
32913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32914$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32915  fi
32916
32917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32919
32920    else
32921      # We're on a unix platform. Hooray! :)
32922      path="$libpath"
32923      has_space=`$ECHO "$path" | $GREP " "`
32924      if test "x$has_space" != x; then
32925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32926$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32928      fi
32929
32930      # Use eval to expand a potential ~
32931      eval path="$path"
32932      if test ! -f "$path" && test ! -d "$path"; then
32933        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32934      fi
32935
32936      if test -d "$path"; then
32937        libpath="`cd "$path"; $THEPWDCMD -L`"
32938      else
32939        dir="`$DIRNAME "$path"`"
32940        base="`$BASENAME "$path"`"
32941        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32942      fi
32943    fi
32944  fi
32945
32946            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32947          fi
32948          IFS=";"
32949        fi
32950      done
32951      IFS="$OLDIFS"
32952    fi
32953  else
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32955$as_echo "not found" >&6; }
32956
32957    if test "x$VS_ENV_CMD" = x; then
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32959$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32960      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32961$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32962    else
32963      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32964$as_echo "$as_me: Running the extraction script failed." >&6;}
32965    fi
32966    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32967$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32969$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32970    as_fn_error $? "Cannot continue" "$LINENO" 5
32971  fi
32972
32973    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32974    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32975    PATH="$VS_PATH"
32976    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32977    export INCLUDE="$VS_INCLUDE"
32978    export LIB="$VS_LIB"
32979  else
32980    if test "x$XCODE_VERSION_OUTPUT" != x; then
32981      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32982      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32983      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32984    else
32985      # Currently we do not define this for other toolchains. This might change as the need arise.
32986      TOOLCHAIN_VERSION=
32987    fi
32988  fi
32989
32990
32991  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32992  # override all other locations.
32993  if test "x$TOOLCHAIN_PATH" != x; then
32994    PATH=$TOOLCHAIN_PATH:$PATH
32995  fi
32996
32997
32998  #
32999  # Setup the compilers (CC and CXX)
33000  #
33001
33002  COMPILER_NAME=C
33003  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33004
33005  if test "x$CC" != x; then
33006    # User has supplied compiler name already, always let that override.
33007    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33008$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33009    if test "x`basename $CC`" = "x$CC"; then
33010      # A command without a complete path is provided, search $PATH.
33011
33012      for ac_prog in $CC
33013do
33014  # Extract the first word of "$ac_prog", so it can be a program name with args.
33015set dummy $ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  case $POTENTIAL_CC in
33022  [\\/]* | ?:[\\/]*)
33023  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33024  ;;
33025  *)
33026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33027for as_dir in $PATH
33028do
33029  IFS=$as_save_IFS
33030  test -z "$as_dir" && as_dir=.
33031    for ac_exec_ext in '' $ac_executable_extensions; do
33032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33033    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33035    break 2
33036  fi
33037done
33038  done
33039IFS=$as_save_IFS
33040
33041  ;;
33042esac
33043fi
33044POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33045if test -n "$POTENTIAL_CC"; then
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33047$as_echo "$POTENTIAL_CC" >&6; }
33048else
33049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33050$as_echo "no" >&6; }
33051fi
33052
33053
33054  test -n "$POTENTIAL_CC" && break
33055done
33056
33057      if test "x$POTENTIAL_CC" != x; then
33058        CC=$POTENTIAL_CC
33059      else
33060        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33061      fi
33062    else
33063      # Otherwise it might already be a complete path
33064      if test ! -x "$CC"; then
33065        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33066      fi
33067    fi
33068  else
33069    # No user supplied value. Locate compiler ourselves.
33070
33071    # If we are cross compiling, assume cross compilation tools follows the
33072    # cross compilation standard where they are prefixed with the autoconf
33073    # standard name for the target. For example the binary
33074    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33075    # If we are not cross compiling, then the default compiler name will be
33076    # used.
33077
33078    CC=
33079    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33080    # before checking the rest of the PATH.
33081    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33082    # step, this should not be necessary.
33083    if test -n "$TOOLCHAIN_PATH"; then
33084      PATH_save="$PATH"
33085      PATH="$TOOLCHAIN_PATH"
33086      for ac_prog in $SEARCH_LIST
33087do
33088  # Extract the first word of "$ac_prog", so it can be a program name with args.
33089set dummy $ac_prog; ac_word=$2
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33091$as_echo_n "checking for $ac_word... " >&6; }
33092if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33093  $as_echo_n "(cached) " >&6
33094else
33095  case $TOOLCHAIN_PATH_CC in
33096  [\\/]* | ?:[\\/]*)
33097  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33098  ;;
33099  *)
33100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33101for as_dir in $PATH
33102do
33103  IFS=$as_save_IFS
33104  test -z "$as_dir" && as_dir=.
33105    for ac_exec_ext in '' $ac_executable_extensions; do
33106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33107    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33109    break 2
33110  fi
33111done
33112  done
33113IFS=$as_save_IFS
33114
33115  ;;
33116esac
33117fi
33118TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33119if test -n "$TOOLCHAIN_PATH_CC"; then
33120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33121$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33122else
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33124$as_echo "no" >&6; }
33125fi
33126
33127
33128  test -n "$TOOLCHAIN_PATH_CC" && break
33129done
33130
33131      CC=$TOOLCHAIN_PATH_CC
33132      PATH="$PATH_save"
33133    fi
33134
33135    # AC_PATH_PROGS can't be run multiple times with the same variable,
33136    # so create a new name for this run.
33137    if test "x$CC" = x; then
33138      for ac_prog in $SEARCH_LIST
33139do
33140  # Extract the first word of "$ac_prog", so it can be a program name with args.
33141set dummy $ac_prog; ac_word=$2
33142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33143$as_echo_n "checking for $ac_word... " >&6; }
33144if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33145  $as_echo_n "(cached) " >&6
33146else
33147  case $POTENTIAL_CC in
33148  [\\/]* | ?:[\\/]*)
33149  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33150  ;;
33151  *)
33152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33153for as_dir in $PATH
33154do
33155  IFS=$as_save_IFS
33156  test -z "$as_dir" && as_dir=.
33157    for ac_exec_ext in '' $ac_executable_extensions; do
33158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33159    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33161    break 2
33162  fi
33163done
33164  done
33165IFS=$as_save_IFS
33166
33167  ;;
33168esac
33169fi
33170POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33171if test -n "$POTENTIAL_CC"; then
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33173$as_echo "$POTENTIAL_CC" >&6; }
33174else
33175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33176$as_echo "no" >&6; }
33177fi
33178
33179
33180  test -n "$POTENTIAL_CC" && break
33181done
33182
33183      CC=$POTENTIAL_CC
33184    fi
33185
33186    if test "x$CC" = x; then
33187
33188  # Print a helpful message on how to acquire the necessary build dependency.
33189  # devkit is the help tag: freetype, cups, alsa etc
33190  MISSING_DEPENDENCY=devkit
33191
33192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33193    cygwin_help $MISSING_DEPENDENCY
33194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33195    msys_help $MISSING_DEPENDENCY
33196  else
33197    PKGHANDLER_COMMAND=
33198
33199    case $PKGHANDLER in
33200      apt-get)
33201        apt_help     $MISSING_DEPENDENCY ;;
33202      yum)
33203        yum_help     $MISSING_DEPENDENCY ;;
33204      port)
33205        port_help    $MISSING_DEPENDENCY ;;
33206      pkgutil)
33207        pkgutil_help $MISSING_DEPENDENCY ;;
33208      pkgadd)
33209        pkgadd_help  $MISSING_DEPENDENCY ;;
33210    esac
33211
33212    if test "x$PKGHANDLER_COMMAND" != x; then
33213      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33214    fi
33215  fi
33216
33217      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33218    fi
33219  fi
33220
33221  # Now we have a compiler binary in CC. Make sure it's okay.
33222
33223  # Only process if variable expands to non-empty
33224
33225  if test "x$CC" != x; then
33226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33227
33228  # First separate the path from the arguments. This will split at the first
33229  # space.
33230  complete="$CC"
33231  path="${complete%% *}"
33232  tmp="$complete EOL"
33233  arguments="${tmp#* }"
33234
33235  # Input might be given as Windows format, start by converting to
33236  # unix format.
33237  new_path=`$CYGPATH -u "$path"`
33238
33239  # Now try to locate executable using which
33240  new_path=`$WHICH "$new_path" 2> /dev/null`
33241  # bat and cmd files are not always considered executable in cygwin causing which
33242  # to not find them
33243  if test "x$new_path" = x \
33244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33246    new_path=`$CYGPATH -u "$path"`
33247  fi
33248  if test "x$new_path" = x; then
33249    # Oops. Which didn't find the executable.
33250    # The splitting of arguments from the executable at a space might have been incorrect,
33251    # since paths with space are more likely in Windows. Give it another try with the whole
33252    # argument.
33253    path="$complete"
33254    arguments="EOL"
33255    new_path=`$CYGPATH -u "$path"`
33256    new_path=`$WHICH "$new_path" 2> /dev/null`
33257    # bat and cmd files are not always considered executable in cygwin causing which
33258    # to not find them
33259    if test "x$new_path" = x \
33260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33262      new_path=`$CYGPATH -u "$path"`
33263    fi
33264    if test "x$new_path" = x; then
33265      # It's still not found. Now this is an unrecoverable error.
33266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33267$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33268      has_space=`$ECHO "$complete" | $GREP " "`
33269      if test "x$has_space" != x; then
33270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33272      fi
33273      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33274    fi
33275  fi
33276
33277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33280  # "foo.exe" is OK but "foo" is an error.
33281  #
33282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33283  # It is also a way to make sure we got the proper file name for the real test later on.
33284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33285  if test "x$test_shortpath" = x; then
33286    # Short path failed, file does not exist as specified.
33287    # Try adding .exe or .cmd
33288    if test -f "${new_path}.exe"; then
33289      input_to_shortpath="${new_path}.exe"
33290    elif test -f "${new_path}.cmd"; then
33291      input_to_shortpath="${new_path}.cmd"
33292    else
33293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33294$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33297      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33298    fi
33299  else
33300    input_to_shortpath="$new_path"
33301  fi
33302
33303  # Call helper function which possibly converts this using DOS-style short mode.
33304  # If so, the updated path is stored in $new_path.
33305  new_path="$input_to_shortpath"
33306
33307  input_path="$input_to_shortpath"
33308  # Check if we need to convert this using DOS-style short mode. If the path
33309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33310  # take no chances and rewrite it.
33311  # Note: m4 eats our [], so we need to use [ and ] instead.
33312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33313  if test "x$has_forbidden_chars" != x; then
33314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33318      # Going to short mode and back again did indeed matter. Since short mode is
33319      # case insensitive, let's make it lowercase to improve readability.
33320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33321      # Now convert it back to Unix-style (cygpath)
33322      input_path=`$CYGPATH -u "$shortmode_path"`
33323      new_path="$input_path"
33324    fi
33325  fi
33326
33327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33328  if test "x$test_cygdrive_prefix" = x; then
33329    # As a simple fix, exclude /usr/bin since it's not a real path.
33330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33332      # a path prefixed by /cygdrive for fixpath to work.
33333      new_path="$CYGWIN_ROOT_PATH$input_path"
33334    fi
33335  fi
33336
33337  # remove trailing .exe if any
33338  new_path="${new_path/%.exe/}"
33339
33340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33341
33342  # First separate the path from the arguments. This will split at the first
33343  # space.
33344  complete="$CC"
33345  path="${complete%% *}"
33346  tmp="$complete EOL"
33347  arguments="${tmp#* }"
33348
33349  # Input might be given as Windows format, start by converting to
33350  # unix format.
33351  new_path="$path"
33352
33353  windows_path="$new_path"
33354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33355    unix_path=`$CYGPATH -u "$windows_path"`
33356    new_path="$unix_path"
33357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33359    new_path="$unix_path"
33360  fi
33361
33362
33363  # Now try to locate executable using which
33364  new_path=`$WHICH "$new_path" 2> /dev/null`
33365
33366  if test "x$new_path" = x; then
33367    # Oops. Which didn't find the executable.
33368    # The splitting of arguments from the executable at a space might have been incorrect,
33369    # since paths with space are more likely in Windows. Give it another try with the whole
33370    # argument.
33371    path="$complete"
33372    arguments="EOL"
33373    new_path="$path"
33374
33375  windows_path="$new_path"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    new_path="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    new_path="$unix_path"
33382  fi
33383
33384
33385    new_path=`$WHICH "$new_path" 2> /dev/null`
33386    # bat and cmd files are not always considered executable in MSYS causing which
33387    # to not find them
33388    if test "x$new_path" = x \
33389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33391      new_path="$path"
33392
33393  windows_path="$new_path"
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395    unix_path=`$CYGPATH -u "$windows_path"`
33396    new_path="$unix_path"
33397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33399    new_path="$unix_path"
33400  fi
33401
33402    fi
33403
33404    if test "x$new_path" = x; then
33405      # It's still not found. Now this is an unrecoverable error.
33406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33407$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33408      has_space=`$ECHO "$complete" | $GREP " "`
33409      if test "x$has_space" != x; then
33410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33412      fi
33413      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33414    fi
33415  fi
33416
33417  # Now new_path has a complete unix path to the binary
33418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33419    # Keep paths in /bin as-is, but remove trailing .exe if any
33420    new_path="${new_path/%.exe/}"
33421    # Do not save /bin paths to all_fixpath_prefixes!
33422  else
33423    # Not in mixed or Windows style, start by that.
33424    new_path=`cmd //c echo $new_path`
33425
33426  input_path="$new_path"
33427  # Check if we need to convert this using DOS-style short mode. If the path
33428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33429  # take no chances and rewrite it.
33430  # Note: m4 eats our [], so we need to use [ and ] instead.
33431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33432  if test "x$has_forbidden_chars" != x; then
33433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33435  fi
33436
33437    # Output is in $new_path
33438
33439  windows_path="$new_path"
33440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33441    unix_path=`$CYGPATH -u "$windows_path"`
33442    new_path="$unix_path"
33443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33445    new_path="$unix_path"
33446  fi
33447
33448    # remove trailing .exe if any
33449    new_path="${new_path/%.exe/}"
33450
33451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33453  fi
33454
33455    else
33456      # We're on a unix platform. Hooray! :)
33457      # First separate the path from the arguments. This will split at the first
33458      # space.
33459      complete="$CC"
33460      path="${complete%% *}"
33461      tmp="$complete EOL"
33462      arguments="${tmp#* }"
33463
33464      # Cannot rely on the command "which" here since it doesn't always work.
33465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33466      if test -z "$is_absolute_path"; then
33467        # Path to executable is not absolute. Find it.
33468        IFS_save="$IFS"
33469        IFS=:
33470        for p in $PATH; do
33471          if test -f "$p/$path" && test -x "$p/$path"; then
33472            new_path="$p/$path"
33473            break
33474          fi
33475        done
33476        IFS="$IFS_save"
33477      else
33478        # This is an absolute path, we can use it without further modifications.
33479        new_path="$path"
33480      fi
33481
33482      if test "x$new_path" = x; then
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33484$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33485        has_space=`$ECHO "$complete" | $GREP " "`
33486        if test "x$has_space" != x; then
33487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33489        fi
33490        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33491      fi
33492    fi
33493
33494    # Now join together the path and the arguments once again
33495    if test "x$arguments" != xEOL; then
33496      new_complete="$new_path ${arguments% *}"
33497    else
33498      new_complete="$new_path"
33499    fi
33500
33501    if test "x$complete" != "x$new_complete"; then
33502      CC="$new_complete"
33503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33504$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33505    fi
33506  fi
33507
33508  TEST_COMPILER="$CC"
33509
33510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33511$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33512  SYMLINK_ORIGINAL="$TEST_COMPILER"
33513
33514  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33515    # Follow a chain of symbolic links. Use readlink
33516    # where it exists, else fall back to horribly
33517    # complicated shell code.
33518    if test "x$READLINK_TESTED" != yes; then
33519      # On MacOSX there is a readlink tool with a different
33520      # purpose than the GNU readlink tool. Check the found readlink.
33521      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33522      if test "x$ISGNU" = x; then
33523        # A readlink that we do not know how to use.
33524        # Are there other non-GNU readlinks out there?
33525        READLINK_TESTED=yes
33526        READLINK=
33527      fi
33528    fi
33529
33530    if test "x$READLINK" != x; then
33531      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33532    else
33533      # Save the current directory for restoring afterwards
33534      STARTDIR=$PWD
33535      COUNTER=0
33536      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33537      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33538      cd $sym_link_dir
33539      # Use -P flag to resolve symlinks in directories.
33540      cd `$THEPWDCMD -P`
33541      sym_link_dir=`$THEPWDCMD -P`
33542      # Resolve file symlinks
33543      while test $COUNTER -lt 20; do
33544        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33545        if test "x$ISLINK" == x; then
33546          # This is not a symbolic link! We are done!
33547          break
33548        fi
33549        # Again resolve directory symlinks since the target of the just found
33550        # link could be in a different directory
33551        cd `$DIRNAME $ISLINK`
33552        sym_link_dir=`$THEPWDCMD -P`
33553        sym_link_file=`$BASENAME $ISLINK`
33554        let COUNTER=COUNTER+1
33555      done
33556      cd $STARTDIR
33557      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33558    fi
33559  fi
33560
33561  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33563$as_echo "no symlink" >&6; }
33564  else
33565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33566$as_echo "$SYMLINK_ORIGINAL" >&6; }
33567
33568    # We can't handle ccache by gcc wrappers, since we need to know if we're
33569    # using ccache. Instead ccache usage must be controlled by a configure option.
33570    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33571    if test "x$COMPILER_BASENAME" = "xccache"; then
33572      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33573$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33574      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33575    fi
33576  fi
33577
33578
33579  COMPILER=$CC
33580  COMPILER_NAME=$COMPILER_NAME
33581
33582  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33583    # cc -V output typically looks like
33584    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33585    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33586    # Check that this is likely to be the Solaris Studio cc.
33587    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33588    if test $? -ne 0; then
33589      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33590      { $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
33591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33593$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33595$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33596      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33597    fi
33598    # Remove usage instructions (if present), and
33599    # collapse compiler output into a single line
33600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33601        $SED -e 's/ *[Uu]sage:.*//'`
33602    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33603        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33604  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33605    # xlc -qversion output typically looks like
33606    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33607    #     Version: 11.01.0000.0015
33608    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33609    # Check that this is likely to be the IBM XL C compiler.
33610    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33611    if test $? -ne 0; then
33612      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33613      { $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
33614$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33616$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33618$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33619      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33620    fi
33621    # Collapse compiler output into a single line
33622    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33623    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33624        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33625  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33626    # There is no specific version flag, but all output starts with a version string.
33627    # First line typically looks something like:
33628    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33629    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33630    # Check that this is likely to be Microsoft CL.EXE.
33631    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33632    if test $? -ne 0; then
33633      { $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
33634$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33635      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33636$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33637      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33638    fi
33639    # Collapse compiler output into a single line
33640    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33641    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33642        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33643  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33644    # gcc --version output typically looks like
33645    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33646    #     Copyright (C) 2013 Free Software Foundation, Inc.
33647    #     This is free software; see the source for copying conditions.  There is NO
33648    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33649    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33650    # Check that this is likely to be GCC.
33651    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33652    if test $? -ne 0; then
33653      { $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
33654$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33655      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33656$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33657      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33658    fi
33659    # Remove Copyright and legalese from version string, and
33660    # collapse into a single line
33661    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33662        $SED -e 's/ *Copyright .*//'`
33663    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33664        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33665  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33666    # clang --version output typically looks like
33667    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33668    #    clang version 3.3 (tags/RELEASE_33/final)
33669    # or
33670    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33671    #    Target: x86_64-pc-linux-gnu
33672    #    Thread model: posix
33673    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33674    # Check that this is likely to be clang
33675    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33676    if test $? -ne 0; then
33677      { $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
33678$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33679      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33680$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33681      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33682    fi
33683    # Collapse compiler output into a single line
33684    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33685    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33686        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33687  else
33688      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33689  fi
33690  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33691  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33692  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33693  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33694
33695  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33696$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33697
33698
33699  # Now that we have resolved CC ourself, let autoconf have its go at it
33700  ac_ext=c
33701ac_cpp='$CPP $CPPFLAGS'
33702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33704ac_compiler_gnu=$ac_cv_c_compiler_gnu
33705if test -n "$ac_tool_prefix"; then
33706  for ac_prog in $CC
33707  do
33708    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33709set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33711$as_echo_n "checking for $ac_word... " >&6; }
33712if ${ac_cv_prog_CC+:} false; then :
33713  $as_echo_n "(cached) " >&6
33714else
33715  if test -n "$CC"; then
33716  ac_cv_prog_CC="$CC" # Let the user override the test.
33717else
33718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33719for as_dir in $PATH
33720do
33721  IFS=$as_save_IFS
33722  test -z "$as_dir" && as_dir=.
33723    for ac_exec_ext in '' $ac_executable_extensions; do
33724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33725    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33727    break 2
33728  fi
33729done
33730  done
33731IFS=$as_save_IFS
33732
33733fi
33734fi
33735CC=$ac_cv_prog_CC
33736if test -n "$CC"; then
33737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33738$as_echo "$CC" >&6; }
33739else
33740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33741$as_echo "no" >&6; }
33742fi
33743
33744
33745    test -n "$CC" && break
33746  done
33747fi
33748if test -z "$CC"; then
33749  ac_ct_CC=$CC
33750  for ac_prog in $CC
33751do
33752  # Extract the first word of "$ac_prog", so it can be a program name with args.
33753set dummy $ac_prog; ac_word=$2
33754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33755$as_echo_n "checking for $ac_word... " >&6; }
33756if ${ac_cv_prog_ac_ct_CC+:} false; then :
33757  $as_echo_n "(cached) " >&6
33758else
33759  if test -n "$ac_ct_CC"; then
33760  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33761else
33762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33763for as_dir in $PATH
33764do
33765  IFS=$as_save_IFS
33766  test -z "$as_dir" && as_dir=.
33767    for ac_exec_ext in '' $ac_executable_extensions; do
33768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33769    ac_cv_prog_ac_ct_CC="$ac_prog"
33770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33771    break 2
33772  fi
33773done
33774  done
33775IFS=$as_save_IFS
33776
33777fi
33778fi
33779ac_ct_CC=$ac_cv_prog_ac_ct_CC
33780if test -n "$ac_ct_CC"; then
33781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33782$as_echo "$ac_ct_CC" >&6; }
33783else
33784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33785$as_echo "no" >&6; }
33786fi
33787
33788
33789  test -n "$ac_ct_CC" && break
33790done
33791
33792  if test "x$ac_ct_CC" = x; then
33793    CC=""
33794  else
33795    case $cross_compiling:$ac_tool_warned in
33796yes:)
33797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33799ac_tool_warned=yes ;;
33800esac
33801    CC=$ac_ct_CC
33802  fi
33803fi
33804
33805
33806test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33808as_fn_error $? "no acceptable C compiler found in \$PATH
33809See \`config.log' for more details" "$LINENO" 5; }
33810
33811# Provide some information about the compiler.
33812$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33813set X $ac_compile
33814ac_compiler=$2
33815for ac_option in --version -v -V -qversion; do
33816  { { ac_try="$ac_compiler $ac_option >&5"
33817case "(($ac_try" in
33818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33819  *) ac_try_echo=$ac_try;;
33820esac
33821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33822$as_echo "$ac_try_echo"; } >&5
33823  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33824  ac_status=$?
33825  if test -s conftest.err; then
33826    sed '10a\
33827... rest of stderr output deleted ...
33828         10q' conftest.err >conftest.er1
33829    cat conftest.er1 >&5
33830  fi
33831  rm -f conftest.er1 conftest.err
33832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33833  test $ac_status = 0; }
33834done
33835
33836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33837/* end confdefs.h.  */
33838
33839int
33840main ()
33841{
33842
33843  ;
33844  return 0;
33845}
33846_ACEOF
33847ac_clean_files_save=$ac_clean_files
33848ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33849# Try to create an executable without -o first, disregard a.out.
33850# It will help us diagnose broken compilers, and finding out an intuition
33851# of exeext.
33852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33853$as_echo_n "checking whether the C compiler works... " >&6; }
33854ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33855
33856# The possible output files:
33857ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33858
33859ac_rmfiles=
33860for ac_file in $ac_files
33861do
33862  case $ac_file in
33863    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33864    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33865  esac
33866done
33867rm -f $ac_rmfiles
33868
33869if { { ac_try="$ac_link_default"
33870case "(($ac_try" in
33871  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33872  *) ac_try_echo=$ac_try;;
33873esac
33874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33875$as_echo "$ac_try_echo"; } >&5
33876  (eval "$ac_link_default") 2>&5
33877  ac_status=$?
33878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33879  test $ac_status = 0; }; then :
33880  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33881# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33882# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33883# so that the user can short-circuit this test for compilers unknown to
33884# Autoconf.
33885for ac_file in $ac_files ''
33886do
33887  test -f "$ac_file" || continue
33888  case $ac_file in
33889    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33890	;;
33891    [ab].out )
33892	# We found the default executable, but exeext='' is most
33893	# certainly right.
33894	break;;
33895    *.* )
33896	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33897	then :; else
33898	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33899	fi
33900	# We set ac_cv_exeext here because the later test for it is not
33901	# safe: cross compilers may not add the suffix if given an `-o'
33902	# argument, so we may need to know it at that point already.
33903	# Even if this section looks crufty: it has the advantage of
33904	# actually working.
33905	break;;
33906    * )
33907	break;;
33908  esac
33909done
33910test "$ac_cv_exeext" = no && ac_cv_exeext=
33911
33912else
33913  ac_file=''
33914fi
33915if test -z "$ac_file"; then :
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918$as_echo "$as_me: failed program was:" >&5
33919sed 's/^/| /' conftest.$ac_ext >&5
33920
33921{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33923as_fn_error 77 "C compiler cannot create executables
33924See \`config.log' for more details" "$LINENO" 5; }
33925else
33926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33927$as_echo "yes" >&6; }
33928fi
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33930$as_echo_n "checking for C compiler default output file name... " >&6; }
33931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33932$as_echo "$ac_file" >&6; }
33933ac_exeext=$ac_cv_exeext
33934
33935rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33936ac_clean_files=$ac_clean_files_save
33937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33938$as_echo_n "checking for suffix of executables... " >&6; }
33939if { { ac_try="$ac_link"
33940case "(($ac_try" in
33941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33942  *) ac_try_echo=$ac_try;;
33943esac
33944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33945$as_echo "$ac_try_echo"; } >&5
33946  (eval "$ac_link") 2>&5
33947  ac_status=$?
33948  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33949  test $ac_status = 0; }; then :
33950  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33951# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33952# work properly (i.e., refer to `conftest.exe'), while it won't with
33953# `rm'.
33954for ac_file in conftest.exe conftest conftest.*; do
33955  test -f "$ac_file" || continue
33956  case $ac_file in
33957    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33958    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33959	  break;;
33960    * ) break;;
33961  esac
33962done
33963else
33964  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33966as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33967See \`config.log' for more details" "$LINENO" 5; }
33968fi
33969rm -f conftest conftest$ac_cv_exeext
33970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33971$as_echo "$ac_cv_exeext" >&6; }
33972
33973rm -f conftest.$ac_ext
33974EXEEXT=$ac_cv_exeext
33975ac_exeext=$EXEEXT
33976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33977/* end confdefs.h.  */
33978#include <stdio.h>
33979int
33980main ()
33981{
33982FILE *f = fopen ("conftest.out", "w");
33983 return ferror (f) || fclose (f) != 0;
33984
33985  ;
33986  return 0;
33987}
33988_ACEOF
33989ac_clean_files="$ac_clean_files conftest.out"
33990# Check that the compiler produces executables we can run.  If not, either
33991# the compiler is broken, or we cross compile.
33992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33993$as_echo_n "checking whether we are cross compiling... " >&6; }
33994if test "$cross_compiling" != yes; then
33995  { { ac_try="$ac_link"
33996case "(($ac_try" in
33997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33998  *) ac_try_echo=$ac_try;;
33999esac
34000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34001$as_echo "$ac_try_echo"; } >&5
34002  (eval "$ac_link") 2>&5
34003  ac_status=$?
34004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34005  test $ac_status = 0; }
34006  if { ac_try='./conftest$ac_cv_exeext'
34007  { { case "(($ac_try" in
34008  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34009  *) ac_try_echo=$ac_try;;
34010esac
34011eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34012$as_echo "$ac_try_echo"; } >&5
34013  (eval "$ac_try") 2>&5
34014  ac_status=$?
34015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34016  test $ac_status = 0; }; }; then
34017    cross_compiling=no
34018  else
34019    if test "$cross_compiling" = maybe; then
34020	cross_compiling=yes
34021    else
34022	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34024as_fn_error $? "cannot run C compiled programs.
34025If you meant to cross compile, use \`--host'.
34026See \`config.log' for more details" "$LINENO" 5; }
34027    fi
34028  fi
34029fi
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34031$as_echo "$cross_compiling" >&6; }
34032
34033rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34034ac_clean_files=$ac_clean_files_save
34035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34036$as_echo_n "checking for suffix of object files... " >&6; }
34037if ${ac_cv_objext+:} false; then :
34038  $as_echo_n "(cached) " >&6
34039else
34040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34041/* end confdefs.h.  */
34042
34043int
34044main ()
34045{
34046
34047  ;
34048  return 0;
34049}
34050_ACEOF
34051rm -f conftest.o conftest.obj
34052if { { ac_try="$ac_compile"
34053case "(($ac_try" in
34054  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34055  *) ac_try_echo=$ac_try;;
34056esac
34057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34058$as_echo "$ac_try_echo"; } >&5
34059  (eval "$ac_compile") 2>&5
34060  ac_status=$?
34061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34062  test $ac_status = 0; }; then :
34063  for ac_file in conftest.o conftest.obj conftest.*; do
34064  test -f "$ac_file" || continue;
34065  case $ac_file in
34066    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34067    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34068       break;;
34069  esac
34070done
34071else
34072  $as_echo "$as_me: failed program was:" >&5
34073sed 's/^/| /' conftest.$ac_ext >&5
34074
34075{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34077as_fn_error $? "cannot compute suffix of object files: cannot compile
34078See \`config.log' for more details" "$LINENO" 5; }
34079fi
34080rm -f conftest.$ac_cv_objext conftest.$ac_ext
34081fi
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34083$as_echo "$ac_cv_objext" >&6; }
34084OBJEXT=$ac_cv_objext
34085ac_objext=$OBJEXT
34086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34087$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34088if ${ac_cv_c_compiler_gnu+:} false; then :
34089  $as_echo_n "(cached) " >&6
34090else
34091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34092/* end confdefs.h.  */
34093
34094int
34095main ()
34096{
34097#ifndef __GNUC__
34098       choke me
34099#endif
34100
34101  ;
34102  return 0;
34103}
34104_ACEOF
34105if ac_fn_c_try_compile "$LINENO"; then :
34106  ac_compiler_gnu=yes
34107else
34108  ac_compiler_gnu=no
34109fi
34110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34111ac_cv_c_compiler_gnu=$ac_compiler_gnu
34112
34113fi
34114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34115$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34116if test $ac_compiler_gnu = yes; then
34117  GCC=yes
34118else
34119  GCC=
34120fi
34121ac_test_CFLAGS=${CFLAGS+set}
34122ac_save_CFLAGS=$CFLAGS
34123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34124$as_echo_n "checking whether $CC accepts -g... " >&6; }
34125if ${ac_cv_prog_cc_g+:} false; then :
34126  $as_echo_n "(cached) " >&6
34127else
34128  ac_save_c_werror_flag=$ac_c_werror_flag
34129   ac_c_werror_flag=yes
34130   ac_cv_prog_cc_g=no
34131   CFLAGS="-g"
34132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34133/* end confdefs.h.  */
34134
34135int
34136main ()
34137{
34138
34139  ;
34140  return 0;
34141}
34142_ACEOF
34143if ac_fn_c_try_compile "$LINENO"; then :
34144  ac_cv_prog_cc_g=yes
34145else
34146  CFLAGS=""
34147      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34148/* end confdefs.h.  */
34149
34150int
34151main ()
34152{
34153
34154  ;
34155  return 0;
34156}
34157_ACEOF
34158if ac_fn_c_try_compile "$LINENO"; then :
34159
34160else
34161  ac_c_werror_flag=$ac_save_c_werror_flag
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
34176fi
34177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34178fi
34179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34180fi
34181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34182   ac_c_werror_flag=$ac_save_c_werror_flag
34183fi
34184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34185$as_echo "$ac_cv_prog_cc_g" >&6; }
34186if test "$ac_test_CFLAGS" = set; then
34187  CFLAGS=$ac_save_CFLAGS
34188elif test $ac_cv_prog_cc_g = yes; then
34189  if test "$GCC" = yes; then
34190    CFLAGS="-g -O2"
34191  else
34192    CFLAGS="-g"
34193  fi
34194else
34195  if test "$GCC" = yes; then
34196    CFLAGS="-O2"
34197  else
34198    CFLAGS=
34199  fi
34200fi
34201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34202$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34203if ${ac_cv_prog_cc_c89+:} false; then :
34204  $as_echo_n "(cached) " >&6
34205else
34206  ac_cv_prog_cc_c89=no
34207ac_save_CC=$CC
34208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34209/* end confdefs.h.  */
34210#include <stdarg.h>
34211#include <stdio.h>
34212struct stat;
34213/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34214struct buf { int x; };
34215FILE * (*rcsopen) (struct buf *, struct stat *, int);
34216static char *e (p, i)
34217     char **p;
34218     int i;
34219{
34220  return p[i];
34221}
34222static char *f (char * (*g) (char **, int), char **p, ...)
34223{
34224  char *s;
34225  va_list v;
34226  va_start (v,p);
34227  s = g (p, va_arg (v,int));
34228  va_end (v);
34229  return s;
34230}
34231
34232/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34233   function prototypes and stuff, but not '\xHH' hex character constants.
34234   These don't provoke an error unfortunately, instead are silently treated
34235   as 'x'.  The following induces an error, until -std is added to get
34236   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34237   array size at least.  It's necessary to write '\x00'==0 to get something
34238   that's true only with -std.  */
34239int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34240
34241/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34242   inside strings and character constants.  */
34243#define FOO(x) 'x'
34244int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34245
34246int test (int i, double x);
34247struct s1 {int (*f) (int a);};
34248struct s2 {int (*f) (double a);};
34249int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34250int argc;
34251char **argv;
34252int
34253main ()
34254{
34255return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34256  ;
34257  return 0;
34258}
34259_ACEOF
34260for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34261	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34262do
34263  CC="$ac_save_CC $ac_arg"
34264  if ac_fn_c_try_compile "$LINENO"; then :
34265  ac_cv_prog_cc_c89=$ac_arg
34266fi
34267rm -f core conftest.err conftest.$ac_objext
34268  test "x$ac_cv_prog_cc_c89" != "xno" && break
34269done
34270rm -f conftest.$ac_ext
34271CC=$ac_save_CC
34272
34273fi
34274# AC_CACHE_VAL
34275case "x$ac_cv_prog_cc_c89" in
34276  x)
34277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34278$as_echo "none needed" >&6; } ;;
34279  xno)
34280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34281$as_echo "unsupported" >&6; } ;;
34282  *)
34283    CC="$CC $ac_cv_prog_cc_c89"
34284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34285$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34286esac
34287if test "x$ac_cv_prog_cc_c89" != xno; then :
34288
34289fi
34290
34291ac_ext=cpp
34292ac_cpp='$CXXCPP $CPPFLAGS'
34293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34296
34297
34298
34299  COMPILER_NAME=C++
34300  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34301
34302  if test "x$CXX" != x; then
34303    # User has supplied compiler name already, always let that override.
34304    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34305$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34306    if test "x`basename $CXX`" = "x$CXX"; then
34307      # A command without a complete path is provided, search $PATH.
34308
34309      for ac_prog in $CXX
34310do
34311  # Extract the first word of "$ac_prog", so it can be a program name with args.
34312set dummy $ac_prog; ac_word=$2
34313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34314$as_echo_n "checking for $ac_word... " >&6; }
34315if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34316  $as_echo_n "(cached) " >&6
34317else
34318  case $POTENTIAL_CXX in
34319  [\\/]* | ?:[\\/]*)
34320  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34321  ;;
34322  *)
34323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34324for as_dir in $PATH
34325do
34326  IFS=$as_save_IFS
34327  test -z "$as_dir" && as_dir=.
34328    for ac_exec_ext in '' $ac_executable_extensions; do
34329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34330    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34332    break 2
34333  fi
34334done
34335  done
34336IFS=$as_save_IFS
34337
34338  ;;
34339esac
34340fi
34341POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34342if test -n "$POTENTIAL_CXX"; then
34343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34344$as_echo "$POTENTIAL_CXX" >&6; }
34345else
34346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34347$as_echo "no" >&6; }
34348fi
34349
34350
34351  test -n "$POTENTIAL_CXX" && break
34352done
34353
34354      if test "x$POTENTIAL_CXX" != x; then
34355        CXX=$POTENTIAL_CXX
34356      else
34357        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34358      fi
34359    else
34360      # Otherwise it might already be a complete path
34361      if test ! -x "$CXX"; then
34362        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34363      fi
34364    fi
34365  else
34366    # No user supplied value. Locate compiler ourselves.
34367
34368    # If we are cross compiling, assume cross compilation tools follows the
34369    # cross compilation standard where they are prefixed with the autoconf
34370    # standard name for the target. For example the binary
34371    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34372    # If we are not cross compiling, then the default compiler name will be
34373    # used.
34374
34375    CXX=
34376    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34377    # before checking the rest of the PATH.
34378    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34379    # step, this should not be necessary.
34380    if test -n "$TOOLCHAIN_PATH"; then
34381      PATH_save="$PATH"
34382      PATH="$TOOLCHAIN_PATH"
34383      for ac_prog in $SEARCH_LIST
34384do
34385  # Extract the first word of "$ac_prog", so it can be a program name with args.
34386set dummy $ac_prog; ac_word=$2
34387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34388$as_echo_n "checking for $ac_word... " >&6; }
34389if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34390  $as_echo_n "(cached) " >&6
34391else
34392  case $TOOLCHAIN_PATH_CXX in
34393  [\\/]* | ?:[\\/]*)
34394  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34395  ;;
34396  *)
34397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34398for as_dir in $PATH
34399do
34400  IFS=$as_save_IFS
34401  test -z "$as_dir" && as_dir=.
34402    for ac_exec_ext in '' $ac_executable_extensions; do
34403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34404    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34406    break 2
34407  fi
34408done
34409  done
34410IFS=$as_save_IFS
34411
34412  ;;
34413esac
34414fi
34415TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34416if test -n "$TOOLCHAIN_PATH_CXX"; then
34417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34418$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34419else
34420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34421$as_echo "no" >&6; }
34422fi
34423
34424
34425  test -n "$TOOLCHAIN_PATH_CXX" && break
34426done
34427
34428      CXX=$TOOLCHAIN_PATH_CXX
34429      PATH="$PATH_save"
34430    fi
34431
34432    # AC_PATH_PROGS can't be run multiple times with the same variable,
34433    # so create a new name for this run.
34434    if test "x$CXX" = x; then
34435      for ac_prog in $SEARCH_LIST
34436do
34437  # Extract the first word of "$ac_prog", so it can be a program name with args.
34438set dummy $ac_prog; ac_word=$2
34439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34440$as_echo_n "checking for $ac_word... " >&6; }
34441if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34442  $as_echo_n "(cached) " >&6
34443else
34444  case $POTENTIAL_CXX in
34445  [\\/]* | ?:[\\/]*)
34446  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34447  ;;
34448  *)
34449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34450for as_dir in $PATH
34451do
34452  IFS=$as_save_IFS
34453  test -z "$as_dir" && as_dir=.
34454    for ac_exec_ext in '' $ac_executable_extensions; do
34455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34456    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34458    break 2
34459  fi
34460done
34461  done
34462IFS=$as_save_IFS
34463
34464  ;;
34465esac
34466fi
34467POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34468if test -n "$POTENTIAL_CXX"; then
34469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34470$as_echo "$POTENTIAL_CXX" >&6; }
34471else
34472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34473$as_echo "no" >&6; }
34474fi
34475
34476
34477  test -n "$POTENTIAL_CXX" && break
34478done
34479
34480      CXX=$POTENTIAL_CXX
34481    fi
34482
34483    if test "x$CXX" = x; then
34484
34485  # Print a helpful message on how to acquire the necessary build dependency.
34486  # devkit is the help tag: freetype, cups, alsa etc
34487  MISSING_DEPENDENCY=devkit
34488
34489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34490    cygwin_help $MISSING_DEPENDENCY
34491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34492    msys_help $MISSING_DEPENDENCY
34493  else
34494    PKGHANDLER_COMMAND=
34495
34496    case $PKGHANDLER in
34497      apt-get)
34498        apt_help     $MISSING_DEPENDENCY ;;
34499      yum)
34500        yum_help     $MISSING_DEPENDENCY ;;
34501      port)
34502        port_help    $MISSING_DEPENDENCY ;;
34503      pkgutil)
34504        pkgutil_help $MISSING_DEPENDENCY ;;
34505      pkgadd)
34506        pkgadd_help  $MISSING_DEPENDENCY ;;
34507    esac
34508
34509    if test "x$PKGHANDLER_COMMAND" != x; then
34510      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34511    fi
34512  fi
34513
34514      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34515    fi
34516  fi
34517
34518  # Now we have a compiler binary in CXX. Make sure it's okay.
34519
34520  # Only process if variable expands to non-empty
34521
34522  if test "x$CXX" != x; then
34523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524
34525  # First separate the path from the arguments. This will split at the first
34526  # space.
34527  complete="$CXX"
34528  path="${complete%% *}"
34529  tmp="$complete EOL"
34530  arguments="${tmp#* }"
34531
34532  # Input might be given as Windows format, start by converting to
34533  # unix format.
34534  new_path=`$CYGPATH -u "$path"`
34535
34536  # Now try to locate executable using which
34537  new_path=`$WHICH "$new_path" 2> /dev/null`
34538  # bat and cmd files are not always considered executable in cygwin causing which
34539  # to not find them
34540  if test "x$new_path" = x \
34541      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34542      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34543    new_path=`$CYGPATH -u "$path"`
34544  fi
34545  if test "x$new_path" = x; then
34546    # Oops. Which didn't find the executable.
34547    # The splitting of arguments from the executable at a space might have been incorrect,
34548    # since paths with space are more likely in Windows. Give it another try with the whole
34549    # argument.
34550    path="$complete"
34551    arguments="EOL"
34552    new_path=`$CYGPATH -u "$path"`
34553    new_path=`$WHICH "$new_path" 2> /dev/null`
34554    # bat and cmd files are not always considered executable in cygwin causing which
34555    # to not find them
34556    if test "x$new_path" = x \
34557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34559      new_path=`$CYGPATH -u "$path"`
34560    fi
34561    if test "x$new_path" = x; then
34562      # It's still not found. Now this is an unrecoverable error.
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34564$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34565      has_space=`$ECHO "$complete" | $GREP " "`
34566      if test "x$has_space" != x; then
34567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34569      fi
34570      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34571    fi
34572  fi
34573
34574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34577  # "foo.exe" is OK but "foo" is an error.
34578  #
34579  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34580  # It is also a way to make sure we got the proper file name for the real test later on.
34581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34582  if test "x$test_shortpath" = x; then
34583    # Short path failed, file does not exist as specified.
34584    # Try adding .exe or .cmd
34585    if test -f "${new_path}.exe"; then
34586      input_to_shortpath="${new_path}.exe"
34587    elif test -f "${new_path}.cmd"; then
34588      input_to_shortpath="${new_path}.cmd"
34589    else
34590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34591$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34594      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34595    fi
34596  else
34597    input_to_shortpath="$new_path"
34598  fi
34599
34600  # Call helper function which possibly converts this using DOS-style short mode.
34601  # If so, the updated path is stored in $new_path.
34602  new_path="$input_to_shortpath"
34603
34604  input_path="$input_to_shortpath"
34605  # Check if we need to convert this using DOS-style short mode. If the path
34606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34607  # take no chances and rewrite it.
34608  # Note: m4 eats our [], so we need to use [ and ] instead.
34609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34610  if test "x$has_forbidden_chars" != x; then
34611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34615      # Going to short mode and back again did indeed matter. Since short mode is
34616      # case insensitive, let's make it lowercase to improve readability.
34617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34618      # Now convert it back to Unix-style (cygpath)
34619      input_path=`$CYGPATH -u "$shortmode_path"`
34620      new_path="$input_path"
34621    fi
34622  fi
34623
34624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34625  if test "x$test_cygdrive_prefix" = x; then
34626    # As a simple fix, exclude /usr/bin since it's not a real path.
34627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34629      # a path prefixed by /cygdrive for fixpath to work.
34630      new_path="$CYGWIN_ROOT_PATH$input_path"
34631    fi
34632  fi
34633
34634  # remove trailing .exe if any
34635  new_path="${new_path/%.exe/}"
34636
34637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34638
34639  # First separate the path from the arguments. This will split at the first
34640  # space.
34641  complete="$CXX"
34642  path="${complete%% *}"
34643  tmp="$complete EOL"
34644  arguments="${tmp#* }"
34645
34646  # Input might be given as Windows format, start by converting to
34647  # unix format.
34648  new_path="$path"
34649
34650  windows_path="$new_path"
34651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34652    unix_path=`$CYGPATH -u "$windows_path"`
34653    new_path="$unix_path"
34654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34656    new_path="$unix_path"
34657  fi
34658
34659
34660  # Now try to locate executable using which
34661  new_path=`$WHICH "$new_path" 2> /dev/null`
34662
34663  if test "x$new_path" = x; then
34664    # Oops. Which didn't find the executable.
34665    # The splitting of arguments from the executable at a space might have been incorrect,
34666    # since paths with space are more likely in Windows. Give it another try with the whole
34667    # argument.
34668    path="$complete"
34669    arguments="EOL"
34670    new_path="$path"
34671
34672  windows_path="$new_path"
34673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34674    unix_path=`$CYGPATH -u "$windows_path"`
34675    new_path="$unix_path"
34676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34678    new_path="$unix_path"
34679  fi
34680
34681
34682    new_path=`$WHICH "$new_path" 2> /dev/null`
34683    # bat and cmd files are not always considered executable in MSYS causing which
34684    # to not find them
34685    if test "x$new_path" = x \
34686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34688      new_path="$path"
34689
34690  windows_path="$new_path"
34691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34692    unix_path=`$CYGPATH -u "$windows_path"`
34693    new_path="$unix_path"
34694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34696    new_path="$unix_path"
34697  fi
34698
34699    fi
34700
34701    if test "x$new_path" = x; then
34702      # It's still not found. Now this is an unrecoverable error.
34703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34704$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34705      has_space=`$ECHO "$complete" | $GREP " "`
34706      if test "x$has_space" != x; then
34707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34709      fi
34710      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34711    fi
34712  fi
34713
34714  # Now new_path has a complete unix path to the binary
34715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34716    # Keep paths in /bin as-is, but remove trailing .exe if any
34717    new_path="${new_path/%.exe/}"
34718    # Do not save /bin paths to all_fixpath_prefixes!
34719  else
34720    # Not in mixed or Windows style, start by that.
34721    new_path=`cmd //c echo $new_path`
34722
34723  input_path="$new_path"
34724  # Check if we need to convert this using DOS-style short mode. If the path
34725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34726  # take no chances and rewrite it.
34727  # Note: m4 eats our [], so we need to use [ and ] instead.
34728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34729  if test "x$has_forbidden_chars" != x; then
34730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34732  fi
34733
34734    # Output is in $new_path
34735
34736  windows_path="$new_path"
34737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34738    unix_path=`$CYGPATH -u "$windows_path"`
34739    new_path="$unix_path"
34740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34742    new_path="$unix_path"
34743  fi
34744
34745    # remove trailing .exe if any
34746    new_path="${new_path/%.exe/}"
34747
34748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34750  fi
34751
34752    else
34753      # We're on a unix platform. Hooray! :)
34754      # First separate the path from the arguments. This will split at the first
34755      # space.
34756      complete="$CXX"
34757      path="${complete%% *}"
34758      tmp="$complete EOL"
34759      arguments="${tmp#* }"
34760
34761      # Cannot rely on the command "which" here since it doesn't always work.
34762      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34763      if test -z "$is_absolute_path"; then
34764        # Path to executable is not absolute. Find it.
34765        IFS_save="$IFS"
34766        IFS=:
34767        for p in $PATH; do
34768          if test -f "$p/$path" && test -x "$p/$path"; then
34769            new_path="$p/$path"
34770            break
34771          fi
34772        done
34773        IFS="$IFS_save"
34774      else
34775        # This is an absolute path, we can use it without further modifications.
34776        new_path="$path"
34777      fi
34778
34779      if test "x$new_path" = x; then
34780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34781$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34782        has_space=`$ECHO "$complete" | $GREP " "`
34783        if test "x$has_space" != x; then
34784          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34786        fi
34787        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34788      fi
34789    fi
34790
34791    # Now join together the path and the arguments once again
34792    if test "x$arguments" != xEOL; then
34793      new_complete="$new_path ${arguments% *}"
34794    else
34795      new_complete="$new_path"
34796    fi
34797
34798    if test "x$complete" != "x$new_complete"; then
34799      CXX="$new_complete"
34800      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34801$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34802    fi
34803  fi
34804
34805  TEST_COMPILER="$CXX"
34806
34807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34808$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34809  SYMLINK_ORIGINAL="$TEST_COMPILER"
34810
34811  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34812    # Follow a chain of symbolic links. Use readlink
34813    # where it exists, else fall back to horribly
34814    # complicated shell code.
34815    if test "x$READLINK_TESTED" != yes; then
34816      # On MacOSX there is a readlink tool with a different
34817      # purpose than the GNU readlink tool. Check the found readlink.
34818      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34819      if test "x$ISGNU" = x; then
34820        # A readlink that we do not know how to use.
34821        # Are there other non-GNU readlinks out there?
34822        READLINK_TESTED=yes
34823        READLINK=
34824      fi
34825    fi
34826
34827    if test "x$READLINK" != x; then
34828      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34829    else
34830      # Save the current directory for restoring afterwards
34831      STARTDIR=$PWD
34832      COUNTER=0
34833      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34834      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34835      cd $sym_link_dir
34836      # Use -P flag to resolve symlinks in directories.
34837      cd `$THEPWDCMD -P`
34838      sym_link_dir=`$THEPWDCMD -P`
34839      # Resolve file symlinks
34840      while test $COUNTER -lt 20; do
34841        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34842        if test "x$ISLINK" == x; then
34843          # This is not a symbolic link! We are done!
34844          break
34845        fi
34846        # Again resolve directory symlinks since the target of the just found
34847        # link could be in a different directory
34848        cd `$DIRNAME $ISLINK`
34849        sym_link_dir=`$THEPWDCMD -P`
34850        sym_link_file=`$BASENAME $ISLINK`
34851        let COUNTER=COUNTER+1
34852      done
34853      cd $STARTDIR
34854      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34855    fi
34856  fi
34857
34858  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34860$as_echo "no symlink" >&6; }
34861  else
34862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34863$as_echo "$SYMLINK_ORIGINAL" >&6; }
34864
34865    # We can't handle ccache by gcc wrappers, since we need to know if we're
34866    # using ccache. Instead ccache usage must be controlled by a configure option.
34867    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34868    if test "x$COMPILER_BASENAME" = "xccache"; then
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34870$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34871      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34872    fi
34873  fi
34874
34875
34876  COMPILER=$CXX
34877  COMPILER_NAME=$COMPILER_NAME
34878
34879  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34880    # cc -V output typically looks like
34881    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34882    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34883    # Check that this is likely to be the Solaris Studio cc.
34884    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34885    if test $? -ne 0; then
34886      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34887      { $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
34888$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34889      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34890$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34891      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34892$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34893      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34894    fi
34895    # Remove usage instructions (if present), and
34896    # collapse compiler output into a single line
34897    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34898        $SED -e 's/ *[Uu]sage:.*//'`
34899    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34900        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34901  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34902    # xlc -qversion output typically looks like
34903    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34904    #     Version: 11.01.0000.0015
34905    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34906    # Check that this is likely to be the IBM XL C compiler.
34907    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34908    if test $? -ne 0; then
34909      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34910      { $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
34911$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34913$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34915$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34916      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34917    fi
34918    # Collapse compiler output into a single line
34919    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34920    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34921        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34922  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34923    # There is no specific version flag, but all output starts with a version string.
34924    # First line typically looks something like:
34925    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34926    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34927    # Check that this is likely to be Microsoft CL.EXE.
34928    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34929    if test $? -ne 0; then
34930      { $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
34931$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34932      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34933$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34934      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34935    fi
34936    # Collapse compiler output into a single line
34937    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34938    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34939        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34940  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34941    # gcc --version output typically looks like
34942    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34943    #     Copyright (C) 2013 Free Software Foundation, Inc.
34944    #     This is free software; see the source for copying conditions.  There is NO
34945    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34946    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34947    # Check that this is likely to be GCC.
34948    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34949    if test $? -ne 0; then
34950      { $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
34951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34953$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34955    fi
34956    # Remove Copyright and legalese from version string, and
34957    # collapse into a single line
34958    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34959        $SED -e 's/ *Copyright .*//'`
34960    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34961        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34962  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34963    # clang --version output typically looks like
34964    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34965    #    clang version 3.3 (tags/RELEASE_33/final)
34966    # or
34967    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34968    #    Target: x86_64-pc-linux-gnu
34969    #    Thread model: posix
34970    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34971    # Check that this is likely to be clang
34972    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34973    if test $? -ne 0; then
34974      { $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
34975$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34976      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34977$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34978      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34979    fi
34980    # Collapse compiler output into a single line
34981    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34982    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34983        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34984  else
34985      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34986  fi
34987  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34988  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34989  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34990  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34991
34992  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34993$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34994
34995
34996  # Now that we have resolved CXX ourself, let autoconf have its go at it
34997  ac_ext=cpp
34998ac_cpp='$CXXCPP $CPPFLAGS'
34999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35002if test -z "$CXX"; then
35003  if test -n "$CCC"; then
35004    CXX=$CCC
35005  else
35006    if test -n "$ac_tool_prefix"; then
35007  for ac_prog in $CXX
35008  do
35009    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35010set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35012$as_echo_n "checking for $ac_word... " >&6; }
35013if ${ac_cv_prog_CXX+:} false; then :
35014  $as_echo_n "(cached) " >&6
35015else
35016  if test -n "$CXX"; then
35017  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35018else
35019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35020for as_dir in $PATH
35021do
35022  IFS=$as_save_IFS
35023  test -z "$as_dir" && as_dir=.
35024    for ac_exec_ext in '' $ac_executable_extensions; do
35025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35026    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35028    break 2
35029  fi
35030done
35031  done
35032IFS=$as_save_IFS
35033
35034fi
35035fi
35036CXX=$ac_cv_prog_CXX
35037if test -n "$CXX"; then
35038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35039$as_echo "$CXX" >&6; }
35040else
35041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35042$as_echo "no" >&6; }
35043fi
35044
35045
35046    test -n "$CXX" && break
35047  done
35048fi
35049if test -z "$CXX"; then
35050  ac_ct_CXX=$CXX
35051  for ac_prog in $CXX
35052do
35053  # Extract the first word of "$ac_prog", so it can be a program name with args.
35054set dummy $ac_prog; ac_word=$2
35055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35056$as_echo_n "checking for $ac_word... " >&6; }
35057if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35058  $as_echo_n "(cached) " >&6
35059else
35060  if test -n "$ac_ct_CXX"; then
35061  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35062else
35063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35064for as_dir in $PATH
35065do
35066  IFS=$as_save_IFS
35067  test -z "$as_dir" && as_dir=.
35068    for ac_exec_ext in '' $ac_executable_extensions; do
35069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35070    ac_cv_prog_ac_ct_CXX="$ac_prog"
35071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35072    break 2
35073  fi
35074done
35075  done
35076IFS=$as_save_IFS
35077
35078fi
35079fi
35080ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35081if test -n "$ac_ct_CXX"; then
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35083$as_echo "$ac_ct_CXX" >&6; }
35084else
35085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35086$as_echo "no" >&6; }
35087fi
35088
35089
35090  test -n "$ac_ct_CXX" && break
35091done
35092
35093  if test "x$ac_ct_CXX" = x; then
35094    CXX="g++"
35095  else
35096    case $cross_compiling:$ac_tool_warned in
35097yes:)
35098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35100ac_tool_warned=yes ;;
35101esac
35102    CXX=$ac_ct_CXX
35103  fi
35104fi
35105
35106  fi
35107fi
35108# Provide some information about the compiler.
35109$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35110set X $ac_compile
35111ac_compiler=$2
35112for ac_option in --version -v -V -qversion; do
35113  { { ac_try="$ac_compiler $ac_option >&5"
35114case "(($ac_try" in
35115  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35116  *) ac_try_echo=$ac_try;;
35117esac
35118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35119$as_echo "$ac_try_echo"; } >&5
35120  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35121  ac_status=$?
35122  if test -s conftest.err; then
35123    sed '10a\
35124... rest of stderr output deleted ...
35125         10q' conftest.err >conftest.er1
35126    cat conftest.er1 >&5
35127  fi
35128  rm -f conftest.er1 conftest.err
35129  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35130  test $ac_status = 0; }
35131done
35132
35133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35134$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35135if ${ac_cv_cxx_compiler_gnu+:} false; then :
35136  $as_echo_n "(cached) " >&6
35137else
35138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35139/* end confdefs.h.  */
35140
35141int
35142main ()
35143{
35144#ifndef __GNUC__
35145       choke me
35146#endif
35147
35148  ;
35149  return 0;
35150}
35151_ACEOF
35152if ac_fn_cxx_try_compile "$LINENO"; then :
35153  ac_compiler_gnu=yes
35154else
35155  ac_compiler_gnu=no
35156fi
35157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35158ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35159
35160fi
35161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35162$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35163if test $ac_compiler_gnu = yes; then
35164  GXX=yes
35165else
35166  GXX=
35167fi
35168ac_test_CXXFLAGS=${CXXFLAGS+set}
35169ac_save_CXXFLAGS=$CXXFLAGS
35170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35171$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35172if ${ac_cv_prog_cxx_g+:} false; then :
35173  $as_echo_n "(cached) " >&6
35174else
35175  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35176   ac_cxx_werror_flag=yes
35177   ac_cv_prog_cxx_g=no
35178   CXXFLAGS="-g"
35179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35180/* end confdefs.h.  */
35181
35182int
35183main ()
35184{
35185
35186  ;
35187  return 0;
35188}
35189_ACEOF
35190if ac_fn_cxx_try_compile "$LINENO"; then :
35191  ac_cv_prog_cxx_g=yes
35192else
35193  CXXFLAGS=""
35194      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35195/* end confdefs.h.  */
35196
35197int
35198main ()
35199{
35200
35201  ;
35202  return 0;
35203}
35204_ACEOF
35205if ac_fn_cxx_try_compile "$LINENO"; then :
35206
35207else
35208  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
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
35223fi
35224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35225fi
35226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35227fi
35228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35229   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35230fi
35231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35232$as_echo "$ac_cv_prog_cxx_g" >&6; }
35233if test "$ac_test_CXXFLAGS" = set; then
35234  CXXFLAGS=$ac_save_CXXFLAGS
35235elif test $ac_cv_prog_cxx_g = yes; then
35236  if test "$GXX" = yes; then
35237    CXXFLAGS="-g -O2"
35238  else
35239    CXXFLAGS="-g"
35240  fi
35241else
35242  if test "$GXX" = yes; then
35243    CXXFLAGS="-O2"
35244  else
35245    CXXFLAGS=
35246  fi
35247fi
35248ac_ext=cpp
35249ac_cpp='$CXXCPP $CPPFLAGS'
35250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35253
35254
35255  # This is the compiler version number on the form X.Y[.Z]
35256
35257
35258
35259
35260  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35262$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35264$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35265  fi
35266
35267  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35268  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35269    { $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
35270$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;}
35271  fi
35272
35273  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35274    { $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
35275$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35276  fi
35277
35278  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35279
35280
35281  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331    # Execute function body
35332
35333  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35334  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35335
35336  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35337    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35338  fi
35339
35340  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35341    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35342  fi
35343
35344  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35345  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35346
35347  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35348    :
35349
35350  else
35351    :
35352
35353          { $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
35354$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35355
35356
35357  fi
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372  fi
35373
35374  #
35375  # Setup the preprocessor (CPP and CXXCPP)
35376  #
35377  ac_ext=c
35378ac_cpp='$CPP $CPPFLAGS'
35379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35381ac_compiler_gnu=$ac_cv_c_compiler_gnu
35382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35383$as_echo_n "checking how to run the C preprocessor... " >&6; }
35384# On Suns, sometimes $CPP names a directory.
35385if test -n "$CPP" && test -d "$CPP"; then
35386  CPP=
35387fi
35388if test -z "$CPP"; then
35389  if ${ac_cv_prog_CPP+:} false; then :
35390  $as_echo_n "(cached) " >&6
35391else
35392      # Double quotes because CPP needs to be expanded
35393    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35394    do
35395      ac_preproc_ok=false
35396for ac_c_preproc_warn_flag in '' yes
35397do
35398  # Use a header file that comes with gcc, so configuring glibc
35399  # with a fresh cross-compiler works.
35400  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35401  # <limits.h> exists even on freestanding compilers.
35402  # On the NeXT, cc -E runs the code through the compiler's parser,
35403  # not just through cpp. "Syntax error" is here to catch this case.
35404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35405/* end confdefs.h.  */
35406#ifdef __STDC__
35407# include <limits.h>
35408#else
35409# include <assert.h>
35410#endif
35411		     Syntax error
35412_ACEOF
35413if ac_fn_c_try_cpp "$LINENO"; then :
35414
35415else
35416  # Broken: fails on valid input.
35417continue
35418fi
35419rm -f conftest.err conftest.i conftest.$ac_ext
35420
35421  # OK, works on sane cases.  Now check whether nonexistent headers
35422  # can be detected and how.
35423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35424/* end confdefs.h.  */
35425#include <ac_nonexistent.h>
35426_ACEOF
35427if ac_fn_c_try_cpp "$LINENO"; then :
35428  # Broken: success on invalid input.
35429continue
35430else
35431  # Passes both tests.
35432ac_preproc_ok=:
35433break
35434fi
35435rm -f conftest.err conftest.i conftest.$ac_ext
35436
35437done
35438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35439rm -f conftest.i conftest.err conftest.$ac_ext
35440if $ac_preproc_ok; then :
35441  break
35442fi
35443
35444    done
35445    ac_cv_prog_CPP=$CPP
35446
35447fi
35448  CPP=$ac_cv_prog_CPP
35449else
35450  ac_cv_prog_CPP=$CPP
35451fi
35452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35453$as_echo "$CPP" >&6; }
35454ac_preproc_ok=false
35455for ac_c_preproc_warn_flag in '' yes
35456do
35457  # Use a header file that comes with gcc, so configuring glibc
35458  # with a fresh cross-compiler works.
35459  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35460  # <limits.h> exists even on freestanding compilers.
35461  # On the NeXT, cc -E runs the code through the compiler's parser,
35462  # not just through cpp. "Syntax error" is here to catch this case.
35463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35464/* end confdefs.h.  */
35465#ifdef __STDC__
35466# include <limits.h>
35467#else
35468# include <assert.h>
35469#endif
35470		     Syntax error
35471_ACEOF
35472if ac_fn_c_try_cpp "$LINENO"; then :
35473
35474else
35475  # Broken: fails on valid input.
35476continue
35477fi
35478rm -f conftest.err conftest.i conftest.$ac_ext
35479
35480  # OK, works on sane cases.  Now check whether nonexistent headers
35481  # can be detected and how.
35482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35483/* end confdefs.h.  */
35484#include <ac_nonexistent.h>
35485_ACEOF
35486if ac_fn_c_try_cpp "$LINENO"; then :
35487  # Broken: success on invalid input.
35488continue
35489else
35490  # Passes both tests.
35491ac_preproc_ok=:
35492break
35493fi
35494rm -f conftest.err conftest.i conftest.$ac_ext
35495
35496done
35497# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35498rm -f conftest.i conftest.err conftest.$ac_ext
35499if $ac_preproc_ok; then :
35500
35501else
35502  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35504as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35505See \`config.log' for more details" "$LINENO" 5; }
35506fi
35507
35508ac_ext=cpp
35509ac_cpp='$CXXCPP $CPPFLAGS'
35510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35513
35514
35515  # Only process if variable expands to non-empty
35516
35517  if test "x$CPP" != x; then
35518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35519
35520  # First separate the path from the arguments. This will split at the first
35521  # space.
35522  complete="$CPP"
35523  path="${complete%% *}"
35524  tmp="$complete EOL"
35525  arguments="${tmp#* }"
35526
35527  # Input might be given as Windows format, start by converting to
35528  # unix format.
35529  new_path=`$CYGPATH -u "$path"`
35530
35531  # Now try to locate executable using which
35532  new_path=`$WHICH "$new_path" 2> /dev/null`
35533  # bat and cmd files are not always considered executable in cygwin causing which
35534  # to not find them
35535  if test "x$new_path" = x \
35536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35538    new_path=`$CYGPATH -u "$path"`
35539  fi
35540  if test "x$new_path" = x; then
35541    # Oops. Which didn't find the executable.
35542    # The splitting of arguments from the executable at a space might have been incorrect,
35543    # since paths with space are more likely in Windows. Give it another try with the whole
35544    # argument.
35545    path="$complete"
35546    arguments="EOL"
35547    new_path=`$CYGPATH -u "$path"`
35548    new_path=`$WHICH "$new_path" 2> /dev/null`
35549    # bat and cmd files are not always considered executable in cygwin causing which
35550    # to not find them
35551    if test "x$new_path" = x \
35552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35554      new_path=`$CYGPATH -u "$path"`
35555    fi
35556    if test "x$new_path" = x; then
35557      # It's still not found. Now this is an unrecoverable error.
35558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35559$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35560      has_space=`$ECHO "$complete" | $GREP " "`
35561      if test "x$has_space" != x; then
35562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35564      fi
35565      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35566    fi
35567  fi
35568
35569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35572  # "foo.exe" is OK but "foo" is an error.
35573  #
35574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35575  # It is also a way to make sure we got the proper file name for the real test later on.
35576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35577  if test "x$test_shortpath" = x; then
35578    # Short path failed, file does not exist as specified.
35579    # Try adding .exe or .cmd
35580    if test -f "${new_path}.exe"; then
35581      input_to_shortpath="${new_path}.exe"
35582    elif test -f "${new_path}.cmd"; then
35583      input_to_shortpath="${new_path}.cmd"
35584    else
35585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35586$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35589      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35590    fi
35591  else
35592    input_to_shortpath="$new_path"
35593  fi
35594
35595  # Call helper function which possibly converts this using DOS-style short mode.
35596  # If so, the updated path is stored in $new_path.
35597  new_path="$input_to_shortpath"
35598
35599  input_path="$input_to_shortpath"
35600  # Check if we need to convert this using DOS-style short mode. If the path
35601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35602  # take no chances and rewrite it.
35603  # Note: m4 eats our [], so we need to use [ and ] instead.
35604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35605  if test "x$has_forbidden_chars" != x; then
35606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35610      # Going to short mode and back again did indeed matter. Since short mode is
35611      # case insensitive, let's make it lowercase to improve readability.
35612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35613      # Now convert it back to Unix-style (cygpath)
35614      input_path=`$CYGPATH -u "$shortmode_path"`
35615      new_path="$input_path"
35616    fi
35617  fi
35618
35619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35620  if test "x$test_cygdrive_prefix" = x; then
35621    # As a simple fix, exclude /usr/bin since it's not a real path.
35622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35624      # a path prefixed by /cygdrive for fixpath to work.
35625      new_path="$CYGWIN_ROOT_PATH$input_path"
35626    fi
35627  fi
35628
35629  # remove trailing .exe if any
35630  new_path="${new_path/%.exe/}"
35631
35632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35633
35634  # First separate the path from the arguments. This will split at the first
35635  # space.
35636  complete="$CPP"
35637  path="${complete%% *}"
35638  tmp="$complete EOL"
35639  arguments="${tmp#* }"
35640
35641  # Input might be given as Windows format, start by converting to
35642  # unix format.
35643  new_path="$path"
35644
35645  windows_path="$new_path"
35646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35647    unix_path=`$CYGPATH -u "$windows_path"`
35648    new_path="$unix_path"
35649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35651    new_path="$unix_path"
35652  fi
35653
35654
35655  # Now try to locate executable using which
35656  new_path=`$WHICH "$new_path" 2> /dev/null`
35657
35658  if test "x$new_path" = x; then
35659    # Oops. Which didn't find the executable.
35660    # The splitting of arguments from the executable at a space might have been incorrect,
35661    # since paths with space are more likely in Windows. Give it another try with the whole
35662    # argument.
35663    path="$complete"
35664    arguments="EOL"
35665    new_path="$path"
35666
35667  windows_path="$new_path"
35668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35669    unix_path=`$CYGPATH -u "$windows_path"`
35670    new_path="$unix_path"
35671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35673    new_path="$unix_path"
35674  fi
35675
35676
35677    new_path=`$WHICH "$new_path" 2> /dev/null`
35678    # bat and cmd files are not always considered executable in MSYS causing which
35679    # to not find them
35680    if test "x$new_path" = x \
35681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35683      new_path="$path"
35684
35685  windows_path="$new_path"
35686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35687    unix_path=`$CYGPATH -u "$windows_path"`
35688    new_path="$unix_path"
35689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35691    new_path="$unix_path"
35692  fi
35693
35694    fi
35695
35696    if test "x$new_path" = x; then
35697      # It's still not found. Now this is an unrecoverable error.
35698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35699$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35700      has_space=`$ECHO "$complete" | $GREP " "`
35701      if test "x$has_space" != x; then
35702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35704      fi
35705      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35706    fi
35707  fi
35708
35709  # Now new_path has a complete unix path to the binary
35710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35711    # Keep paths in /bin as-is, but remove trailing .exe if any
35712    new_path="${new_path/%.exe/}"
35713    # Do not save /bin paths to all_fixpath_prefixes!
35714  else
35715    # Not in mixed or Windows style, start by that.
35716    new_path=`cmd //c echo $new_path`
35717
35718  input_path="$new_path"
35719  # Check if we need to convert this using DOS-style short mode. If the path
35720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35721  # take no chances and rewrite it.
35722  # Note: m4 eats our [], so we need to use [ and ] instead.
35723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35724  if test "x$has_forbidden_chars" != x; then
35725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35727  fi
35728
35729    # Output is in $new_path
35730
35731  windows_path="$new_path"
35732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35733    unix_path=`$CYGPATH -u "$windows_path"`
35734    new_path="$unix_path"
35735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35737    new_path="$unix_path"
35738  fi
35739
35740    # remove trailing .exe if any
35741    new_path="${new_path/%.exe/}"
35742
35743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35745  fi
35746
35747    else
35748      # We're on a unix platform. Hooray! :)
35749      # First separate the path from the arguments. This will split at the first
35750      # space.
35751      complete="$CPP"
35752      path="${complete%% *}"
35753      tmp="$complete EOL"
35754      arguments="${tmp#* }"
35755
35756      # Cannot rely on the command "which" here since it doesn't always work.
35757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35758      if test -z "$is_absolute_path"; then
35759        # Path to executable is not absolute. Find it.
35760        IFS_save="$IFS"
35761        IFS=:
35762        for p in $PATH; do
35763          if test -f "$p/$path" && test -x "$p/$path"; then
35764            new_path="$p/$path"
35765            break
35766          fi
35767        done
35768        IFS="$IFS_save"
35769      else
35770        # This is an absolute path, we can use it without further modifications.
35771        new_path="$path"
35772      fi
35773
35774      if test "x$new_path" = x; then
35775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35776$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35777        has_space=`$ECHO "$complete" | $GREP " "`
35778        if test "x$has_space" != x; then
35779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35781        fi
35782        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35783      fi
35784    fi
35785
35786    # Now join together the path and the arguments once again
35787    if test "x$arguments" != xEOL; then
35788      new_complete="$new_path ${arguments% *}"
35789    else
35790      new_complete="$new_path"
35791    fi
35792
35793    if test "x$complete" != "x$new_complete"; then
35794      CPP="$new_complete"
35795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35796$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35797    fi
35798  fi
35799
35800  ac_ext=cpp
35801ac_cpp='$CXXCPP $CPPFLAGS'
35802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35806$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35807if test -z "$CXXCPP"; then
35808  if ${ac_cv_prog_CXXCPP+:} false; then :
35809  $as_echo_n "(cached) " >&6
35810else
35811      # Double quotes because CXXCPP needs to be expanded
35812    for CXXCPP in "$CXX -E" "/lib/cpp"
35813    do
35814      ac_preproc_ok=false
35815for ac_cxx_preproc_warn_flag in '' yes
35816do
35817  # Use a header file that comes with gcc, so configuring glibc
35818  # with a fresh cross-compiler works.
35819  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35820  # <limits.h> exists even on freestanding compilers.
35821  # On the NeXT, cc -E runs the code through the compiler's parser,
35822  # not just through cpp. "Syntax error" is here to catch this case.
35823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35824/* end confdefs.h.  */
35825#ifdef __STDC__
35826# include <limits.h>
35827#else
35828# include <assert.h>
35829#endif
35830		     Syntax error
35831_ACEOF
35832if ac_fn_cxx_try_cpp "$LINENO"; then :
35833
35834else
35835  # Broken: fails on valid input.
35836continue
35837fi
35838rm -f conftest.err conftest.i conftest.$ac_ext
35839
35840  # OK, works on sane cases.  Now check whether nonexistent headers
35841  # can be detected and how.
35842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35843/* end confdefs.h.  */
35844#include <ac_nonexistent.h>
35845_ACEOF
35846if ac_fn_cxx_try_cpp "$LINENO"; then :
35847  # Broken: success on invalid input.
35848continue
35849else
35850  # Passes both tests.
35851ac_preproc_ok=:
35852break
35853fi
35854rm -f conftest.err conftest.i conftest.$ac_ext
35855
35856done
35857# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35858rm -f conftest.i conftest.err conftest.$ac_ext
35859if $ac_preproc_ok; then :
35860  break
35861fi
35862
35863    done
35864    ac_cv_prog_CXXCPP=$CXXCPP
35865
35866fi
35867  CXXCPP=$ac_cv_prog_CXXCPP
35868else
35869  ac_cv_prog_CXXCPP=$CXXCPP
35870fi
35871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35872$as_echo "$CXXCPP" >&6; }
35873ac_preproc_ok=false
35874for ac_cxx_preproc_warn_flag in '' yes
35875do
35876  # Use a header file that comes with gcc, so configuring glibc
35877  # with a fresh cross-compiler works.
35878  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35879  # <limits.h> exists even on freestanding compilers.
35880  # On the NeXT, cc -E runs the code through the compiler's parser,
35881  # not just through cpp. "Syntax error" is here to catch this case.
35882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35883/* end confdefs.h.  */
35884#ifdef __STDC__
35885# include <limits.h>
35886#else
35887# include <assert.h>
35888#endif
35889		     Syntax error
35890_ACEOF
35891if ac_fn_cxx_try_cpp "$LINENO"; then :
35892
35893else
35894  # Broken: fails on valid input.
35895continue
35896fi
35897rm -f conftest.err conftest.i conftest.$ac_ext
35898
35899  # OK, works on sane cases.  Now check whether nonexistent headers
35900  # can be detected and how.
35901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35902/* end confdefs.h.  */
35903#include <ac_nonexistent.h>
35904_ACEOF
35905if ac_fn_cxx_try_cpp "$LINENO"; then :
35906  # Broken: success on invalid input.
35907continue
35908else
35909  # Passes both tests.
35910ac_preproc_ok=:
35911break
35912fi
35913rm -f conftest.err conftest.i conftest.$ac_ext
35914
35915done
35916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35917rm -f conftest.i conftest.err conftest.$ac_ext
35918if $ac_preproc_ok; then :
35919
35920else
35921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35923as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35924See \`config.log' for more details" "$LINENO" 5; }
35925fi
35926
35927ac_ext=cpp
35928ac_cpp='$CXXCPP $CPPFLAGS'
35929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35932
35933
35934  # Only process if variable expands to non-empty
35935
35936  if test "x$CXXCPP" != x; then
35937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35938
35939  # First separate the path from the arguments. This will split at the first
35940  # space.
35941  complete="$CXXCPP"
35942  path="${complete%% *}"
35943  tmp="$complete EOL"
35944  arguments="${tmp#* }"
35945
35946  # Input might be given as Windows format, start by converting to
35947  # unix format.
35948  new_path=`$CYGPATH -u "$path"`
35949
35950  # Now try to locate executable using which
35951  new_path=`$WHICH "$new_path" 2> /dev/null`
35952  # bat and cmd files are not always considered executable in cygwin causing which
35953  # to not find them
35954  if test "x$new_path" = x \
35955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35957    new_path=`$CYGPATH -u "$path"`
35958  fi
35959  if test "x$new_path" = x; then
35960    # Oops. Which didn't find the executable.
35961    # The splitting of arguments from the executable at a space might have been incorrect,
35962    # since paths with space are more likely in Windows. Give it another try with the whole
35963    # argument.
35964    path="$complete"
35965    arguments="EOL"
35966    new_path=`$CYGPATH -u "$path"`
35967    new_path=`$WHICH "$new_path" 2> /dev/null`
35968    # bat and cmd files are not always considered executable in cygwin causing which
35969    # to not find them
35970    if test "x$new_path" = x \
35971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35973      new_path=`$CYGPATH -u "$path"`
35974    fi
35975    if test "x$new_path" = x; then
35976      # It's still not found. Now this is an unrecoverable error.
35977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35978$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35979      has_space=`$ECHO "$complete" | $GREP " "`
35980      if test "x$has_space" != x; then
35981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35983      fi
35984      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35985    fi
35986  fi
35987
35988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35991  # "foo.exe" is OK but "foo" is an error.
35992  #
35993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35994  # It is also a way to make sure we got the proper file name for the real test later on.
35995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35996  if test "x$test_shortpath" = x; then
35997    # Short path failed, file does not exist as specified.
35998    # Try adding .exe or .cmd
35999    if test -f "${new_path}.exe"; then
36000      input_to_shortpath="${new_path}.exe"
36001    elif test -f "${new_path}.cmd"; then
36002      input_to_shortpath="${new_path}.cmd"
36003    else
36004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36005$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36008      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36009    fi
36010  else
36011    input_to_shortpath="$new_path"
36012  fi
36013
36014  # Call helper function which possibly converts this using DOS-style short mode.
36015  # If so, the updated path is stored in $new_path.
36016  new_path="$input_to_shortpath"
36017
36018  input_path="$input_to_shortpath"
36019  # Check if we need to convert this using DOS-style short mode. If the path
36020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36021  # take no chances and rewrite it.
36022  # Note: m4 eats our [], so we need to use [ and ] instead.
36023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36024  if test "x$has_forbidden_chars" != x; then
36025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36029      # Going to short mode and back again did indeed matter. Since short mode is
36030      # case insensitive, let's make it lowercase to improve readability.
36031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36032      # Now convert it back to Unix-style (cygpath)
36033      input_path=`$CYGPATH -u "$shortmode_path"`
36034      new_path="$input_path"
36035    fi
36036  fi
36037
36038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36039  if test "x$test_cygdrive_prefix" = x; then
36040    # As a simple fix, exclude /usr/bin since it's not a real path.
36041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36043      # a path prefixed by /cygdrive for fixpath to work.
36044      new_path="$CYGWIN_ROOT_PATH$input_path"
36045    fi
36046  fi
36047
36048  # remove trailing .exe if any
36049  new_path="${new_path/%.exe/}"
36050
36051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36052
36053  # First separate the path from the arguments. This will split at the first
36054  # space.
36055  complete="$CXXCPP"
36056  path="${complete%% *}"
36057  tmp="$complete EOL"
36058  arguments="${tmp#* }"
36059
36060  # Input might be given as Windows format, start by converting to
36061  # unix format.
36062  new_path="$path"
36063
36064  windows_path="$new_path"
36065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36066    unix_path=`$CYGPATH -u "$windows_path"`
36067    new_path="$unix_path"
36068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36070    new_path="$unix_path"
36071  fi
36072
36073
36074  # Now try to locate executable using which
36075  new_path=`$WHICH "$new_path" 2> /dev/null`
36076
36077  if test "x$new_path" = x; then
36078    # Oops. Which didn't find the executable.
36079    # The splitting of arguments from the executable at a space might have been incorrect,
36080    # since paths with space are more likely in Windows. Give it another try with the whole
36081    # argument.
36082    path="$complete"
36083    arguments="EOL"
36084    new_path="$path"
36085
36086  windows_path="$new_path"
36087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36088    unix_path=`$CYGPATH -u "$windows_path"`
36089    new_path="$unix_path"
36090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36092    new_path="$unix_path"
36093  fi
36094
36095
36096    new_path=`$WHICH "$new_path" 2> /dev/null`
36097    # bat and cmd files are not always considered executable in MSYS causing which
36098    # to not find them
36099    if test "x$new_path" = x \
36100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36102      new_path="$path"
36103
36104  windows_path="$new_path"
36105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36106    unix_path=`$CYGPATH -u "$windows_path"`
36107    new_path="$unix_path"
36108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36110    new_path="$unix_path"
36111  fi
36112
36113    fi
36114
36115    if test "x$new_path" = x; then
36116      # It's still not found. Now this is an unrecoverable error.
36117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36118$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36119      has_space=`$ECHO "$complete" | $GREP " "`
36120      if test "x$has_space" != x; then
36121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36123      fi
36124      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36125    fi
36126  fi
36127
36128  # Now new_path has a complete unix path to the binary
36129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36130    # Keep paths in /bin as-is, but remove trailing .exe if any
36131    new_path="${new_path/%.exe/}"
36132    # Do not save /bin paths to all_fixpath_prefixes!
36133  else
36134    # Not in mixed or Windows style, start by that.
36135    new_path=`cmd //c echo $new_path`
36136
36137  input_path="$new_path"
36138  # Check if we need to convert this using DOS-style short mode. If the path
36139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36140  # take no chances and rewrite it.
36141  # Note: m4 eats our [], so we need to use [ and ] instead.
36142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36143  if test "x$has_forbidden_chars" != x; then
36144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36146  fi
36147
36148    # Output is in $new_path
36149
36150  windows_path="$new_path"
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152    unix_path=`$CYGPATH -u "$windows_path"`
36153    new_path="$unix_path"
36154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36156    new_path="$unix_path"
36157  fi
36158
36159    # remove trailing .exe if any
36160    new_path="${new_path/%.exe/}"
36161
36162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36164  fi
36165
36166    else
36167      # We're on a unix platform. Hooray! :)
36168      # First separate the path from the arguments. This will split at the first
36169      # space.
36170      complete="$CXXCPP"
36171      path="${complete%% *}"
36172      tmp="$complete EOL"
36173      arguments="${tmp#* }"
36174
36175      # Cannot rely on the command "which" here since it doesn't always work.
36176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36177      if test -z "$is_absolute_path"; then
36178        # Path to executable is not absolute. Find it.
36179        IFS_save="$IFS"
36180        IFS=:
36181        for p in $PATH; do
36182          if test -f "$p/$path" && test -x "$p/$path"; then
36183            new_path="$p/$path"
36184            break
36185          fi
36186        done
36187        IFS="$IFS_save"
36188      else
36189        # This is an absolute path, we can use it without further modifications.
36190        new_path="$path"
36191      fi
36192
36193      if test "x$new_path" = x; then
36194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36195$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36196        has_space=`$ECHO "$complete" | $GREP " "`
36197        if test "x$has_space" != x; then
36198          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36200        fi
36201        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36202      fi
36203    fi
36204
36205    # Now join together the path and the arguments once again
36206    if test "x$arguments" != xEOL; then
36207      new_complete="$new_path ${arguments% *}"
36208    else
36209      new_complete="$new_path"
36210    fi
36211
36212    if test "x$complete" != "x$new_complete"; then
36213      CXXCPP="$new_complete"
36214      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36215$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36216    fi
36217  fi
36218
36219
36220  #
36221  # Setup the linker (LD)
36222  #
36223  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36224    # In the Microsoft toolchain we have a separate LD command "link".
36225    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36226    # a cygwin program for something completely different.
36227    # Extract the first word of "link", so it can be a program name with args.
36228set dummy link; ac_word=$2
36229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36230$as_echo_n "checking for $ac_word... " >&6; }
36231if ${ac_cv_prog_LD+:} false; then :
36232  $as_echo_n "(cached) " >&6
36233else
36234  if test -n "$LD"; then
36235  ac_cv_prog_LD="$LD" # Let the user override the test.
36236else
36237  ac_prog_rejected=no
36238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36239for as_dir in $PATH
36240do
36241  IFS=$as_save_IFS
36242  test -z "$as_dir" && as_dir=.
36243    for ac_exec_ext in '' $ac_executable_extensions; do
36244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36245    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36246       ac_prog_rejected=yes
36247       continue
36248     fi
36249    ac_cv_prog_LD="link"
36250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36251    break 2
36252  fi
36253done
36254  done
36255IFS=$as_save_IFS
36256
36257if test $ac_prog_rejected = yes; then
36258  # We found a bogon in the path, so make sure we never use it.
36259  set dummy $ac_cv_prog_LD
36260  shift
36261  if test $# != 0; then
36262    # We chose a different compiler from the bogus one.
36263    # However, it has the same basename, so the bogon will be chosen
36264    # first if we set LD to just the basename; use the full file name.
36265    shift
36266    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36267  fi
36268fi
36269fi
36270fi
36271LD=$ac_cv_prog_LD
36272if test -n "$LD"; then
36273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36274$as_echo "$LD" >&6; }
36275else
36276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36277$as_echo "no" >&6; }
36278fi
36279
36280
36281
36282  # Only process if variable expands to non-empty
36283
36284  if test "x$LD" != x; then
36285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36286
36287  # First separate the path from the arguments. This will split at the first
36288  # space.
36289  complete="$LD"
36290  path="${complete%% *}"
36291  tmp="$complete EOL"
36292  arguments="${tmp#* }"
36293
36294  # Input might be given as Windows format, start by converting to
36295  # unix format.
36296  new_path=`$CYGPATH -u "$path"`
36297
36298  # Now try to locate executable using which
36299  new_path=`$WHICH "$new_path" 2> /dev/null`
36300  # bat and cmd files are not always considered executable in cygwin causing which
36301  # to not find them
36302  if test "x$new_path" = x \
36303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36305    new_path=`$CYGPATH -u "$path"`
36306  fi
36307  if test "x$new_path" = x; then
36308    # Oops. Which didn't find the executable.
36309    # The splitting of arguments from the executable at a space might have been incorrect,
36310    # since paths with space are more likely in Windows. Give it another try with the whole
36311    # argument.
36312    path="$complete"
36313    arguments="EOL"
36314    new_path=`$CYGPATH -u "$path"`
36315    new_path=`$WHICH "$new_path" 2> /dev/null`
36316    # bat and cmd files are not always considered executable in cygwin causing which
36317    # to not find them
36318    if test "x$new_path" = x \
36319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36321      new_path=`$CYGPATH -u "$path"`
36322    fi
36323    if test "x$new_path" = x; then
36324      # It's still not found. Now this is an unrecoverable error.
36325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36326$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36327      has_space=`$ECHO "$complete" | $GREP " "`
36328      if test "x$has_space" != x; then
36329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36331      fi
36332      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36333    fi
36334  fi
36335
36336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36339  # "foo.exe" is OK but "foo" is an error.
36340  #
36341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36342  # It is also a way to make sure we got the proper file name for the real test later on.
36343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36344  if test "x$test_shortpath" = x; then
36345    # Short path failed, file does not exist as specified.
36346    # Try adding .exe or .cmd
36347    if test -f "${new_path}.exe"; then
36348      input_to_shortpath="${new_path}.exe"
36349    elif test -f "${new_path}.cmd"; then
36350      input_to_shortpath="${new_path}.cmd"
36351    else
36352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36353$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36356      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36357    fi
36358  else
36359    input_to_shortpath="$new_path"
36360  fi
36361
36362  # Call helper function which possibly converts this using DOS-style short mode.
36363  # If so, the updated path is stored in $new_path.
36364  new_path="$input_to_shortpath"
36365
36366  input_path="$input_to_shortpath"
36367  # Check if we need to convert this using DOS-style short mode. If the path
36368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36369  # take no chances and rewrite it.
36370  # Note: m4 eats our [], so we need to use [ and ] instead.
36371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36372  if test "x$has_forbidden_chars" != x; then
36373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36377      # Going to short mode and back again did indeed matter. Since short mode is
36378      # case insensitive, let's make it lowercase to improve readability.
36379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36380      # Now convert it back to Unix-style (cygpath)
36381      input_path=`$CYGPATH -u "$shortmode_path"`
36382      new_path="$input_path"
36383    fi
36384  fi
36385
36386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36387  if test "x$test_cygdrive_prefix" = x; then
36388    # As a simple fix, exclude /usr/bin since it's not a real path.
36389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36391      # a path prefixed by /cygdrive for fixpath to work.
36392      new_path="$CYGWIN_ROOT_PATH$input_path"
36393    fi
36394  fi
36395
36396  # remove trailing .exe if any
36397  new_path="${new_path/%.exe/}"
36398
36399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36400
36401  # First separate the path from the arguments. This will split at the first
36402  # space.
36403  complete="$LD"
36404  path="${complete%% *}"
36405  tmp="$complete EOL"
36406  arguments="${tmp#* }"
36407
36408  # Input might be given as Windows format, start by converting to
36409  # unix format.
36410  new_path="$path"
36411
36412  windows_path="$new_path"
36413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36414    unix_path=`$CYGPATH -u "$windows_path"`
36415    new_path="$unix_path"
36416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36418    new_path="$unix_path"
36419  fi
36420
36421
36422  # Now try to locate executable using which
36423  new_path=`$WHICH "$new_path" 2> /dev/null`
36424
36425  if test "x$new_path" = x; then
36426    # Oops. Which didn't find the executable.
36427    # The splitting of arguments from the executable at a space might have been incorrect,
36428    # since paths with space are more likely in Windows. Give it another try with the whole
36429    # argument.
36430    path="$complete"
36431    arguments="EOL"
36432    new_path="$path"
36433
36434  windows_path="$new_path"
36435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36436    unix_path=`$CYGPATH -u "$windows_path"`
36437    new_path="$unix_path"
36438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36440    new_path="$unix_path"
36441  fi
36442
36443
36444    new_path=`$WHICH "$new_path" 2> /dev/null`
36445    # bat and cmd files are not always considered executable in MSYS causing which
36446    # to not find them
36447    if test "x$new_path" = x \
36448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36450      new_path="$path"
36451
36452  windows_path="$new_path"
36453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36454    unix_path=`$CYGPATH -u "$windows_path"`
36455    new_path="$unix_path"
36456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36458    new_path="$unix_path"
36459  fi
36460
36461    fi
36462
36463    if test "x$new_path" = x; then
36464      # It's still not found. Now this is an unrecoverable error.
36465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36466$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36467      has_space=`$ECHO "$complete" | $GREP " "`
36468      if test "x$has_space" != x; then
36469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36471      fi
36472      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36473    fi
36474  fi
36475
36476  # Now new_path has a complete unix path to the binary
36477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36478    # Keep paths in /bin as-is, but remove trailing .exe if any
36479    new_path="${new_path/%.exe/}"
36480    # Do not save /bin paths to all_fixpath_prefixes!
36481  else
36482    # Not in mixed or Windows style, start by that.
36483    new_path=`cmd //c echo $new_path`
36484
36485  input_path="$new_path"
36486  # Check if we need to convert this using DOS-style short mode. If the path
36487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36488  # take no chances and rewrite it.
36489  # Note: m4 eats our [], so we need to use [ and ] instead.
36490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36491  if test "x$has_forbidden_chars" != x; then
36492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36494  fi
36495
36496    # Output is in $new_path
36497
36498  windows_path="$new_path"
36499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500    unix_path=`$CYGPATH -u "$windows_path"`
36501    new_path="$unix_path"
36502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504    new_path="$unix_path"
36505  fi
36506
36507    # remove trailing .exe if any
36508    new_path="${new_path/%.exe/}"
36509
36510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36512  fi
36513
36514    else
36515      # We're on a unix platform. Hooray! :)
36516      # First separate the path from the arguments. This will split at the first
36517      # space.
36518      complete="$LD"
36519      path="${complete%% *}"
36520      tmp="$complete EOL"
36521      arguments="${tmp#* }"
36522
36523      # Cannot rely on the command "which" here since it doesn't always work.
36524      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36525      if test -z "$is_absolute_path"; then
36526        # Path to executable is not absolute. Find it.
36527        IFS_save="$IFS"
36528        IFS=:
36529        for p in $PATH; do
36530          if test -f "$p/$path" && test -x "$p/$path"; then
36531            new_path="$p/$path"
36532            break
36533          fi
36534        done
36535        IFS="$IFS_save"
36536      else
36537        # This is an absolute path, we can use it without further modifications.
36538        new_path="$path"
36539      fi
36540
36541      if test "x$new_path" = x; then
36542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36543$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36544        has_space=`$ECHO "$complete" | $GREP " "`
36545        if test "x$has_space" != x; then
36546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36548        fi
36549        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36550      fi
36551    fi
36552
36553    # Now join together the path and the arguments once again
36554    if test "x$arguments" != xEOL; then
36555      new_complete="$new_path ${arguments% *}"
36556    else
36557      new_complete="$new_path"
36558    fi
36559
36560    if test "x$complete" != "x$new_complete"; then
36561      LD="$new_complete"
36562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36563$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36564    fi
36565  fi
36566
36567    # Verify that we indeed succeeded with this trick.
36568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36569$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36570    "$LD" --version > /dev/null
36571    if test $? -eq 0 ; then
36572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36575    else
36576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36577$as_echo "yes" >&6; }
36578    fi
36579    LDCXX="$LD"
36580  else
36581    # All other toolchains use the compiler to link.
36582    LD="$CC"
36583    LDCXX="$CXX"
36584  fi
36585
36586  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36587
36588
36589  #
36590  # Setup the assembler (AS)
36591  #
36592  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36593
36594
36595  # Publish this variable in the help.
36596
36597
36598  if [ -z "${AS+x}" ]; then
36599    # The variable is not set by user, try to locate tool using the code snippet
36600    for ac_prog in as
36601do
36602  # Extract the first word of "$ac_prog", so it can be a program name with args.
36603set dummy $ac_prog; ac_word=$2
36604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36605$as_echo_n "checking for $ac_word... " >&6; }
36606if ${ac_cv_path_AS+:} false; then :
36607  $as_echo_n "(cached) " >&6
36608else
36609  case $AS in
36610  [\\/]* | ?:[\\/]*)
36611  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36612  ;;
36613  *)
36614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36615for as_dir in $PATH
36616do
36617  IFS=$as_save_IFS
36618  test -z "$as_dir" && as_dir=.
36619    for ac_exec_ext in '' $ac_executable_extensions; do
36620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36621    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36623    break 2
36624  fi
36625done
36626  done
36627IFS=$as_save_IFS
36628
36629  ;;
36630esac
36631fi
36632AS=$ac_cv_path_AS
36633if test -n "$AS"; then
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36635$as_echo "$AS" >&6; }
36636else
36637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36638$as_echo "no" >&6; }
36639fi
36640
36641
36642  test -n "$AS" && break
36643done
36644
36645  else
36646    # The variable is set, but is it from the command line or the environment?
36647
36648    # Try to remove the string !AS! from our list.
36649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36651      # If it failed, the variable was not from the command line. Ignore it,
36652      # but warn the user (except for BASH, which is always set by the calling BASH).
36653      if test "xAS" != xBASH; then
36654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36655$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36656      fi
36657      # Try to locate tool using the code snippet
36658      for ac_prog in as
36659do
36660  # Extract the first word of "$ac_prog", so it can be a program name with args.
36661set dummy $ac_prog; ac_word=$2
36662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36663$as_echo_n "checking for $ac_word... " >&6; }
36664if ${ac_cv_path_AS+:} false; then :
36665  $as_echo_n "(cached) " >&6
36666else
36667  case $AS in
36668  [\\/]* | ?:[\\/]*)
36669  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36670  ;;
36671  *)
36672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36673for as_dir in $PATH
36674do
36675  IFS=$as_save_IFS
36676  test -z "$as_dir" && as_dir=.
36677    for ac_exec_ext in '' $ac_executable_extensions; do
36678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36679    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36681    break 2
36682  fi
36683done
36684  done
36685IFS=$as_save_IFS
36686
36687  ;;
36688esac
36689fi
36690AS=$ac_cv_path_AS
36691if test -n "$AS"; then
36692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36693$as_echo "$AS" >&6; }
36694else
36695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36696$as_echo "no" >&6; }
36697fi
36698
36699
36700  test -n "$AS" && break
36701done
36702
36703    else
36704      # If it succeeded, then it was overridden by the user. We will use it
36705      # for the tool.
36706
36707      # First remove it from the list of overridden variables, so we can test
36708      # for unknown variables in the end.
36709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36710
36711      # Check if we try to supply an empty value
36712      if test "x$AS" = x; then
36713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36714$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36716$as_echo_n "checking for AS... " >&6; }
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36718$as_echo "disabled" >&6; }
36719      else
36720        # Check if the provided tool contains a complete path.
36721        tool_specified="$AS"
36722        tool_basename="${tool_specified##*/}"
36723        if test "x$tool_basename" = "x$tool_specified"; then
36724          # A command without a complete path is provided, search $PATH.
36725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36726$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36727          # Extract the first word of "$tool_basename", so it can be a program name with args.
36728set dummy $tool_basename; ac_word=$2
36729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36730$as_echo_n "checking for $ac_word... " >&6; }
36731if ${ac_cv_path_AS+:} false; then :
36732  $as_echo_n "(cached) " >&6
36733else
36734  case $AS in
36735  [\\/]* | ?:[\\/]*)
36736  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36737  ;;
36738  *)
36739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36740for as_dir in $PATH
36741do
36742  IFS=$as_save_IFS
36743  test -z "$as_dir" && as_dir=.
36744    for ac_exec_ext in '' $ac_executable_extensions; do
36745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36746    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36748    break 2
36749  fi
36750done
36751  done
36752IFS=$as_save_IFS
36753
36754  ;;
36755esac
36756fi
36757AS=$ac_cv_path_AS
36758if test -n "$AS"; then
36759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36760$as_echo "$AS" >&6; }
36761else
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36763$as_echo "no" >&6; }
36764fi
36765
36766
36767          if test "x$AS" = x; then
36768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36769          fi
36770        else
36771          # Otherwise we believe it is a complete path. Use it as it is.
36772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36773$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36775$as_echo_n "checking for AS... " >&6; }
36776          if test ! -x "$tool_specified"; then
36777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36778$as_echo "not found" >&6; }
36779            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36780          fi
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36782$as_echo "$tool_specified" >&6; }
36783        fi
36784      fi
36785    fi
36786
36787  fi
36788
36789
36790
36791  # Only process if variable expands to non-empty
36792
36793  if test "x$AS" != x; then
36794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36795
36796  # First separate the path from the arguments. This will split at the first
36797  # space.
36798  complete="$AS"
36799  path="${complete%% *}"
36800  tmp="$complete EOL"
36801  arguments="${tmp#* }"
36802
36803  # Input might be given as Windows format, start by converting to
36804  # unix format.
36805  new_path=`$CYGPATH -u "$path"`
36806
36807  # Now try to locate executable using which
36808  new_path=`$WHICH "$new_path" 2> /dev/null`
36809  # bat and cmd files are not always considered executable in cygwin causing which
36810  # to not find them
36811  if test "x$new_path" = x \
36812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36814    new_path=`$CYGPATH -u "$path"`
36815  fi
36816  if test "x$new_path" = x; then
36817    # Oops. Which didn't find the executable.
36818    # The splitting of arguments from the executable at a space might have been incorrect,
36819    # since paths with space are more likely in Windows. Give it another try with the whole
36820    # argument.
36821    path="$complete"
36822    arguments="EOL"
36823    new_path=`$CYGPATH -u "$path"`
36824    new_path=`$WHICH "$new_path" 2> /dev/null`
36825    # bat and cmd files are not always considered executable in cygwin causing which
36826    # to not find them
36827    if test "x$new_path" = x \
36828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36830      new_path=`$CYGPATH -u "$path"`
36831    fi
36832    if test "x$new_path" = x; then
36833      # It's still not found. Now this is an unrecoverable error.
36834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36835$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36836      has_space=`$ECHO "$complete" | $GREP " "`
36837      if test "x$has_space" != x; then
36838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36840      fi
36841      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36842    fi
36843  fi
36844
36845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36848  # "foo.exe" is OK but "foo" is an error.
36849  #
36850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36851  # It is also a way to make sure we got the proper file name for the real test later on.
36852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36853  if test "x$test_shortpath" = x; then
36854    # Short path failed, file does not exist as specified.
36855    # Try adding .exe or .cmd
36856    if test -f "${new_path}.exe"; then
36857      input_to_shortpath="${new_path}.exe"
36858    elif test -f "${new_path}.cmd"; then
36859      input_to_shortpath="${new_path}.cmd"
36860    else
36861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36862$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36865      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36866    fi
36867  else
36868    input_to_shortpath="$new_path"
36869  fi
36870
36871  # Call helper function which possibly converts this using DOS-style short mode.
36872  # If so, the updated path is stored in $new_path.
36873  new_path="$input_to_shortpath"
36874
36875  input_path="$input_to_shortpath"
36876  # Check if we need to convert this using DOS-style short mode. If the path
36877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36878  # take no chances and rewrite it.
36879  # Note: m4 eats our [], so we need to use [ and ] instead.
36880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36881  if test "x$has_forbidden_chars" != x; then
36882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36886      # Going to short mode and back again did indeed matter. Since short mode is
36887      # case insensitive, let's make it lowercase to improve readability.
36888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36889      # Now convert it back to Unix-style (cygpath)
36890      input_path=`$CYGPATH -u "$shortmode_path"`
36891      new_path="$input_path"
36892    fi
36893  fi
36894
36895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36896  if test "x$test_cygdrive_prefix" = x; then
36897    # As a simple fix, exclude /usr/bin since it's not a real path.
36898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36900      # a path prefixed by /cygdrive for fixpath to work.
36901      new_path="$CYGWIN_ROOT_PATH$input_path"
36902    fi
36903  fi
36904
36905  # remove trailing .exe if any
36906  new_path="${new_path/%.exe/}"
36907
36908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36909
36910  # First separate the path from the arguments. This will split at the first
36911  # space.
36912  complete="$AS"
36913  path="${complete%% *}"
36914  tmp="$complete EOL"
36915  arguments="${tmp#* }"
36916
36917  # Input might be given as Windows format, start by converting to
36918  # unix format.
36919  new_path="$path"
36920
36921  windows_path="$new_path"
36922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36923    unix_path=`$CYGPATH -u "$windows_path"`
36924    new_path="$unix_path"
36925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36927    new_path="$unix_path"
36928  fi
36929
36930
36931  # Now try to locate executable using which
36932  new_path=`$WHICH "$new_path" 2> /dev/null`
36933
36934  if test "x$new_path" = x; then
36935    # Oops. Which didn't find the executable.
36936    # The splitting of arguments from the executable at a space might have been incorrect,
36937    # since paths with space are more likely in Windows. Give it another try with the whole
36938    # argument.
36939    path="$complete"
36940    arguments="EOL"
36941    new_path="$path"
36942
36943  windows_path="$new_path"
36944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36945    unix_path=`$CYGPATH -u "$windows_path"`
36946    new_path="$unix_path"
36947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36949    new_path="$unix_path"
36950  fi
36951
36952
36953    new_path=`$WHICH "$new_path" 2> /dev/null`
36954    # bat and cmd files are not always considered executable in MSYS causing which
36955    # to not find them
36956    if test "x$new_path" = x \
36957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36959      new_path="$path"
36960
36961  windows_path="$new_path"
36962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36963    unix_path=`$CYGPATH -u "$windows_path"`
36964    new_path="$unix_path"
36965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36967    new_path="$unix_path"
36968  fi
36969
36970    fi
36971
36972    if test "x$new_path" = x; then
36973      # It's still not found. Now this is an unrecoverable error.
36974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36975$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36976      has_space=`$ECHO "$complete" | $GREP " "`
36977      if test "x$has_space" != x; then
36978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36980      fi
36981      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36982    fi
36983  fi
36984
36985  # Now new_path has a complete unix path to the binary
36986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36987    # Keep paths in /bin as-is, but remove trailing .exe if any
36988    new_path="${new_path/%.exe/}"
36989    # Do not save /bin paths to all_fixpath_prefixes!
36990  else
36991    # Not in mixed or Windows style, start by that.
36992    new_path=`cmd //c echo $new_path`
36993
36994  input_path="$new_path"
36995  # Check if we need to convert this using DOS-style short mode. If the path
36996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36997  # take no chances and rewrite it.
36998  # Note: m4 eats our [], so we need to use [ and ] instead.
36999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37000  if test "x$has_forbidden_chars" != x; then
37001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37003  fi
37004
37005    # Output is in $new_path
37006
37007  windows_path="$new_path"
37008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37009    unix_path=`$CYGPATH -u "$windows_path"`
37010    new_path="$unix_path"
37011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37013    new_path="$unix_path"
37014  fi
37015
37016    # remove trailing .exe if any
37017    new_path="${new_path/%.exe/}"
37018
37019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37021  fi
37022
37023    else
37024      # We're on a unix platform. Hooray! :)
37025      # First separate the path from the arguments. This will split at the first
37026      # space.
37027      complete="$AS"
37028      path="${complete%% *}"
37029      tmp="$complete EOL"
37030      arguments="${tmp#* }"
37031
37032      # Cannot rely on the command "which" here since it doesn't always work.
37033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37034      if test -z "$is_absolute_path"; then
37035        # Path to executable is not absolute. Find it.
37036        IFS_save="$IFS"
37037        IFS=:
37038        for p in $PATH; do
37039          if test -f "$p/$path" && test -x "$p/$path"; then
37040            new_path="$p/$path"
37041            break
37042          fi
37043        done
37044        IFS="$IFS_save"
37045      else
37046        # This is an absolute path, we can use it without further modifications.
37047        new_path="$path"
37048      fi
37049
37050      if test "x$new_path" = x; then
37051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37052$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37053        has_space=`$ECHO "$complete" | $GREP " "`
37054        if test "x$has_space" != x; then
37055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37057        fi
37058        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37059      fi
37060    fi
37061
37062    # Now join together the path and the arguments once again
37063    if test "x$arguments" != xEOL; then
37064      new_complete="$new_path ${arguments% *}"
37065    else
37066      new_complete="$new_path"
37067    fi
37068
37069    if test "x$complete" != "x$new_complete"; then
37070      AS="$new_complete"
37071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37072$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37073    fi
37074  fi
37075
37076    if test "x$AS" = x; then
37077      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37078    fi
37079  else
37080    # FIXME: is this correct for microsoft?
37081    AS="$CC -c"
37082  fi
37083
37084
37085  #
37086  # Setup the archiver (AR)
37087  #
37088  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37089    # The corresponding ar tool is lib.exe (used to create static libraries)
37090    # Extract the first word of "lib", so it can be a program name with args.
37091set dummy lib; ac_word=$2
37092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37093$as_echo_n "checking for $ac_word... " >&6; }
37094if ${ac_cv_prog_AR+:} false; then :
37095  $as_echo_n "(cached) " >&6
37096else
37097  if test -n "$AR"; then
37098  ac_cv_prog_AR="$AR" # Let the user override the test.
37099else
37100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37101for as_dir in $PATH
37102do
37103  IFS=$as_save_IFS
37104  test -z "$as_dir" && as_dir=.
37105    for ac_exec_ext in '' $ac_executable_extensions; do
37106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37107    ac_cv_prog_AR="lib"
37108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37109    break 2
37110  fi
37111done
37112  done
37113IFS=$as_save_IFS
37114
37115fi
37116fi
37117AR=$ac_cv_prog_AR
37118if test -n "$AR"; then
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37120$as_echo "$AR" >&6; }
37121else
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37123$as_echo "no" >&6; }
37124fi
37125
37126
37127  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37128
37129
37130  # Publish this variable in the help.
37131
37132
37133  if [ -z "${AR+x}" ]; then
37134    # The variable is not set by user, try to locate tool using the code snippet
37135    if test -n "$ac_tool_prefix"; then
37136  for ac_prog in ar gcc-ar
37137  do
37138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37141$as_echo_n "checking for $ac_word... " >&6; }
37142if ${ac_cv_prog_AR+:} false; then :
37143  $as_echo_n "(cached) " >&6
37144else
37145  if test -n "$AR"; then
37146  ac_cv_prog_AR="$AR" # Let the user override the test.
37147else
37148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37149for as_dir in $PATH
37150do
37151  IFS=$as_save_IFS
37152  test -z "$as_dir" && as_dir=.
37153    for ac_exec_ext in '' $ac_executable_extensions; do
37154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37155    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37157    break 2
37158  fi
37159done
37160  done
37161IFS=$as_save_IFS
37162
37163fi
37164fi
37165AR=$ac_cv_prog_AR
37166if test -n "$AR"; then
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37168$as_echo "$AR" >&6; }
37169else
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37171$as_echo "no" >&6; }
37172fi
37173
37174
37175    test -n "$AR" && break
37176  done
37177fi
37178if test -z "$AR"; then
37179  ac_ct_AR=$AR
37180  for ac_prog in ar gcc-ar
37181do
37182  # Extract the first word of "$ac_prog", so it can be a program name with args.
37183set dummy $ac_prog; ac_word=$2
37184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37185$as_echo_n "checking for $ac_word... " >&6; }
37186if ${ac_cv_prog_ac_ct_AR+:} false; then :
37187  $as_echo_n "(cached) " >&6
37188else
37189  if test -n "$ac_ct_AR"; then
37190  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37191else
37192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37193for as_dir in $PATH
37194do
37195  IFS=$as_save_IFS
37196  test -z "$as_dir" && as_dir=.
37197    for ac_exec_ext in '' $ac_executable_extensions; do
37198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37199    ac_cv_prog_ac_ct_AR="$ac_prog"
37200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201    break 2
37202  fi
37203done
37204  done
37205IFS=$as_save_IFS
37206
37207fi
37208fi
37209ac_ct_AR=$ac_cv_prog_ac_ct_AR
37210if test -n "$ac_ct_AR"; then
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37212$as_echo "$ac_ct_AR" >&6; }
37213else
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37215$as_echo "no" >&6; }
37216fi
37217
37218
37219  test -n "$ac_ct_AR" && break
37220done
37221
37222  if test "x$ac_ct_AR" = x; then
37223    AR=""
37224  else
37225    case $cross_compiling:$ac_tool_warned in
37226yes:)
37227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37229ac_tool_warned=yes ;;
37230esac
37231    AR=$ac_ct_AR
37232  fi
37233fi
37234
37235  else
37236    # The variable is set, but is it from the command line or the environment?
37237
37238    # Try to remove the string !AR! from our list.
37239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37241      # If it failed, the variable was not from the command line. Ignore it,
37242      # but warn the user (except for BASH, which is always set by the calling BASH).
37243      if test "xAR" != xBASH; then
37244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37245$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37246      fi
37247      # Try to locate tool using the code snippet
37248      if test -n "$ac_tool_prefix"; then
37249  for ac_prog in ar gcc-ar
37250  do
37251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37254$as_echo_n "checking for $ac_word... " >&6; }
37255if ${ac_cv_prog_AR+:} false; then :
37256  $as_echo_n "(cached) " >&6
37257else
37258  if test -n "$AR"; then
37259  ac_cv_prog_AR="$AR" # Let the user override the test.
37260else
37261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37262for as_dir in $PATH
37263do
37264  IFS=$as_save_IFS
37265  test -z "$as_dir" && as_dir=.
37266    for ac_exec_ext in '' $ac_executable_extensions; do
37267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37268    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37270    break 2
37271  fi
37272done
37273  done
37274IFS=$as_save_IFS
37275
37276fi
37277fi
37278AR=$ac_cv_prog_AR
37279if test -n "$AR"; then
37280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37281$as_echo "$AR" >&6; }
37282else
37283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37284$as_echo "no" >&6; }
37285fi
37286
37287
37288    test -n "$AR" && break
37289  done
37290fi
37291if test -z "$AR"; then
37292  ac_ct_AR=$AR
37293  for ac_prog in ar gcc-ar
37294do
37295  # Extract the first word of "$ac_prog", so it can be a program name with args.
37296set dummy $ac_prog; ac_word=$2
37297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298$as_echo_n "checking for $ac_word... " >&6; }
37299if ${ac_cv_prog_ac_ct_AR+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302  if test -n "$ac_ct_AR"; then
37303  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37304else
37305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37306for as_dir in $PATH
37307do
37308  IFS=$as_save_IFS
37309  test -z "$as_dir" && as_dir=.
37310    for ac_exec_ext in '' $ac_executable_extensions; do
37311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37312    ac_cv_prog_ac_ct_AR="$ac_prog"
37313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37314    break 2
37315  fi
37316done
37317  done
37318IFS=$as_save_IFS
37319
37320fi
37321fi
37322ac_ct_AR=$ac_cv_prog_ac_ct_AR
37323if test -n "$ac_ct_AR"; then
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37325$as_echo "$ac_ct_AR" >&6; }
37326else
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37328$as_echo "no" >&6; }
37329fi
37330
37331
37332  test -n "$ac_ct_AR" && break
37333done
37334
37335  if test "x$ac_ct_AR" = x; then
37336    AR=""
37337  else
37338    case $cross_compiling:$ac_tool_warned in
37339yes:)
37340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37342ac_tool_warned=yes ;;
37343esac
37344    AR=$ac_ct_AR
37345  fi
37346fi
37347
37348    else
37349      # If it succeeded, then it was overridden by the user. We will use it
37350      # for the tool.
37351
37352      # First remove it from the list of overridden variables, so we can test
37353      # for unknown variables in the end.
37354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37355
37356      # Check if we try to supply an empty value
37357      if test "x$AR" = x; then
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37359$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37361$as_echo_n "checking for AR... " >&6; }
37362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37363$as_echo "disabled" >&6; }
37364      else
37365        # Check if the provided tool contains a complete path.
37366        tool_specified="$AR"
37367        tool_basename="${tool_specified##*/}"
37368        if test "x$tool_basename" = "x$tool_specified"; then
37369          # A command without a complete path is provided, search $PATH.
37370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37371$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37372          # Extract the first word of "$tool_basename", so it can be a program name with args.
37373set dummy $tool_basename; ac_word=$2
37374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37375$as_echo_n "checking for $ac_word... " >&6; }
37376if ${ac_cv_path_AR+:} false; then :
37377  $as_echo_n "(cached) " >&6
37378else
37379  case $AR in
37380  [\\/]* | ?:[\\/]*)
37381  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37382  ;;
37383  *)
37384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37385for as_dir in $PATH
37386do
37387  IFS=$as_save_IFS
37388  test -z "$as_dir" && as_dir=.
37389    for ac_exec_ext in '' $ac_executable_extensions; do
37390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37391    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37393    break 2
37394  fi
37395done
37396  done
37397IFS=$as_save_IFS
37398
37399  ;;
37400esac
37401fi
37402AR=$ac_cv_path_AR
37403if test -n "$AR"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37405$as_echo "$AR" >&6; }
37406else
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37408$as_echo "no" >&6; }
37409fi
37410
37411
37412          if test "x$AR" = x; then
37413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37414          fi
37415        else
37416          # Otherwise we believe it is a complete path. Use it as it is.
37417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37418$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37420$as_echo_n "checking for AR... " >&6; }
37421          if test ! -x "$tool_specified"; then
37422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37423$as_echo "not found" >&6; }
37424            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37425          fi
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37427$as_echo "$tool_specified" >&6; }
37428        fi
37429      fi
37430    fi
37431
37432  fi
37433
37434
37435  else
37436
37437
37438  # Publish this variable in the help.
37439
37440
37441  if [ -z "${AR+x}" ]; then
37442    # The variable is not set by user, try to locate tool using the code snippet
37443    if test -n "$ac_tool_prefix"; then
37444  for ac_prog in ar
37445  do
37446    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37447set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37449$as_echo_n "checking for $ac_word... " >&6; }
37450if ${ac_cv_prog_AR+:} false; then :
37451  $as_echo_n "(cached) " >&6
37452else
37453  if test -n "$AR"; then
37454  ac_cv_prog_AR="$AR" # Let the user override the test.
37455else
37456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37457for as_dir in $PATH
37458do
37459  IFS=$as_save_IFS
37460  test -z "$as_dir" && as_dir=.
37461    for ac_exec_ext in '' $ac_executable_extensions; do
37462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37463    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37465    break 2
37466  fi
37467done
37468  done
37469IFS=$as_save_IFS
37470
37471fi
37472fi
37473AR=$ac_cv_prog_AR
37474if test -n "$AR"; then
37475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37476$as_echo "$AR" >&6; }
37477else
37478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37479$as_echo "no" >&6; }
37480fi
37481
37482
37483    test -n "$AR" && break
37484  done
37485fi
37486if test -z "$AR"; then
37487  ac_ct_AR=$AR
37488  for ac_prog in ar
37489do
37490  # Extract the first word of "$ac_prog", so it can be a program name with args.
37491set dummy $ac_prog; ac_word=$2
37492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37493$as_echo_n "checking for $ac_word... " >&6; }
37494if ${ac_cv_prog_ac_ct_AR+:} false; then :
37495  $as_echo_n "(cached) " >&6
37496else
37497  if test -n "$ac_ct_AR"; then
37498  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37499else
37500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37501for as_dir in $PATH
37502do
37503  IFS=$as_save_IFS
37504  test -z "$as_dir" && as_dir=.
37505    for ac_exec_ext in '' $ac_executable_extensions; do
37506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37507    ac_cv_prog_ac_ct_AR="$ac_prog"
37508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37509    break 2
37510  fi
37511done
37512  done
37513IFS=$as_save_IFS
37514
37515fi
37516fi
37517ac_ct_AR=$ac_cv_prog_ac_ct_AR
37518if test -n "$ac_ct_AR"; then
37519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37520$as_echo "$ac_ct_AR" >&6; }
37521else
37522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37523$as_echo "no" >&6; }
37524fi
37525
37526
37527  test -n "$ac_ct_AR" && break
37528done
37529
37530  if test "x$ac_ct_AR" = x; then
37531    AR=""
37532  else
37533    case $cross_compiling:$ac_tool_warned in
37534yes:)
37535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37537ac_tool_warned=yes ;;
37538esac
37539    AR=$ac_ct_AR
37540  fi
37541fi
37542
37543  else
37544    # The variable is set, but is it from the command line or the environment?
37545
37546    # Try to remove the string !AR! from our list.
37547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37549      # If it failed, the variable was not from the command line. Ignore it,
37550      # but warn the user (except for BASH, which is always set by the calling BASH).
37551      if test "xAR" != xBASH; then
37552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37553$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37554      fi
37555      # Try to locate tool using the code snippet
37556      if test -n "$ac_tool_prefix"; then
37557  for ac_prog in ar
37558  do
37559    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37560set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37562$as_echo_n "checking for $ac_word... " >&6; }
37563if ${ac_cv_prog_AR+:} false; then :
37564  $as_echo_n "(cached) " >&6
37565else
37566  if test -n "$AR"; then
37567  ac_cv_prog_AR="$AR" # Let the user override the test.
37568else
37569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37570for as_dir in $PATH
37571do
37572  IFS=$as_save_IFS
37573  test -z "$as_dir" && as_dir=.
37574    for ac_exec_ext in '' $ac_executable_extensions; do
37575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37576    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37578    break 2
37579  fi
37580done
37581  done
37582IFS=$as_save_IFS
37583
37584fi
37585fi
37586AR=$ac_cv_prog_AR
37587if test -n "$AR"; then
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37589$as_echo "$AR" >&6; }
37590else
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37592$as_echo "no" >&6; }
37593fi
37594
37595
37596    test -n "$AR" && break
37597  done
37598fi
37599if test -z "$AR"; then
37600  ac_ct_AR=$AR
37601  for ac_prog in ar
37602do
37603  # Extract the first word of "$ac_prog", so it can be a program name with args.
37604set dummy $ac_prog; ac_word=$2
37605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37606$as_echo_n "checking for $ac_word... " >&6; }
37607if ${ac_cv_prog_ac_ct_AR+:} false; then :
37608  $as_echo_n "(cached) " >&6
37609else
37610  if test -n "$ac_ct_AR"; then
37611  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37612else
37613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37614for as_dir in $PATH
37615do
37616  IFS=$as_save_IFS
37617  test -z "$as_dir" && as_dir=.
37618    for ac_exec_ext in '' $ac_executable_extensions; do
37619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37620    ac_cv_prog_ac_ct_AR="$ac_prog"
37621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37622    break 2
37623  fi
37624done
37625  done
37626IFS=$as_save_IFS
37627
37628fi
37629fi
37630ac_ct_AR=$ac_cv_prog_ac_ct_AR
37631if test -n "$ac_ct_AR"; then
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37633$as_echo "$ac_ct_AR" >&6; }
37634else
37635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37636$as_echo "no" >&6; }
37637fi
37638
37639
37640  test -n "$ac_ct_AR" && break
37641done
37642
37643  if test "x$ac_ct_AR" = x; then
37644    AR=""
37645  else
37646    case $cross_compiling:$ac_tool_warned in
37647yes:)
37648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37650ac_tool_warned=yes ;;
37651esac
37652    AR=$ac_ct_AR
37653  fi
37654fi
37655
37656    else
37657      # If it succeeded, then it was overridden by the user. We will use it
37658      # for the tool.
37659
37660      # First remove it from the list of overridden variables, so we can test
37661      # for unknown variables in the end.
37662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37663
37664      # Check if we try to supply an empty value
37665      if test "x$AR" = x; then
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37667$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37669$as_echo_n "checking for AR... " >&6; }
37670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37671$as_echo "disabled" >&6; }
37672      else
37673        # Check if the provided tool contains a complete path.
37674        tool_specified="$AR"
37675        tool_basename="${tool_specified##*/}"
37676        if test "x$tool_basename" = "x$tool_specified"; then
37677          # A command without a complete path is provided, search $PATH.
37678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37679$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37680          # Extract the first word of "$tool_basename", so it can be a program name with args.
37681set dummy $tool_basename; ac_word=$2
37682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37683$as_echo_n "checking for $ac_word... " >&6; }
37684if ${ac_cv_path_AR+:} false; then :
37685  $as_echo_n "(cached) " >&6
37686else
37687  case $AR in
37688  [\\/]* | ?:[\\/]*)
37689  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37690  ;;
37691  *)
37692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37693for as_dir in $PATH
37694do
37695  IFS=$as_save_IFS
37696  test -z "$as_dir" && as_dir=.
37697    for ac_exec_ext in '' $ac_executable_extensions; do
37698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37699    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37701    break 2
37702  fi
37703done
37704  done
37705IFS=$as_save_IFS
37706
37707  ;;
37708esac
37709fi
37710AR=$ac_cv_path_AR
37711if test -n "$AR"; then
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37713$as_echo "$AR" >&6; }
37714else
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37716$as_echo "no" >&6; }
37717fi
37718
37719
37720          if test "x$AR" = x; then
37721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37722          fi
37723        else
37724          # Otherwise we believe it is a complete path. Use it as it is.
37725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37726$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37728$as_echo_n "checking for AR... " >&6; }
37729          if test ! -x "$tool_specified"; then
37730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37731$as_echo "not found" >&6; }
37732            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37733          fi
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37735$as_echo "$tool_specified" >&6; }
37736        fi
37737      fi
37738    fi
37739
37740  fi
37741
37742
37743  fi
37744
37745  # Only process if variable expands to non-empty
37746
37747  if test "x$AR" != x; then
37748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37749
37750  # First separate the path from the arguments. This will split at the first
37751  # space.
37752  complete="$AR"
37753  path="${complete%% *}"
37754  tmp="$complete EOL"
37755  arguments="${tmp#* }"
37756
37757  # Input might be given as Windows format, start by converting to
37758  # unix format.
37759  new_path=`$CYGPATH -u "$path"`
37760
37761  # Now try to locate executable using which
37762  new_path=`$WHICH "$new_path" 2> /dev/null`
37763  # bat and cmd files are not always considered executable in cygwin causing which
37764  # to not find them
37765  if test "x$new_path" = x \
37766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37768    new_path=`$CYGPATH -u "$path"`
37769  fi
37770  if test "x$new_path" = x; then
37771    # Oops. Which didn't find the executable.
37772    # The splitting of arguments from the executable at a space might have been incorrect,
37773    # since paths with space are more likely in Windows. Give it another try with the whole
37774    # argument.
37775    path="$complete"
37776    arguments="EOL"
37777    new_path=`$CYGPATH -u "$path"`
37778    new_path=`$WHICH "$new_path" 2> /dev/null`
37779    # bat and cmd files are not always considered executable in cygwin causing which
37780    # to not find them
37781    if test "x$new_path" = x \
37782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37784      new_path=`$CYGPATH -u "$path"`
37785    fi
37786    if test "x$new_path" = x; then
37787      # It's still not found. Now this is an unrecoverable error.
37788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37789$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37790      has_space=`$ECHO "$complete" | $GREP " "`
37791      if test "x$has_space" != x; then
37792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37794      fi
37795      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37796    fi
37797  fi
37798
37799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37802  # "foo.exe" is OK but "foo" is an error.
37803  #
37804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37805  # It is also a way to make sure we got the proper file name for the real test later on.
37806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37807  if test "x$test_shortpath" = x; then
37808    # Short path failed, file does not exist as specified.
37809    # Try adding .exe or .cmd
37810    if test -f "${new_path}.exe"; then
37811      input_to_shortpath="${new_path}.exe"
37812    elif test -f "${new_path}.cmd"; then
37813      input_to_shortpath="${new_path}.cmd"
37814    else
37815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37816$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37819      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37820    fi
37821  else
37822    input_to_shortpath="$new_path"
37823  fi
37824
37825  # Call helper function which possibly converts this using DOS-style short mode.
37826  # If so, the updated path is stored in $new_path.
37827  new_path="$input_to_shortpath"
37828
37829  input_path="$input_to_shortpath"
37830  # Check if we need to convert this using DOS-style short mode. If the path
37831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37832  # take no chances and rewrite it.
37833  # Note: m4 eats our [], so we need to use [ and ] instead.
37834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37835  if test "x$has_forbidden_chars" != x; then
37836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37840      # Going to short mode and back again did indeed matter. Since short mode is
37841      # case insensitive, let's make it lowercase to improve readability.
37842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37843      # Now convert it back to Unix-style (cygpath)
37844      input_path=`$CYGPATH -u "$shortmode_path"`
37845      new_path="$input_path"
37846    fi
37847  fi
37848
37849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37850  if test "x$test_cygdrive_prefix" = x; then
37851    # As a simple fix, exclude /usr/bin since it's not a real path.
37852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37854      # a path prefixed by /cygdrive for fixpath to work.
37855      new_path="$CYGWIN_ROOT_PATH$input_path"
37856    fi
37857  fi
37858
37859  # remove trailing .exe if any
37860  new_path="${new_path/%.exe/}"
37861
37862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37863
37864  # First separate the path from the arguments. This will split at the first
37865  # space.
37866  complete="$AR"
37867  path="${complete%% *}"
37868  tmp="$complete EOL"
37869  arguments="${tmp#* }"
37870
37871  # Input might be given as Windows format, start by converting to
37872  # unix format.
37873  new_path="$path"
37874
37875  windows_path="$new_path"
37876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37877    unix_path=`$CYGPATH -u "$windows_path"`
37878    new_path="$unix_path"
37879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37881    new_path="$unix_path"
37882  fi
37883
37884
37885  # Now try to locate executable using which
37886  new_path=`$WHICH "$new_path" 2> /dev/null`
37887
37888  if test "x$new_path" = x; then
37889    # Oops. Which didn't find the executable.
37890    # The splitting of arguments from the executable at a space might have been incorrect,
37891    # since paths with space are more likely in Windows. Give it another try with the whole
37892    # argument.
37893    path="$complete"
37894    arguments="EOL"
37895    new_path="$path"
37896
37897  windows_path="$new_path"
37898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37899    unix_path=`$CYGPATH -u "$windows_path"`
37900    new_path="$unix_path"
37901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37903    new_path="$unix_path"
37904  fi
37905
37906
37907    new_path=`$WHICH "$new_path" 2> /dev/null`
37908    # bat and cmd files are not always considered executable in MSYS causing which
37909    # to not find them
37910    if test "x$new_path" = x \
37911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37913      new_path="$path"
37914
37915  windows_path="$new_path"
37916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37917    unix_path=`$CYGPATH -u "$windows_path"`
37918    new_path="$unix_path"
37919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37921    new_path="$unix_path"
37922  fi
37923
37924    fi
37925
37926    if test "x$new_path" = x; then
37927      # It's still not found. Now this is an unrecoverable error.
37928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37929$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37930      has_space=`$ECHO "$complete" | $GREP " "`
37931      if test "x$has_space" != x; then
37932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37934      fi
37935      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37936    fi
37937  fi
37938
37939  # Now new_path has a complete unix path to the binary
37940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37941    # Keep paths in /bin as-is, but remove trailing .exe if any
37942    new_path="${new_path/%.exe/}"
37943    # Do not save /bin paths to all_fixpath_prefixes!
37944  else
37945    # Not in mixed or Windows style, start by that.
37946    new_path=`cmd //c echo $new_path`
37947
37948  input_path="$new_path"
37949  # Check if we need to convert this using DOS-style short mode. If the path
37950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37951  # take no chances and rewrite it.
37952  # Note: m4 eats our [], so we need to use [ and ] instead.
37953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37954  if test "x$has_forbidden_chars" != x; then
37955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37957  fi
37958
37959    # Output is in $new_path
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970    # remove trailing .exe if any
37971    new_path="${new_path/%.exe/}"
37972
37973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37975  fi
37976
37977    else
37978      # We're on a unix platform. Hooray! :)
37979      # First separate the path from the arguments. This will split at the first
37980      # space.
37981      complete="$AR"
37982      path="${complete%% *}"
37983      tmp="$complete EOL"
37984      arguments="${tmp#* }"
37985
37986      # Cannot rely on the command "which" here since it doesn't always work.
37987      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37988      if test -z "$is_absolute_path"; then
37989        # Path to executable is not absolute. Find it.
37990        IFS_save="$IFS"
37991        IFS=:
37992        for p in $PATH; do
37993          if test -f "$p/$path" && test -x "$p/$path"; then
37994            new_path="$p/$path"
37995            break
37996          fi
37997        done
37998        IFS="$IFS_save"
37999      else
38000        # This is an absolute path, we can use it without further modifications.
38001        new_path="$path"
38002      fi
38003
38004      if test "x$new_path" = x; then
38005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38006$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38007        has_space=`$ECHO "$complete" | $GREP " "`
38008        if test "x$has_space" != x; then
38009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38011        fi
38012        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38013      fi
38014    fi
38015
38016    # Now join together the path and the arguments once again
38017    if test "x$arguments" != xEOL; then
38018      new_complete="$new_path ${arguments% *}"
38019    else
38020      new_complete="$new_path"
38021    fi
38022
38023    if test "x$complete" != "x$new_complete"; then
38024      AR="$new_complete"
38025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38026$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38027    fi
38028  fi
38029
38030
38031
38032  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38033
38034
38035  # Publish this variable in the help.
38036
38037
38038  if [ -z "${LIPO+x}" ]; then
38039    # The variable is not set by user, try to locate tool using the code snippet
38040    for ac_prog in lipo
38041do
38042  # Extract the first word of "$ac_prog", so it can be a program name with args.
38043set dummy $ac_prog; ac_word=$2
38044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38045$as_echo_n "checking for $ac_word... " >&6; }
38046if ${ac_cv_path_LIPO+:} false; then :
38047  $as_echo_n "(cached) " >&6
38048else
38049  case $LIPO in
38050  [\\/]* | ?:[\\/]*)
38051  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38052  ;;
38053  *)
38054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38055for as_dir in $PATH
38056do
38057  IFS=$as_save_IFS
38058  test -z "$as_dir" && as_dir=.
38059    for ac_exec_ext in '' $ac_executable_extensions; do
38060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38061    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38063    break 2
38064  fi
38065done
38066  done
38067IFS=$as_save_IFS
38068
38069  ;;
38070esac
38071fi
38072LIPO=$ac_cv_path_LIPO
38073if test -n "$LIPO"; then
38074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38075$as_echo "$LIPO" >&6; }
38076else
38077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38078$as_echo "no" >&6; }
38079fi
38080
38081
38082  test -n "$LIPO" && break
38083done
38084
38085  else
38086    # The variable is set, but is it from the command line or the environment?
38087
38088    # Try to remove the string !LIPO! from our list.
38089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38091      # If it failed, the variable was not from the command line. Ignore it,
38092      # but warn the user (except for BASH, which is always set by the calling BASH).
38093      if test "xLIPO" != xBASH; then
38094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38095$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38096      fi
38097      # Try to locate tool using the code snippet
38098      for ac_prog in lipo
38099do
38100  # Extract the first word of "$ac_prog", so it can be a program name with args.
38101set dummy $ac_prog; ac_word=$2
38102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38103$as_echo_n "checking for $ac_word... " >&6; }
38104if ${ac_cv_path_LIPO+:} false; then :
38105  $as_echo_n "(cached) " >&6
38106else
38107  case $LIPO in
38108  [\\/]* | ?:[\\/]*)
38109  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38110  ;;
38111  *)
38112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38113for as_dir in $PATH
38114do
38115  IFS=$as_save_IFS
38116  test -z "$as_dir" && as_dir=.
38117    for ac_exec_ext in '' $ac_executable_extensions; do
38118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38119    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38121    break 2
38122  fi
38123done
38124  done
38125IFS=$as_save_IFS
38126
38127  ;;
38128esac
38129fi
38130LIPO=$ac_cv_path_LIPO
38131if test -n "$LIPO"; then
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38133$as_echo "$LIPO" >&6; }
38134else
38135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38136$as_echo "no" >&6; }
38137fi
38138
38139
38140  test -n "$LIPO" && break
38141done
38142
38143    else
38144      # If it succeeded, then it was overridden by the user. We will use it
38145      # for the tool.
38146
38147      # First remove it from the list of overridden variables, so we can test
38148      # for unknown variables in the end.
38149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38150
38151      # Check if we try to supply an empty value
38152      if test "x$LIPO" = x; then
38153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38154$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38156$as_echo_n "checking for LIPO... " >&6; }
38157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38158$as_echo "disabled" >&6; }
38159      else
38160        # Check if the provided tool contains a complete path.
38161        tool_specified="$LIPO"
38162        tool_basename="${tool_specified##*/}"
38163        if test "x$tool_basename" = "x$tool_specified"; then
38164          # A command without a complete path is provided, search $PATH.
38165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38166$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38167          # Extract the first word of "$tool_basename", so it can be a program name with args.
38168set dummy $tool_basename; ac_word=$2
38169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38170$as_echo_n "checking for $ac_word... " >&6; }
38171if ${ac_cv_path_LIPO+:} false; then :
38172  $as_echo_n "(cached) " >&6
38173else
38174  case $LIPO in
38175  [\\/]* | ?:[\\/]*)
38176  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38177  ;;
38178  *)
38179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38180for as_dir in $PATH
38181do
38182  IFS=$as_save_IFS
38183  test -z "$as_dir" && as_dir=.
38184    for ac_exec_ext in '' $ac_executable_extensions; do
38185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38186    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38188    break 2
38189  fi
38190done
38191  done
38192IFS=$as_save_IFS
38193
38194  ;;
38195esac
38196fi
38197LIPO=$ac_cv_path_LIPO
38198if test -n "$LIPO"; then
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38200$as_echo "$LIPO" >&6; }
38201else
38202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38203$as_echo "no" >&6; }
38204fi
38205
38206
38207          if test "x$LIPO" = x; then
38208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38209          fi
38210        else
38211          # Otherwise we believe it is a complete path. Use it as it is.
38212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38213$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38215$as_echo_n "checking for LIPO... " >&6; }
38216          if test ! -x "$tool_specified"; then
38217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38218$as_echo "not found" >&6; }
38219            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38220          fi
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38222$as_echo "$tool_specified" >&6; }
38223        fi
38224      fi
38225    fi
38226
38227  fi
38228
38229
38230
38231  # Only process if variable expands to non-empty
38232
38233  if test "x$LIPO" != x; then
38234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38235
38236  # First separate the path from the arguments. This will split at the first
38237  # space.
38238  complete="$LIPO"
38239  path="${complete%% *}"
38240  tmp="$complete EOL"
38241  arguments="${tmp#* }"
38242
38243  # Input might be given as Windows format, start by converting to
38244  # unix format.
38245  new_path=`$CYGPATH -u "$path"`
38246
38247  # Now try to locate executable using which
38248  new_path=`$WHICH "$new_path" 2> /dev/null`
38249  # bat and cmd files are not always considered executable in cygwin causing which
38250  # to not find them
38251  if test "x$new_path" = x \
38252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38254    new_path=`$CYGPATH -u "$path"`
38255  fi
38256  if test "x$new_path" = x; then
38257    # Oops. Which didn't find the executable.
38258    # The splitting of arguments from the executable at a space might have been incorrect,
38259    # since paths with space are more likely in Windows. Give it another try with the whole
38260    # argument.
38261    path="$complete"
38262    arguments="EOL"
38263    new_path=`$CYGPATH -u "$path"`
38264    new_path=`$WHICH "$new_path" 2> /dev/null`
38265    # bat and cmd files are not always considered executable in cygwin causing which
38266    # to not find them
38267    if test "x$new_path" = x \
38268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38270      new_path=`$CYGPATH -u "$path"`
38271    fi
38272    if test "x$new_path" = x; then
38273      # It's still not found. Now this is an unrecoverable error.
38274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38275$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38276      has_space=`$ECHO "$complete" | $GREP " "`
38277      if test "x$has_space" != x; then
38278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38280      fi
38281      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38282    fi
38283  fi
38284
38285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38288  # "foo.exe" is OK but "foo" is an error.
38289  #
38290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38291  # It is also a way to make sure we got the proper file name for the real test later on.
38292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38293  if test "x$test_shortpath" = x; then
38294    # Short path failed, file does not exist as specified.
38295    # Try adding .exe or .cmd
38296    if test -f "${new_path}.exe"; then
38297      input_to_shortpath="${new_path}.exe"
38298    elif test -f "${new_path}.cmd"; then
38299      input_to_shortpath="${new_path}.cmd"
38300    else
38301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38302$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38305      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38306    fi
38307  else
38308    input_to_shortpath="$new_path"
38309  fi
38310
38311  # Call helper function which possibly converts this using DOS-style short mode.
38312  # If so, the updated path is stored in $new_path.
38313  new_path="$input_to_shortpath"
38314
38315  input_path="$input_to_shortpath"
38316  # Check if we need to convert this using DOS-style short mode. If the path
38317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38318  # take no chances and rewrite it.
38319  # Note: m4 eats our [], so we need to use [ and ] instead.
38320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38321  if test "x$has_forbidden_chars" != x; then
38322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38326      # Going to short mode and back again did indeed matter. Since short mode is
38327      # case insensitive, let's make it lowercase to improve readability.
38328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38329      # Now convert it back to Unix-style (cygpath)
38330      input_path=`$CYGPATH -u "$shortmode_path"`
38331      new_path="$input_path"
38332    fi
38333  fi
38334
38335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38336  if test "x$test_cygdrive_prefix" = x; then
38337    # As a simple fix, exclude /usr/bin since it's not a real path.
38338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38340      # a path prefixed by /cygdrive for fixpath to work.
38341      new_path="$CYGWIN_ROOT_PATH$input_path"
38342    fi
38343  fi
38344
38345  # remove trailing .exe if any
38346  new_path="${new_path/%.exe/}"
38347
38348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38349
38350  # First separate the path from the arguments. This will split at the first
38351  # space.
38352  complete="$LIPO"
38353  path="${complete%% *}"
38354  tmp="$complete EOL"
38355  arguments="${tmp#* }"
38356
38357  # Input might be given as Windows format, start by converting to
38358  # unix format.
38359  new_path="$path"
38360
38361  windows_path="$new_path"
38362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38363    unix_path=`$CYGPATH -u "$windows_path"`
38364    new_path="$unix_path"
38365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38367    new_path="$unix_path"
38368  fi
38369
38370
38371  # Now try to locate executable using which
38372  new_path=`$WHICH "$new_path" 2> /dev/null`
38373
38374  if test "x$new_path" = x; then
38375    # Oops. Which didn't find the executable.
38376    # The splitting of arguments from the executable at a space might have been incorrect,
38377    # since paths with space are more likely in Windows. Give it another try with the whole
38378    # argument.
38379    path="$complete"
38380    arguments="EOL"
38381    new_path="$path"
38382
38383  windows_path="$new_path"
38384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38385    unix_path=`$CYGPATH -u "$windows_path"`
38386    new_path="$unix_path"
38387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38389    new_path="$unix_path"
38390  fi
38391
38392
38393    new_path=`$WHICH "$new_path" 2> /dev/null`
38394    # bat and cmd files are not always considered executable in MSYS causing which
38395    # to not find them
38396    if test "x$new_path" = x \
38397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38399      new_path="$path"
38400
38401  windows_path="$new_path"
38402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38403    unix_path=`$CYGPATH -u "$windows_path"`
38404    new_path="$unix_path"
38405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38407    new_path="$unix_path"
38408  fi
38409
38410    fi
38411
38412    if test "x$new_path" = x; then
38413      # It's still not found. Now this is an unrecoverable error.
38414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38415$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38416      has_space=`$ECHO "$complete" | $GREP " "`
38417      if test "x$has_space" != x; then
38418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38420      fi
38421      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38422    fi
38423  fi
38424
38425  # Now new_path has a complete unix path to the binary
38426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38427    # Keep paths in /bin as-is, but remove trailing .exe if any
38428    new_path="${new_path/%.exe/}"
38429    # Do not save /bin paths to all_fixpath_prefixes!
38430  else
38431    # Not in mixed or Windows style, start by that.
38432    new_path=`cmd //c echo $new_path`
38433
38434  input_path="$new_path"
38435  # Check if we need to convert this using DOS-style short mode. If the path
38436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38437  # take no chances and rewrite it.
38438  # Note: m4 eats our [], so we need to use [ and ] instead.
38439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38440  if test "x$has_forbidden_chars" != x; then
38441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38443  fi
38444
38445    # Output is in $new_path
38446
38447  windows_path="$new_path"
38448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38449    unix_path=`$CYGPATH -u "$windows_path"`
38450    new_path="$unix_path"
38451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38453    new_path="$unix_path"
38454  fi
38455
38456    # remove trailing .exe if any
38457    new_path="${new_path/%.exe/}"
38458
38459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38461  fi
38462
38463    else
38464      # We're on a unix platform. Hooray! :)
38465      # First separate the path from the arguments. This will split at the first
38466      # space.
38467      complete="$LIPO"
38468      path="${complete%% *}"
38469      tmp="$complete EOL"
38470      arguments="${tmp#* }"
38471
38472      # Cannot rely on the command "which" here since it doesn't always work.
38473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38474      if test -z "$is_absolute_path"; then
38475        # Path to executable is not absolute. Find it.
38476        IFS_save="$IFS"
38477        IFS=:
38478        for p in $PATH; do
38479          if test -f "$p/$path" && test -x "$p/$path"; then
38480            new_path="$p/$path"
38481            break
38482          fi
38483        done
38484        IFS="$IFS_save"
38485      else
38486        # This is an absolute path, we can use it without further modifications.
38487        new_path="$path"
38488      fi
38489
38490      if test "x$new_path" = x; then
38491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38492$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38493        has_space=`$ECHO "$complete" | $GREP " "`
38494        if test "x$has_space" != x; then
38495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38497        fi
38498        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38499      fi
38500    fi
38501
38502    # Now join together the path and the arguments once again
38503    if test "x$arguments" != xEOL; then
38504      new_complete="$new_path ${arguments% *}"
38505    else
38506      new_complete="$new_path"
38507    fi
38508
38509    if test "x$complete" != "x$new_complete"; then
38510      LIPO="$new_complete"
38511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38512$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38513    fi
38514  fi
38515
38516  fi
38517
38518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38519    # Extract the first word of "mt", so it can be a program name with args.
38520set dummy mt; ac_word=$2
38521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38522$as_echo_n "checking for $ac_word... " >&6; }
38523if ${ac_cv_prog_MT+:} false; then :
38524  $as_echo_n "(cached) " >&6
38525else
38526  if test -n "$MT"; then
38527  ac_cv_prog_MT="$MT" # Let the user override the test.
38528else
38529  ac_prog_rejected=no
38530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38531for as_dir in $PATH
38532do
38533  IFS=$as_save_IFS
38534  test -z "$as_dir" && as_dir=.
38535    for ac_exec_ext in '' $ac_executable_extensions; do
38536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38537    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38538       ac_prog_rejected=yes
38539       continue
38540     fi
38541    ac_cv_prog_MT="mt"
38542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38543    break 2
38544  fi
38545done
38546  done
38547IFS=$as_save_IFS
38548
38549if test $ac_prog_rejected = yes; then
38550  # We found a bogon in the path, so make sure we never use it.
38551  set dummy $ac_cv_prog_MT
38552  shift
38553  if test $# != 0; then
38554    # We chose a different compiler from the bogus one.
38555    # However, it has the same basename, so the bogon will be chosen
38556    # first if we set MT to just the basename; use the full file name.
38557    shift
38558    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38559  fi
38560fi
38561fi
38562fi
38563MT=$ac_cv_prog_MT
38564if test -n "$MT"; then
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38566$as_echo "$MT" >&6; }
38567else
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38569$as_echo "no" >&6; }
38570fi
38571
38572
38573
38574  # Only process if variable expands to non-empty
38575
38576  if test "x$MT" != x; then
38577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38578
38579  # First separate the path from the arguments. This will split at the first
38580  # space.
38581  complete="$MT"
38582  path="${complete%% *}"
38583  tmp="$complete EOL"
38584  arguments="${tmp#* }"
38585
38586  # Input might be given as Windows format, start by converting to
38587  # unix format.
38588  new_path=`$CYGPATH -u "$path"`
38589
38590  # Now try to locate executable using which
38591  new_path=`$WHICH "$new_path" 2> /dev/null`
38592  # bat and cmd files are not always considered executable in cygwin causing which
38593  # to not find them
38594  if test "x$new_path" = x \
38595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38597    new_path=`$CYGPATH -u "$path"`
38598  fi
38599  if test "x$new_path" = x; then
38600    # Oops. Which didn't find the executable.
38601    # The splitting of arguments from the executable at a space might have been incorrect,
38602    # since paths with space are more likely in Windows. Give it another try with the whole
38603    # argument.
38604    path="$complete"
38605    arguments="EOL"
38606    new_path=`$CYGPATH -u "$path"`
38607    new_path=`$WHICH "$new_path" 2> /dev/null`
38608    # bat and cmd files are not always considered executable in cygwin causing which
38609    # to not find them
38610    if test "x$new_path" = x \
38611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38613      new_path=`$CYGPATH -u "$path"`
38614    fi
38615    if test "x$new_path" = x; then
38616      # It's still not found. Now this is an unrecoverable error.
38617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38618$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38619      has_space=`$ECHO "$complete" | $GREP " "`
38620      if test "x$has_space" != x; then
38621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38623      fi
38624      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38625    fi
38626  fi
38627
38628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38631  # "foo.exe" is OK but "foo" is an error.
38632  #
38633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38634  # It is also a way to make sure we got the proper file name for the real test later on.
38635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38636  if test "x$test_shortpath" = x; then
38637    # Short path failed, file does not exist as specified.
38638    # Try adding .exe or .cmd
38639    if test -f "${new_path}.exe"; then
38640      input_to_shortpath="${new_path}.exe"
38641    elif test -f "${new_path}.cmd"; then
38642      input_to_shortpath="${new_path}.cmd"
38643    else
38644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38645$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38648      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38649    fi
38650  else
38651    input_to_shortpath="$new_path"
38652  fi
38653
38654  # Call helper function which possibly converts this using DOS-style short mode.
38655  # If so, the updated path is stored in $new_path.
38656  new_path="$input_to_shortpath"
38657
38658  input_path="$input_to_shortpath"
38659  # Check if we need to convert this using DOS-style short mode. If the path
38660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38661  # take no chances and rewrite it.
38662  # Note: m4 eats our [], so we need to use [ and ] instead.
38663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38664  if test "x$has_forbidden_chars" != x; then
38665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38669      # Going to short mode and back again did indeed matter. Since short mode is
38670      # case insensitive, let's make it lowercase to improve readability.
38671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38672      # Now convert it back to Unix-style (cygpath)
38673      input_path=`$CYGPATH -u "$shortmode_path"`
38674      new_path="$input_path"
38675    fi
38676  fi
38677
38678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38679  if test "x$test_cygdrive_prefix" = x; then
38680    # As a simple fix, exclude /usr/bin since it's not a real path.
38681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38683      # a path prefixed by /cygdrive for fixpath to work.
38684      new_path="$CYGWIN_ROOT_PATH$input_path"
38685    fi
38686  fi
38687
38688  # remove trailing .exe if any
38689  new_path="${new_path/%.exe/}"
38690
38691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38692
38693  # First separate the path from the arguments. This will split at the first
38694  # space.
38695  complete="$MT"
38696  path="${complete%% *}"
38697  tmp="$complete EOL"
38698  arguments="${tmp#* }"
38699
38700  # Input might be given as Windows format, start by converting to
38701  # unix format.
38702  new_path="$path"
38703
38704  windows_path="$new_path"
38705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38706    unix_path=`$CYGPATH -u "$windows_path"`
38707    new_path="$unix_path"
38708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38710    new_path="$unix_path"
38711  fi
38712
38713
38714  # Now try to locate executable using which
38715  new_path=`$WHICH "$new_path" 2> /dev/null`
38716
38717  if test "x$new_path" = x; then
38718    # Oops. Which didn't find the executable.
38719    # The splitting of arguments from the executable at a space might have been incorrect,
38720    # since paths with space are more likely in Windows. Give it another try with the whole
38721    # argument.
38722    path="$complete"
38723    arguments="EOL"
38724    new_path="$path"
38725
38726  windows_path="$new_path"
38727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38728    unix_path=`$CYGPATH -u "$windows_path"`
38729    new_path="$unix_path"
38730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38732    new_path="$unix_path"
38733  fi
38734
38735
38736    new_path=`$WHICH "$new_path" 2> /dev/null`
38737    # bat and cmd files are not always considered executable in MSYS causing which
38738    # to not find them
38739    if test "x$new_path" = x \
38740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38742      new_path="$path"
38743
38744  windows_path="$new_path"
38745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38746    unix_path=`$CYGPATH -u "$windows_path"`
38747    new_path="$unix_path"
38748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38750    new_path="$unix_path"
38751  fi
38752
38753    fi
38754
38755    if test "x$new_path" = x; then
38756      # It's still not found. Now this is an unrecoverable error.
38757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38758$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38759      has_space=`$ECHO "$complete" | $GREP " "`
38760      if test "x$has_space" != x; then
38761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38763      fi
38764      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38765    fi
38766  fi
38767
38768  # Now new_path has a complete unix path to the binary
38769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38770    # Keep paths in /bin as-is, but remove trailing .exe if any
38771    new_path="${new_path/%.exe/}"
38772    # Do not save /bin paths to all_fixpath_prefixes!
38773  else
38774    # Not in mixed or Windows style, start by that.
38775    new_path=`cmd //c echo $new_path`
38776
38777  input_path="$new_path"
38778  # Check if we need to convert this using DOS-style short mode. If the path
38779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38780  # take no chances and rewrite it.
38781  # Note: m4 eats our [], so we need to use [ and ] instead.
38782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38783  if test "x$has_forbidden_chars" != x; then
38784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38786  fi
38787
38788    # Output is in $new_path
38789
38790  windows_path="$new_path"
38791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38792    unix_path=`$CYGPATH -u "$windows_path"`
38793    new_path="$unix_path"
38794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38796    new_path="$unix_path"
38797  fi
38798
38799    # remove trailing .exe if any
38800    new_path="${new_path/%.exe/}"
38801
38802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38804  fi
38805
38806    else
38807      # We're on a unix platform. Hooray! :)
38808      # First separate the path from the arguments. This will split at the first
38809      # space.
38810      complete="$MT"
38811      path="${complete%% *}"
38812      tmp="$complete EOL"
38813      arguments="${tmp#* }"
38814
38815      # Cannot rely on the command "which" here since it doesn't always work.
38816      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38817      if test -z "$is_absolute_path"; then
38818        # Path to executable is not absolute. Find it.
38819        IFS_save="$IFS"
38820        IFS=:
38821        for p in $PATH; do
38822          if test -f "$p/$path" && test -x "$p/$path"; then
38823            new_path="$p/$path"
38824            break
38825          fi
38826        done
38827        IFS="$IFS_save"
38828      else
38829        # This is an absolute path, we can use it without further modifications.
38830        new_path="$path"
38831      fi
38832
38833      if test "x$new_path" = x; then
38834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38835$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38836        has_space=`$ECHO "$complete" | $GREP " "`
38837        if test "x$has_space" != x; then
38838          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38840        fi
38841        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38842      fi
38843    fi
38844
38845    # Now join together the path and the arguments once again
38846    if test "x$arguments" != xEOL; then
38847      new_complete="$new_path ${arguments% *}"
38848    else
38849      new_complete="$new_path"
38850    fi
38851
38852    if test "x$complete" != "x$new_complete"; then
38853      MT="$new_complete"
38854      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38855$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38856    fi
38857  fi
38858
38859    # Setup the resource compiler (RC)
38860    # Extract the first word of "rc", so it can be a program name with args.
38861set dummy rc; ac_word=$2
38862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38863$as_echo_n "checking for $ac_word... " >&6; }
38864if ${ac_cv_prog_RC+:} false; then :
38865  $as_echo_n "(cached) " >&6
38866else
38867  if test -n "$RC"; then
38868  ac_cv_prog_RC="$RC" # Let the user override the test.
38869else
38870  ac_prog_rejected=no
38871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38872for as_dir in $PATH
38873do
38874  IFS=$as_save_IFS
38875  test -z "$as_dir" && as_dir=.
38876    for ac_exec_ext in '' $ac_executable_extensions; do
38877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38878    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38879       ac_prog_rejected=yes
38880       continue
38881     fi
38882    ac_cv_prog_RC="rc"
38883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38884    break 2
38885  fi
38886done
38887  done
38888IFS=$as_save_IFS
38889
38890if test $ac_prog_rejected = yes; then
38891  # We found a bogon in the path, so make sure we never use it.
38892  set dummy $ac_cv_prog_RC
38893  shift
38894  if test $# != 0; then
38895    # We chose a different compiler from the bogus one.
38896    # However, it has the same basename, so the bogon will be chosen
38897    # first if we set RC to just the basename; use the full file name.
38898    shift
38899    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38900  fi
38901fi
38902fi
38903fi
38904RC=$ac_cv_prog_RC
38905if test -n "$RC"; then
38906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38907$as_echo "$RC" >&6; }
38908else
38909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38910$as_echo "no" >&6; }
38911fi
38912
38913
38914
38915  # Only process if variable expands to non-empty
38916
38917  if test "x$RC" != x; then
38918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38919
38920  # First separate the path from the arguments. This will split at the first
38921  # space.
38922  complete="$RC"
38923  path="${complete%% *}"
38924  tmp="$complete EOL"
38925  arguments="${tmp#* }"
38926
38927  # Input might be given as Windows format, start by converting to
38928  # unix format.
38929  new_path=`$CYGPATH -u "$path"`
38930
38931  # Now try to locate executable using which
38932  new_path=`$WHICH "$new_path" 2> /dev/null`
38933  # bat and cmd files are not always considered executable in cygwin causing which
38934  # to not find them
38935  if test "x$new_path" = x \
38936      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38937      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38938    new_path=`$CYGPATH -u "$path"`
38939  fi
38940  if test "x$new_path" = x; then
38941    # Oops. Which didn't find the executable.
38942    # The splitting of arguments from the executable at a space might have been incorrect,
38943    # since paths with space are more likely in Windows. Give it another try with the whole
38944    # argument.
38945    path="$complete"
38946    arguments="EOL"
38947    new_path=`$CYGPATH -u "$path"`
38948    new_path=`$WHICH "$new_path" 2> /dev/null`
38949    # bat and cmd files are not always considered executable in cygwin causing which
38950    # to not find them
38951    if test "x$new_path" = x \
38952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38954      new_path=`$CYGPATH -u "$path"`
38955    fi
38956    if test "x$new_path" = x; then
38957      # It's still not found. Now this is an unrecoverable error.
38958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38959$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38960      has_space=`$ECHO "$complete" | $GREP " "`
38961      if test "x$has_space" != x; then
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38964      fi
38965      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38966    fi
38967  fi
38968
38969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38972  # "foo.exe" is OK but "foo" is an error.
38973  #
38974  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38975  # It is also a way to make sure we got the proper file name for the real test later on.
38976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38977  if test "x$test_shortpath" = x; then
38978    # Short path failed, file does not exist as specified.
38979    # Try adding .exe or .cmd
38980    if test -f "${new_path}.exe"; then
38981      input_to_shortpath="${new_path}.exe"
38982    elif test -f "${new_path}.cmd"; then
38983      input_to_shortpath="${new_path}.cmd"
38984    else
38985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38986$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38989      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38990    fi
38991  else
38992    input_to_shortpath="$new_path"
38993  fi
38994
38995  # Call helper function which possibly converts this using DOS-style short mode.
38996  # If so, the updated path is stored in $new_path.
38997  new_path="$input_to_shortpath"
38998
38999  input_path="$input_to_shortpath"
39000  # Check if we need to convert this using DOS-style short mode. If the path
39001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39002  # take no chances and rewrite it.
39003  # Note: m4 eats our [], so we need to use [ and ] instead.
39004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39005  if test "x$has_forbidden_chars" != x; then
39006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39010      # Going to short mode and back again did indeed matter. Since short mode is
39011      # case insensitive, let's make it lowercase to improve readability.
39012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39013      # Now convert it back to Unix-style (cygpath)
39014      input_path=`$CYGPATH -u "$shortmode_path"`
39015      new_path="$input_path"
39016    fi
39017  fi
39018
39019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39020  if test "x$test_cygdrive_prefix" = x; then
39021    # As a simple fix, exclude /usr/bin since it's not a real path.
39022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39024      # a path prefixed by /cygdrive for fixpath to work.
39025      new_path="$CYGWIN_ROOT_PATH$input_path"
39026    fi
39027  fi
39028
39029  # remove trailing .exe if any
39030  new_path="${new_path/%.exe/}"
39031
39032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39033
39034  # First separate the path from the arguments. This will split at the first
39035  # space.
39036  complete="$RC"
39037  path="${complete%% *}"
39038  tmp="$complete EOL"
39039  arguments="${tmp#* }"
39040
39041  # Input might be given as Windows format, start by converting to
39042  # unix format.
39043  new_path="$path"
39044
39045  windows_path="$new_path"
39046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39047    unix_path=`$CYGPATH -u "$windows_path"`
39048    new_path="$unix_path"
39049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39051    new_path="$unix_path"
39052  fi
39053
39054
39055  # Now try to locate executable using which
39056  new_path=`$WHICH "$new_path" 2> /dev/null`
39057
39058  if test "x$new_path" = x; then
39059    # Oops. Which didn't find the executable.
39060    # The splitting of arguments from the executable at a space might have been incorrect,
39061    # since paths with space are more likely in Windows. Give it another try with the whole
39062    # argument.
39063    path="$complete"
39064    arguments="EOL"
39065    new_path="$path"
39066
39067  windows_path="$new_path"
39068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069    unix_path=`$CYGPATH -u "$windows_path"`
39070    new_path="$unix_path"
39071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39073    new_path="$unix_path"
39074  fi
39075
39076
39077    new_path=`$WHICH "$new_path" 2> /dev/null`
39078    # bat and cmd files are not always considered executable in MSYS causing which
39079    # to not find them
39080    if test "x$new_path" = x \
39081        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39082        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39083      new_path="$path"
39084
39085  windows_path="$new_path"
39086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39087    unix_path=`$CYGPATH -u "$windows_path"`
39088    new_path="$unix_path"
39089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39091    new_path="$unix_path"
39092  fi
39093
39094    fi
39095
39096    if test "x$new_path" = x; then
39097      # It's still not found. Now this is an unrecoverable error.
39098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39099$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39100      has_space=`$ECHO "$complete" | $GREP " "`
39101      if test "x$has_space" != x; then
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39104      fi
39105      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39106    fi
39107  fi
39108
39109  # Now new_path has a complete unix path to the binary
39110  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39111    # Keep paths in /bin as-is, but remove trailing .exe if any
39112    new_path="${new_path/%.exe/}"
39113    # Do not save /bin paths to all_fixpath_prefixes!
39114  else
39115    # Not in mixed or Windows style, start by that.
39116    new_path=`cmd //c echo $new_path`
39117
39118  input_path="$new_path"
39119  # Check if we need to convert this using DOS-style short mode. If the path
39120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39121  # take no chances and rewrite it.
39122  # Note: m4 eats our [], so we need to use [ and ] instead.
39123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39124  if test "x$has_forbidden_chars" != x; then
39125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39127  fi
39128
39129    # Output is in $new_path
39130
39131  windows_path="$new_path"
39132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39133    unix_path=`$CYGPATH -u "$windows_path"`
39134    new_path="$unix_path"
39135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39137    new_path="$unix_path"
39138  fi
39139
39140    # remove trailing .exe if any
39141    new_path="${new_path/%.exe/}"
39142
39143    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39144    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39145  fi
39146
39147    else
39148      # We're on a unix platform. Hooray! :)
39149      # First separate the path from the arguments. This will split at the first
39150      # space.
39151      complete="$RC"
39152      path="${complete%% *}"
39153      tmp="$complete EOL"
39154      arguments="${tmp#* }"
39155
39156      # Cannot rely on the command "which" here since it doesn't always work.
39157      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39158      if test -z "$is_absolute_path"; then
39159        # Path to executable is not absolute. Find it.
39160        IFS_save="$IFS"
39161        IFS=:
39162        for p in $PATH; do
39163          if test -f "$p/$path" && test -x "$p/$path"; then
39164            new_path="$p/$path"
39165            break
39166          fi
39167        done
39168        IFS="$IFS_save"
39169      else
39170        # This is an absolute path, we can use it without further modifications.
39171        new_path="$path"
39172      fi
39173
39174      if test "x$new_path" = x; then
39175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39176$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39177        has_space=`$ECHO "$complete" | $GREP " "`
39178        if test "x$has_space" != x; then
39179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39181        fi
39182        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39183      fi
39184    fi
39185
39186    # Now join together the path and the arguments once again
39187    if test "x$arguments" != xEOL; then
39188      new_complete="$new_path ${arguments% *}"
39189    else
39190      new_complete="$new_path"
39191    fi
39192
39193    if test "x$complete" != "x$new_complete"; then
39194      RC="$new_complete"
39195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39196$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39197    fi
39198  fi
39199
39200    # Extract the first word of "dumpbin", so it can be a program name with args.
39201set dummy dumpbin; ac_word=$2
39202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39203$as_echo_n "checking for $ac_word... " >&6; }
39204if ${ac_cv_prog_DUMPBIN+:} false; then :
39205  $as_echo_n "(cached) " >&6
39206else
39207  if test -n "$DUMPBIN"; then
39208  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39209else
39210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39211for as_dir in $PATH
39212do
39213  IFS=$as_save_IFS
39214  test -z "$as_dir" && as_dir=.
39215    for ac_exec_ext in '' $ac_executable_extensions; do
39216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39217    ac_cv_prog_DUMPBIN="dumpbin"
39218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39219    break 2
39220  fi
39221done
39222  done
39223IFS=$as_save_IFS
39224
39225fi
39226fi
39227DUMPBIN=$ac_cv_prog_DUMPBIN
39228if test -n "$DUMPBIN"; then
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39230$as_echo "$DUMPBIN" >&6; }
39231else
39232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39233$as_echo "no" >&6; }
39234fi
39235
39236
39237
39238  # Only process if variable expands to non-empty
39239
39240  if test "x$DUMPBIN" != x; then
39241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39242
39243  # First separate the path from the arguments. This will split at the first
39244  # space.
39245  complete="$DUMPBIN"
39246  path="${complete%% *}"
39247  tmp="$complete EOL"
39248  arguments="${tmp#* }"
39249
39250  # Input might be given as Windows format, start by converting to
39251  # unix format.
39252  new_path=`$CYGPATH -u "$path"`
39253
39254  # Now try to locate executable using which
39255  new_path=`$WHICH "$new_path" 2> /dev/null`
39256  # bat and cmd files are not always considered executable in cygwin causing which
39257  # to not find them
39258  if test "x$new_path" = x \
39259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39261    new_path=`$CYGPATH -u "$path"`
39262  fi
39263  if test "x$new_path" = x; then
39264    # Oops. Which didn't find the executable.
39265    # The splitting of arguments from the executable at a space might have been incorrect,
39266    # since paths with space are more likely in Windows. Give it another try with the whole
39267    # argument.
39268    path="$complete"
39269    arguments="EOL"
39270    new_path=`$CYGPATH -u "$path"`
39271    new_path=`$WHICH "$new_path" 2> /dev/null`
39272    # bat and cmd files are not always considered executable in cygwin causing which
39273    # to not find them
39274    if test "x$new_path" = x \
39275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39277      new_path=`$CYGPATH -u "$path"`
39278    fi
39279    if test "x$new_path" = x; then
39280      # It's still not found. Now this is an unrecoverable error.
39281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39282$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39283      has_space=`$ECHO "$complete" | $GREP " "`
39284      if test "x$has_space" != x; then
39285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39287      fi
39288      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39289    fi
39290  fi
39291
39292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39295  # "foo.exe" is OK but "foo" is an error.
39296  #
39297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39298  # It is also a way to make sure we got the proper file name for the real test later on.
39299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39300  if test "x$test_shortpath" = x; then
39301    # Short path failed, file does not exist as specified.
39302    # Try adding .exe or .cmd
39303    if test -f "${new_path}.exe"; then
39304      input_to_shortpath="${new_path}.exe"
39305    elif test -f "${new_path}.cmd"; then
39306      input_to_shortpath="${new_path}.cmd"
39307    else
39308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39309$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39312      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39313    fi
39314  else
39315    input_to_shortpath="$new_path"
39316  fi
39317
39318  # Call helper function which possibly converts this using DOS-style short mode.
39319  # If so, the updated path is stored in $new_path.
39320  new_path="$input_to_shortpath"
39321
39322  input_path="$input_to_shortpath"
39323  # Check if we need to convert this using DOS-style short mode. If the path
39324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39325  # take no chances and rewrite it.
39326  # Note: m4 eats our [], so we need to use [ and ] instead.
39327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39328  if test "x$has_forbidden_chars" != x; then
39329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39333      # Going to short mode and back again did indeed matter. Since short mode is
39334      # case insensitive, let's make it lowercase to improve readability.
39335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39336      # Now convert it back to Unix-style (cygpath)
39337      input_path=`$CYGPATH -u "$shortmode_path"`
39338      new_path="$input_path"
39339    fi
39340  fi
39341
39342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39343  if test "x$test_cygdrive_prefix" = x; then
39344    # As a simple fix, exclude /usr/bin since it's not a real path.
39345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39347      # a path prefixed by /cygdrive for fixpath to work.
39348      new_path="$CYGWIN_ROOT_PATH$input_path"
39349    fi
39350  fi
39351
39352  # remove trailing .exe if any
39353  new_path="${new_path/%.exe/}"
39354
39355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39356
39357  # First separate the path from the arguments. This will split at the first
39358  # space.
39359  complete="$DUMPBIN"
39360  path="${complete%% *}"
39361  tmp="$complete EOL"
39362  arguments="${tmp#* }"
39363
39364  # Input might be given as Windows format, start by converting to
39365  # unix format.
39366  new_path="$path"
39367
39368  windows_path="$new_path"
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370    unix_path=`$CYGPATH -u "$windows_path"`
39371    new_path="$unix_path"
39372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39374    new_path="$unix_path"
39375  fi
39376
39377
39378  # Now try to locate executable using which
39379  new_path=`$WHICH "$new_path" 2> /dev/null`
39380
39381  if test "x$new_path" = x; then
39382    # Oops. Which didn't find the executable.
39383    # The splitting of arguments from the executable at a space might have been incorrect,
39384    # since paths with space are more likely in Windows. Give it another try with the whole
39385    # argument.
39386    path="$complete"
39387    arguments="EOL"
39388    new_path="$path"
39389
39390  windows_path="$new_path"
39391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39392    unix_path=`$CYGPATH -u "$windows_path"`
39393    new_path="$unix_path"
39394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39396    new_path="$unix_path"
39397  fi
39398
39399
39400    new_path=`$WHICH "$new_path" 2> /dev/null`
39401    # bat and cmd files are not always considered executable in MSYS causing which
39402    # to not find them
39403    if test "x$new_path" = x \
39404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39406      new_path="$path"
39407
39408  windows_path="$new_path"
39409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39410    unix_path=`$CYGPATH -u "$windows_path"`
39411    new_path="$unix_path"
39412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39414    new_path="$unix_path"
39415  fi
39416
39417    fi
39418
39419    if test "x$new_path" = x; then
39420      # It's still not found. Now this is an unrecoverable error.
39421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39422$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39423      has_space=`$ECHO "$complete" | $GREP " "`
39424      if test "x$has_space" != x; then
39425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39427      fi
39428      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39429    fi
39430  fi
39431
39432  # Now new_path has a complete unix path to the binary
39433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39434    # Keep paths in /bin as-is, but remove trailing .exe if any
39435    new_path="${new_path/%.exe/}"
39436    # Do not save /bin paths to all_fixpath_prefixes!
39437  else
39438    # Not in mixed or Windows style, start by that.
39439    new_path=`cmd //c echo $new_path`
39440
39441  input_path="$new_path"
39442  # Check if we need to convert this using DOS-style short mode. If the path
39443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39444  # take no chances and rewrite it.
39445  # Note: m4 eats our [], so we need to use [ and ] instead.
39446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39447  if test "x$has_forbidden_chars" != x; then
39448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39450  fi
39451
39452    # Output is in $new_path
39453
39454  windows_path="$new_path"
39455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39456    unix_path=`$CYGPATH -u "$windows_path"`
39457    new_path="$unix_path"
39458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39460    new_path="$unix_path"
39461  fi
39462
39463    # remove trailing .exe if any
39464    new_path="${new_path/%.exe/}"
39465
39466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39468  fi
39469
39470    else
39471      # We're on a unix platform. Hooray! :)
39472      # First separate the path from the arguments. This will split at the first
39473      # space.
39474      complete="$DUMPBIN"
39475      path="${complete%% *}"
39476      tmp="$complete EOL"
39477      arguments="${tmp#* }"
39478
39479      # Cannot rely on the command "which" here since it doesn't always work.
39480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39481      if test -z "$is_absolute_path"; then
39482        # Path to executable is not absolute. Find it.
39483        IFS_save="$IFS"
39484        IFS=:
39485        for p in $PATH; do
39486          if test -f "$p/$path" && test -x "$p/$path"; then
39487            new_path="$p/$path"
39488            break
39489          fi
39490        done
39491        IFS="$IFS_save"
39492      else
39493        # This is an absolute path, we can use it without further modifications.
39494        new_path="$path"
39495      fi
39496
39497      if test "x$new_path" = x; then
39498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39499$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39500        has_space=`$ECHO "$complete" | $GREP " "`
39501        if test "x$has_space" != x; then
39502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39504        fi
39505        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39506      fi
39507    fi
39508
39509    # Now join together the path and the arguments once again
39510    if test "x$arguments" != xEOL; then
39511      new_complete="$new_path ${arguments% *}"
39512    else
39513      new_complete="$new_path"
39514    fi
39515
39516    if test "x$complete" != "x$new_complete"; then
39517      DUMPBIN="$new_complete"
39518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39519$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39520    fi
39521  fi
39522
39523    # We need to check for 'msbuild.exe' because at the place where we expect to
39524    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39525    # won't find the 'msbuild.exe' executable in that case (and the
39526    # 'ac_executable_extensions' is unusable due to performance reasons).
39527    # Notice that we intentionally don't fix up the path to MSBUILD because we
39528    # will call it in a DOS shell during freetype detection on Windows (see
39529    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39530    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39531set dummy msbuild.exe; ac_word=$2
39532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39533$as_echo_n "checking for $ac_word... " >&6; }
39534if ${ac_cv_prog_MSBUILD+:} false; then :
39535  $as_echo_n "(cached) " >&6
39536else
39537  if test -n "$MSBUILD"; then
39538  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39539else
39540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39541for as_dir in $PATH
39542do
39543  IFS=$as_save_IFS
39544  test -z "$as_dir" && as_dir=.
39545    for ac_exec_ext in '' $ac_executable_extensions; do
39546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39547    ac_cv_prog_MSBUILD="msbuild.exe"
39548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39549    break 2
39550  fi
39551done
39552  done
39553IFS=$as_save_IFS
39554
39555fi
39556fi
39557MSBUILD=$ac_cv_prog_MSBUILD
39558if test -n "$MSBUILD"; then
39559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39560$as_echo "$MSBUILD" >&6; }
39561else
39562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39563$as_echo "no" >&6; }
39564fi
39565
39566
39567  fi
39568
39569  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39570
39571
39572  # Publish this variable in the help.
39573
39574
39575  if [ -z "${STRIP+x}" ]; then
39576    # The variable is not set by user, try to locate tool using the code snippet
39577    for ac_prog in strip
39578do
39579  # Extract the first word of "$ac_prog", so it can be a program name with args.
39580set dummy $ac_prog; ac_word=$2
39581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39582$as_echo_n "checking for $ac_word... " >&6; }
39583if ${ac_cv_path_STRIP+:} false; then :
39584  $as_echo_n "(cached) " >&6
39585else
39586  case $STRIP in
39587  [\\/]* | ?:[\\/]*)
39588  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39589  ;;
39590  *)
39591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39592for as_dir in $PATH
39593do
39594  IFS=$as_save_IFS
39595  test -z "$as_dir" && as_dir=.
39596    for ac_exec_ext in '' $ac_executable_extensions; do
39597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39598    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39600    break 2
39601  fi
39602done
39603  done
39604IFS=$as_save_IFS
39605
39606  ;;
39607esac
39608fi
39609STRIP=$ac_cv_path_STRIP
39610if test -n "$STRIP"; then
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39612$as_echo "$STRIP" >&6; }
39613else
39614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39615$as_echo "no" >&6; }
39616fi
39617
39618
39619  test -n "$STRIP" && break
39620done
39621
39622  else
39623    # The variable is set, but is it from the command line or the environment?
39624
39625    # Try to remove the string !STRIP! from our list.
39626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39628      # If it failed, the variable was not from the command line. Ignore it,
39629      # but warn the user (except for BASH, which is always set by the calling BASH).
39630      if test "xSTRIP" != xBASH; then
39631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39632$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39633      fi
39634      # Try to locate tool using the code snippet
39635      for ac_prog in strip
39636do
39637  # Extract the first word of "$ac_prog", so it can be a program name with args.
39638set dummy $ac_prog; ac_word=$2
39639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39640$as_echo_n "checking for $ac_word... " >&6; }
39641if ${ac_cv_path_STRIP+:} false; then :
39642  $as_echo_n "(cached) " >&6
39643else
39644  case $STRIP in
39645  [\\/]* | ?:[\\/]*)
39646  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39647  ;;
39648  *)
39649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39650for as_dir in $PATH
39651do
39652  IFS=$as_save_IFS
39653  test -z "$as_dir" && as_dir=.
39654    for ac_exec_ext in '' $ac_executable_extensions; do
39655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39656    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39658    break 2
39659  fi
39660done
39661  done
39662IFS=$as_save_IFS
39663
39664  ;;
39665esac
39666fi
39667STRIP=$ac_cv_path_STRIP
39668if test -n "$STRIP"; then
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39670$as_echo "$STRIP" >&6; }
39671else
39672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39673$as_echo "no" >&6; }
39674fi
39675
39676
39677  test -n "$STRIP" && break
39678done
39679
39680    else
39681      # If it succeeded, then it was overridden by the user. We will use it
39682      # for the tool.
39683
39684      # First remove it from the list of overridden variables, so we can test
39685      # for unknown variables in the end.
39686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39687
39688      # Check if we try to supply an empty value
39689      if test "x$STRIP" = x; then
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39691$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39693$as_echo_n "checking for STRIP... " >&6; }
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39695$as_echo "disabled" >&6; }
39696      else
39697        # Check if the provided tool contains a complete path.
39698        tool_specified="$STRIP"
39699        tool_basename="${tool_specified##*/}"
39700        if test "x$tool_basename" = "x$tool_specified"; then
39701          # A command without a complete path is provided, search $PATH.
39702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39703$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39704          # Extract the first word of "$tool_basename", so it can be a program name with args.
39705set dummy $tool_basename; ac_word=$2
39706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39707$as_echo_n "checking for $ac_word... " >&6; }
39708if ${ac_cv_path_STRIP+:} false; then :
39709  $as_echo_n "(cached) " >&6
39710else
39711  case $STRIP in
39712  [\\/]* | ?:[\\/]*)
39713  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39714  ;;
39715  *)
39716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39717for as_dir in $PATH
39718do
39719  IFS=$as_save_IFS
39720  test -z "$as_dir" && as_dir=.
39721    for ac_exec_ext in '' $ac_executable_extensions; do
39722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39723    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39725    break 2
39726  fi
39727done
39728  done
39729IFS=$as_save_IFS
39730
39731  ;;
39732esac
39733fi
39734STRIP=$ac_cv_path_STRIP
39735if test -n "$STRIP"; then
39736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39737$as_echo "$STRIP" >&6; }
39738else
39739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39740$as_echo "no" >&6; }
39741fi
39742
39743
39744          if test "x$STRIP" = x; then
39745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39746          fi
39747        else
39748          # Otherwise we believe it is a complete path. Use it as it is.
39749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39750$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39752$as_echo_n "checking for STRIP... " >&6; }
39753          if test ! -x "$tool_specified"; then
39754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39755$as_echo "not found" >&6; }
39756            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39757          fi
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39759$as_echo "$tool_specified" >&6; }
39760        fi
39761      fi
39762    fi
39763
39764  fi
39765
39766
39767
39768  # Only process if variable expands to non-empty
39769
39770  if test "x$STRIP" != x; then
39771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39772
39773  # First separate the path from the arguments. This will split at the first
39774  # space.
39775  complete="$STRIP"
39776  path="${complete%% *}"
39777  tmp="$complete EOL"
39778  arguments="${tmp#* }"
39779
39780  # Input might be given as Windows format, start by converting to
39781  # unix format.
39782  new_path=`$CYGPATH -u "$path"`
39783
39784  # Now try to locate executable using which
39785  new_path=`$WHICH "$new_path" 2> /dev/null`
39786  # bat and cmd files are not always considered executable in cygwin causing which
39787  # to not find them
39788  if test "x$new_path" = x \
39789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39791    new_path=`$CYGPATH -u "$path"`
39792  fi
39793  if test "x$new_path" = x; then
39794    # Oops. Which didn't find the executable.
39795    # The splitting of arguments from the executable at a space might have been incorrect,
39796    # since paths with space are more likely in Windows. Give it another try with the whole
39797    # argument.
39798    path="$complete"
39799    arguments="EOL"
39800    new_path=`$CYGPATH -u "$path"`
39801    new_path=`$WHICH "$new_path" 2> /dev/null`
39802    # bat and cmd files are not always considered executable in cygwin causing which
39803    # to not find them
39804    if test "x$new_path" = x \
39805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39807      new_path=`$CYGPATH -u "$path"`
39808    fi
39809    if test "x$new_path" = x; then
39810      # It's still not found. Now this is an unrecoverable error.
39811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39812$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39813      has_space=`$ECHO "$complete" | $GREP " "`
39814      if test "x$has_space" != x; then
39815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39817      fi
39818      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39819    fi
39820  fi
39821
39822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39825  # "foo.exe" is OK but "foo" is an error.
39826  #
39827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39828  # It is also a way to make sure we got the proper file name for the real test later on.
39829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39830  if test "x$test_shortpath" = x; then
39831    # Short path failed, file does not exist as specified.
39832    # Try adding .exe or .cmd
39833    if test -f "${new_path}.exe"; then
39834      input_to_shortpath="${new_path}.exe"
39835    elif test -f "${new_path}.cmd"; then
39836      input_to_shortpath="${new_path}.cmd"
39837    else
39838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39839$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39842      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39843    fi
39844  else
39845    input_to_shortpath="$new_path"
39846  fi
39847
39848  # Call helper function which possibly converts this using DOS-style short mode.
39849  # If so, the updated path is stored in $new_path.
39850  new_path="$input_to_shortpath"
39851
39852  input_path="$input_to_shortpath"
39853  # Check if we need to convert this using DOS-style short mode. If the path
39854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39855  # take no chances and rewrite it.
39856  # Note: m4 eats our [], so we need to use [ and ] instead.
39857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39858  if test "x$has_forbidden_chars" != x; then
39859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39863      # Going to short mode and back again did indeed matter. Since short mode is
39864      # case insensitive, let's make it lowercase to improve readability.
39865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39866      # Now convert it back to Unix-style (cygpath)
39867      input_path=`$CYGPATH -u "$shortmode_path"`
39868      new_path="$input_path"
39869    fi
39870  fi
39871
39872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39873  if test "x$test_cygdrive_prefix" = x; then
39874    # As a simple fix, exclude /usr/bin since it's not a real path.
39875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39877      # a path prefixed by /cygdrive for fixpath to work.
39878      new_path="$CYGWIN_ROOT_PATH$input_path"
39879    fi
39880  fi
39881
39882  # remove trailing .exe if any
39883  new_path="${new_path/%.exe/}"
39884
39885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39886
39887  # First separate the path from the arguments. This will split at the first
39888  # space.
39889  complete="$STRIP"
39890  path="${complete%% *}"
39891  tmp="$complete EOL"
39892  arguments="${tmp#* }"
39893
39894  # Input might be given as Windows format, start by converting to
39895  # unix format.
39896  new_path="$path"
39897
39898  windows_path="$new_path"
39899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39900    unix_path=`$CYGPATH -u "$windows_path"`
39901    new_path="$unix_path"
39902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39904    new_path="$unix_path"
39905  fi
39906
39907
39908  # Now try to locate executable using which
39909  new_path=`$WHICH "$new_path" 2> /dev/null`
39910
39911  if test "x$new_path" = x; then
39912    # Oops. Which didn't find the executable.
39913    # The splitting of arguments from the executable at a space might have been incorrect,
39914    # since paths with space are more likely in Windows. Give it another try with the whole
39915    # argument.
39916    path="$complete"
39917    arguments="EOL"
39918    new_path="$path"
39919
39920  windows_path="$new_path"
39921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922    unix_path=`$CYGPATH -u "$windows_path"`
39923    new_path="$unix_path"
39924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39926    new_path="$unix_path"
39927  fi
39928
39929
39930    new_path=`$WHICH "$new_path" 2> /dev/null`
39931    # bat and cmd files are not always considered executable in MSYS causing which
39932    # to not find them
39933    if test "x$new_path" = x \
39934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39936      new_path="$path"
39937
39938  windows_path="$new_path"
39939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39940    unix_path=`$CYGPATH -u "$windows_path"`
39941    new_path="$unix_path"
39942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39944    new_path="$unix_path"
39945  fi
39946
39947    fi
39948
39949    if test "x$new_path" = x; then
39950      # It's still not found. Now this is an unrecoverable error.
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39952$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39953      has_space=`$ECHO "$complete" | $GREP " "`
39954      if test "x$has_space" != x; then
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957      fi
39958      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39959    fi
39960  fi
39961
39962  # Now new_path has a complete unix path to the binary
39963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39964    # Keep paths in /bin as-is, but remove trailing .exe if any
39965    new_path="${new_path/%.exe/}"
39966    # Do not save /bin paths to all_fixpath_prefixes!
39967  else
39968    # Not in mixed or Windows style, start by that.
39969    new_path=`cmd //c echo $new_path`
39970
39971  input_path="$new_path"
39972  # Check if we need to convert this using DOS-style short mode. If the path
39973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39974  # take no chances and rewrite it.
39975  # Note: m4 eats our [], so we need to use [ and ] instead.
39976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39977  if test "x$has_forbidden_chars" != x; then
39978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39980  fi
39981
39982    # Output is in $new_path
39983
39984  windows_path="$new_path"
39985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39986    unix_path=`$CYGPATH -u "$windows_path"`
39987    new_path="$unix_path"
39988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39990    new_path="$unix_path"
39991  fi
39992
39993    # remove trailing .exe if any
39994    new_path="${new_path/%.exe/}"
39995
39996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39998  fi
39999
40000    else
40001      # We're on a unix platform. Hooray! :)
40002      # First separate the path from the arguments. This will split at the first
40003      # space.
40004      complete="$STRIP"
40005      path="${complete%% *}"
40006      tmp="$complete EOL"
40007      arguments="${tmp#* }"
40008
40009      # Cannot rely on the command "which" here since it doesn't always work.
40010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40011      if test -z "$is_absolute_path"; then
40012        # Path to executable is not absolute. Find it.
40013        IFS_save="$IFS"
40014        IFS=:
40015        for p in $PATH; do
40016          if test -f "$p/$path" && test -x "$p/$path"; then
40017            new_path="$p/$path"
40018            break
40019          fi
40020        done
40021        IFS="$IFS_save"
40022      else
40023        # This is an absolute path, we can use it without further modifications.
40024        new_path="$path"
40025      fi
40026
40027      if test "x$new_path" = x; then
40028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40029$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40030        has_space=`$ECHO "$complete" | $GREP " "`
40031        if test "x$has_space" != x; then
40032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40034        fi
40035        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40036      fi
40037    fi
40038
40039    # Now join together the path and the arguments once again
40040    if test "x$arguments" != xEOL; then
40041      new_complete="$new_path ${arguments% *}"
40042    else
40043      new_complete="$new_path"
40044    fi
40045
40046    if test "x$complete" != "x$new_complete"; then
40047      STRIP="$new_complete"
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40049$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40050    fi
40051  fi
40052
40053
40054
40055  # Publish this variable in the help.
40056
40057
40058  if [ -z "${NM+x}" ]; then
40059    # The variable is not set by user, try to locate tool using the code snippet
40060    for ac_prog in nm
40061do
40062  # Extract the first word of "$ac_prog", so it can be a program name with args.
40063set dummy $ac_prog; ac_word=$2
40064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40065$as_echo_n "checking for $ac_word... " >&6; }
40066if ${ac_cv_path_NM+:} false; then :
40067  $as_echo_n "(cached) " >&6
40068else
40069  case $NM in
40070  [\\/]* | ?:[\\/]*)
40071  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40072  ;;
40073  *)
40074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40075for as_dir in $PATH
40076do
40077  IFS=$as_save_IFS
40078  test -z "$as_dir" && as_dir=.
40079    for ac_exec_ext in '' $ac_executable_extensions; do
40080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40081    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40083    break 2
40084  fi
40085done
40086  done
40087IFS=$as_save_IFS
40088
40089  ;;
40090esac
40091fi
40092NM=$ac_cv_path_NM
40093if test -n "$NM"; then
40094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40095$as_echo "$NM" >&6; }
40096else
40097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40098$as_echo "no" >&6; }
40099fi
40100
40101
40102  test -n "$NM" && break
40103done
40104
40105  else
40106    # The variable is set, but is it from the command line or the environment?
40107
40108    # Try to remove the string !NM! from our list.
40109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40111      # If it failed, the variable was not from the command line. Ignore it,
40112      # but warn the user (except for BASH, which is always set by the calling BASH).
40113      if test "xNM" != xBASH; then
40114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40115$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40116      fi
40117      # Try to locate tool using the code snippet
40118      for ac_prog in nm
40119do
40120  # Extract the first word of "$ac_prog", so it can be a program name with args.
40121set dummy $ac_prog; ac_word=$2
40122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40123$as_echo_n "checking for $ac_word... " >&6; }
40124if ${ac_cv_path_NM+:} false; then :
40125  $as_echo_n "(cached) " >&6
40126else
40127  case $NM in
40128  [\\/]* | ?:[\\/]*)
40129  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40130  ;;
40131  *)
40132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40133for as_dir in $PATH
40134do
40135  IFS=$as_save_IFS
40136  test -z "$as_dir" && as_dir=.
40137    for ac_exec_ext in '' $ac_executable_extensions; do
40138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40139    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40141    break 2
40142  fi
40143done
40144  done
40145IFS=$as_save_IFS
40146
40147  ;;
40148esac
40149fi
40150NM=$ac_cv_path_NM
40151if test -n "$NM"; then
40152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40153$as_echo "$NM" >&6; }
40154else
40155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40156$as_echo "no" >&6; }
40157fi
40158
40159
40160  test -n "$NM" && break
40161done
40162
40163    else
40164      # If it succeeded, then it was overridden by the user. We will use it
40165      # for the tool.
40166
40167      # First remove it from the list of overridden variables, so we can test
40168      # for unknown variables in the end.
40169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40170
40171      # Check if we try to supply an empty value
40172      if test "x$NM" = x; then
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40174$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40176$as_echo_n "checking for NM... " >&6; }
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40178$as_echo "disabled" >&6; }
40179      else
40180        # Check if the provided tool contains a complete path.
40181        tool_specified="$NM"
40182        tool_basename="${tool_specified##*/}"
40183        if test "x$tool_basename" = "x$tool_specified"; then
40184          # A command without a complete path is provided, search $PATH.
40185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40186$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40187          # Extract the first word of "$tool_basename", so it can be a program name with args.
40188set dummy $tool_basename; ac_word=$2
40189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40190$as_echo_n "checking for $ac_word... " >&6; }
40191if ${ac_cv_path_NM+:} false; then :
40192  $as_echo_n "(cached) " >&6
40193else
40194  case $NM in
40195  [\\/]* | ?:[\\/]*)
40196  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40197  ;;
40198  *)
40199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40200for as_dir in $PATH
40201do
40202  IFS=$as_save_IFS
40203  test -z "$as_dir" && as_dir=.
40204    for ac_exec_ext in '' $ac_executable_extensions; do
40205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40206    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40208    break 2
40209  fi
40210done
40211  done
40212IFS=$as_save_IFS
40213
40214  ;;
40215esac
40216fi
40217NM=$ac_cv_path_NM
40218if test -n "$NM"; then
40219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40220$as_echo "$NM" >&6; }
40221else
40222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40223$as_echo "no" >&6; }
40224fi
40225
40226
40227          if test "x$NM" = x; then
40228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40229          fi
40230        else
40231          # Otherwise we believe it is a complete path. Use it as it is.
40232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40233$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40235$as_echo_n "checking for NM... " >&6; }
40236          if test ! -x "$tool_specified"; then
40237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40238$as_echo "not found" >&6; }
40239            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40240          fi
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40242$as_echo "$tool_specified" >&6; }
40243        fi
40244      fi
40245    fi
40246
40247  fi
40248
40249
40250
40251  # Only process if variable expands to non-empty
40252
40253  if test "x$NM" != x; then
40254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40255
40256  # First separate the path from the arguments. This will split at the first
40257  # space.
40258  complete="$NM"
40259  path="${complete%% *}"
40260  tmp="$complete EOL"
40261  arguments="${tmp#* }"
40262
40263  # Input might be given as Windows format, start by converting to
40264  # unix format.
40265  new_path=`$CYGPATH -u "$path"`
40266
40267  # Now try to locate executable using which
40268  new_path=`$WHICH "$new_path" 2> /dev/null`
40269  # bat and cmd files are not always considered executable in cygwin causing which
40270  # to not find them
40271  if test "x$new_path" = x \
40272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40274    new_path=`$CYGPATH -u "$path"`
40275  fi
40276  if test "x$new_path" = x; then
40277    # Oops. Which didn't find the executable.
40278    # The splitting of arguments from the executable at a space might have been incorrect,
40279    # since paths with space are more likely in Windows. Give it another try with the whole
40280    # argument.
40281    path="$complete"
40282    arguments="EOL"
40283    new_path=`$CYGPATH -u "$path"`
40284    new_path=`$WHICH "$new_path" 2> /dev/null`
40285    # bat and cmd files are not always considered executable in cygwin causing which
40286    # to not find them
40287    if test "x$new_path" = x \
40288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40290      new_path=`$CYGPATH -u "$path"`
40291    fi
40292    if test "x$new_path" = x; then
40293      # It's still not found. Now this is an unrecoverable error.
40294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40295$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40296      has_space=`$ECHO "$complete" | $GREP " "`
40297      if test "x$has_space" != x; then
40298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40300      fi
40301      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40302    fi
40303  fi
40304
40305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40308  # "foo.exe" is OK but "foo" is an error.
40309  #
40310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40311  # It is also a way to make sure we got the proper file name for the real test later on.
40312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40313  if test "x$test_shortpath" = x; then
40314    # Short path failed, file does not exist as specified.
40315    # Try adding .exe or .cmd
40316    if test -f "${new_path}.exe"; then
40317      input_to_shortpath="${new_path}.exe"
40318    elif test -f "${new_path}.cmd"; then
40319      input_to_shortpath="${new_path}.cmd"
40320    else
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40322$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40325      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40326    fi
40327  else
40328    input_to_shortpath="$new_path"
40329  fi
40330
40331  # Call helper function which possibly converts this using DOS-style short mode.
40332  # If so, the updated path is stored in $new_path.
40333  new_path="$input_to_shortpath"
40334
40335  input_path="$input_to_shortpath"
40336  # Check if we need to convert this using DOS-style short mode. If the path
40337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40338  # take no chances and rewrite it.
40339  # Note: m4 eats our [], so we need to use [ and ] instead.
40340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40341  if test "x$has_forbidden_chars" != x; then
40342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40346      # Going to short mode and back again did indeed matter. Since short mode is
40347      # case insensitive, let's make it lowercase to improve readability.
40348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40349      # Now convert it back to Unix-style (cygpath)
40350      input_path=`$CYGPATH -u "$shortmode_path"`
40351      new_path="$input_path"
40352    fi
40353  fi
40354
40355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40356  if test "x$test_cygdrive_prefix" = x; then
40357    # As a simple fix, exclude /usr/bin since it's not a real path.
40358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40360      # a path prefixed by /cygdrive for fixpath to work.
40361      new_path="$CYGWIN_ROOT_PATH$input_path"
40362    fi
40363  fi
40364
40365  # remove trailing .exe if any
40366  new_path="${new_path/%.exe/}"
40367
40368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40369
40370  # First separate the path from the arguments. This will split at the first
40371  # space.
40372  complete="$NM"
40373  path="${complete%% *}"
40374  tmp="$complete EOL"
40375  arguments="${tmp#* }"
40376
40377  # Input might be given as Windows format, start by converting to
40378  # unix format.
40379  new_path="$path"
40380
40381  windows_path="$new_path"
40382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383    unix_path=`$CYGPATH -u "$windows_path"`
40384    new_path="$unix_path"
40385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40387    new_path="$unix_path"
40388  fi
40389
40390
40391  # Now try to locate executable using which
40392  new_path=`$WHICH "$new_path" 2> /dev/null`
40393
40394  if test "x$new_path" = x; then
40395    # Oops. Which didn't find the executable.
40396    # The splitting of arguments from the executable at a space might have been incorrect,
40397    # since paths with space are more likely in Windows. Give it another try with the whole
40398    # argument.
40399    path="$complete"
40400    arguments="EOL"
40401    new_path="$path"
40402
40403  windows_path="$new_path"
40404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40405    unix_path=`$CYGPATH -u "$windows_path"`
40406    new_path="$unix_path"
40407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40409    new_path="$unix_path"
40410  fi
40411
40412
40413    new_path=`$WHICH "$new_path" 2> /dev/null`
40414    # bat and cmd files are not always considered executable in MSYS causing which
40415    # to not find them
40416    if test "x$new_path" = x \
40417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40419      new_path="$path"
40420
40421  windows_path="$new_path"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    unix_path=`$CYGPATH -u "$windows_path"`
40424    new_path="$unix_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40427    new_path="$unix_path"
40428  fi
40429
40430    fi
40431
40432    if test "x$new_path" = x; then
40433      # It's still not found. Now this is an unrecoverable error.
40434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40435$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40436      has_space=`$ECHO "$complete" | $GREP " "`
40437      if test "x$has_space" != x; then
40438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40440      fi
40441      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40442    fi
40443  fi
40444
40445  # Now new_path has a complete unix path to the binary
40446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40447    # Keep paths in /bin as-is, but remove trailing .exe if any
40448    new_path="${new_path/%.exe/}"
40449    # Do not save /bin paths to all_fixpath_prefixes!
40450  else
40451    # Not in mixed or Windows style, start by that.
40452    new_path=`cmd //c echo $new_path`
40453
40454  input_path="$new_path"
40455  # Check if we need to convert this using DOS-style short mode. If the path
40456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40457  # take no chances and rewrite it.
40458  # Note: m4 eats our [], so we need to use [ and ] instead.
40459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40460  if test "x$has_forbidden_chars" != x; then
40461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40463  fi
40464
40465    # Output is in $new_path
40466
40467  windows_path="$new_path"
40468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40469    unix_path=`$CYGPATH -u "$windows_path"`
40470    new_path="$unix_path"
40471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40473    new_path="$unix_path"
40474  fi
40475
40476    # remove trailing .exe if any
40477    new_path="${new_path/%.exe/}"
40478
40479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40481  fi
40482
40483    else
40484      # We're on a unix platform. Hooray! :)
40485      # First separate the path from the arguments. This will split at the first
40486      # space.
40487      complete="$NM"
40488      path="${complete%% *}"
40489      tmp="$complete EOL"
40490      arguments="${tmp#* }"
40491
40492      # Cannot rely on the command "which" here since it doesn't always work.
40493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40494      if test -z "$is_absolute_path"; then
40495        # Path to executable is not absolute. Find it.
40496        IFS_save="$IFS"
40497        IFS=:
40498        for p in $PATH; do
40499          if test -f "$p/$path" && test -x "$p/$path"; then
40500            new_path="$p/$path"
40501            break
40502          fi
40503        done
40504        IFS="$IFS_save"
40505      else
40506        # This is an absolute path, we can use it without further modifications.
40507        new_path="$path"
40508      fi
40509
40510      if test "x$new_path" = x; then
40511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40512$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40513        has_space=`$ECHO "$complete" | $GREP " "`
40514        if test "x$has_space" != x; then
40515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40517        fi
40518        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40519      fi
40520    fi
40521
40522    # Now join together the path and the arguments once again
40523    if test "x$arguments" != xEOL; then
40524      new_complete="$new_path ${arguments% *}"
40525    else
40526      new_complete="$new_path"
40527    fi
40528
40529    if test "x$complete" != "x$new_complete"; then
40530      NM="$new_complete"
40531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40532$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40533    fi
40534  fi
40535
40536
40537
40538  # Publish this variable in the help.
40539
40540
40541  if [ -z "${GNM+x}" ]; then
40542    # The variable is not set by user, try to locate tool using the code snippet
40543    for ac_prog in gnm
40544do
40545  # Extract the first word of "$ac_prog", so it can be a program name with args.
40546set dummy $ac_prog; ac_word=$2
40547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40548$as_echo_n "checking for $ac_word... " >&6; }
40549if ${ac_cv_path_GNM+:} false; then :
40550  $as_echo_n "(cached) " >&6
40551else
40552  case $GNM in
40553  [\\/]* | ?:[\\/]*)
40554  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40555  ;;
40556  *)
40557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40558for as_dir in $PATH
40559do
40560  IFS=$as_save_IFS
40561  test -z "$as_dir" && as_dir=.
40562    for ac_exec_ext in '' $ac_executable_extensions; do
40563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40564    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40566    break 2
40567  fi
40568done
40569  done
40570IFS=$as_save_IFS
40571
40572  ;;
40573esac
40574fi
40575GNM=$ac_cv_path_GNM
40576if test -n "$GNM"; then
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40578$as_echo "$GNM" >&6; }
40579else
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40581$as_echo "no" >&6; }
40582fi
40583
40584
40585  test -n "$GNM" && break
40586done
40587
40588  else
40589    # The variable is set, but is it from the command line or the environment?
40590
40591    # Try to remove the string !GNM! from our list.
40592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40594      # If it failed, the variable was not from the command line. Ignore it,
40595      # but warn the user (except for BASH, which is always set by the calling BASH).
40596      if test "xGNM" != xBASH; then
40597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40598$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40599      fi
40600      # Try to locate tool using the code snippet
40601      for ac_prog in gnm
40602do
40603  # Extract the first word of "$ac_prog", so it can be a program name with args.
40604set dummy $ac_prog; ac_word=$2
40605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40606$as_echo_n "checking for $ac_word... " >&6; }
40607if ${ac_cv_path_GNM+:} false; then :
40608  $as_echo_n "(cached) " >&6
40609else
40610  case $GNM in
40611  [\\/]* | ?:[\\/]*)
40612  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40613  ;;
40614  *)
40615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40616for as_dir in $PATH
40617do
40618  IFS=$as_save_IFS
40619  test -z "$as_dir" && as_dir=.
40620    for ac_exec_ext in '' $ac_executable_extensions; do
40621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40622    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40624    break 2
40625  fi
40626done
40627  done
40628IFS=$as_save_IFS
40629
40630  ;;
40631esac
40632fi
40633GNM=$ac_cv_path_GNM
40634if test -n "$GNM"; then
40635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40636$as_echo "$GNM" >&6; }
40637else
40638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40639$as_echo "no" >&6; }
40640fi
40641
40642
40643  test -n "$GNM" && break
40644done
40645
40646    else
40647      # If it succeeded, then it was overridden by the user. We will use it
40648      # for the tool.
40649
40650      # First remove it from the list of overridden variables, so we can test
40651      # for unknown variables in the end.
40652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40653
40654      # Check if we try to supply an empty value
40655      if test "x$GNM" = x; then
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40657$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40659$as_echo_n "checking for GNM... " >&6; }
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40661$as_echo "disabled" >&6; }
40662      else
40663        # Check if the provided tool contains a complete path.
40664        tool_specified="$GNM"
40665        tool_basename="${tool_specified##*/}"
40666        if test "x$tool_basename" = "x$tool_specified"; then
40667          # A command without a complete path is provided, search $PATH.
40668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40669$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40670          # Extract the first word of "$tool_basename", so it can be a program name with args.
40671set dummy $tool_basename; ac_word=$2
40672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40673$as_echo_n "checking for $ac_word... " >&6; }
40674if ${ac_cv_path_GNM+:} false; then :
40675  $as_echo_n "(cached) " >&6
40676else
40677  case $GNM in
40678  [\\/]* | ?:[\\/]*)
40679  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40680  ;;
40681  *)
40682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40683for as_dir in $PATH
40684do
40685  IFS=$as_save_IFS
40686  test -z "$as_dir" && as_dir=.
40687    for ac_exec_ext in '' $ac_executable_extensions; do
40688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40689    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40691    break 2
40692  fi
40693done
40694  done
40695IFS=$as_save_IFS
40696
40697  ;;
40698esac
40699fi
40700GNM=$ac_cv_path_GNM
40701if test -n "$GNM"; then
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40703$as_echo "$GNM" >&6; }
40704else
40705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40706$as_echo "no" >&6; }
40707fi
40708
40709
40710          if test "x$GNM" = x; then
40711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40712          fi
40713        else
40714          # Otherwise we believe it is a complete path. Use it as it is.
40715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40716$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40718$as_echo_n "checking for GNM... " >&6; }
40719          if test ! -x "$tool_specified"; then
40720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40721$as_echo "not found" >&6; }
40722            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40723          fi
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40725$as_echo "$tool_specified" >&6; }
40726        fi
40727      fi
40728    fi
40729
40730  fi
40731
40732
40733
40734  # Only process if variable expands to non-empty
40735
40736  if test "x$GNM" != x; then
40737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40738
40739  # First separate the path from the arguments. This will split at the first
40740  # space.
40741  complete="$GNM"
40742  path="${complete%% *}"
40743  tmp="$complete EOL"
40744  arguments="${tmp#* }"
40745
40746  # Input might be given as Windows format, start by converting to
40747  # unix format.
40748  new_path=`$CYGPATH -u "$path"`
40749
40750  # Now try to locate executable using which
40751  new_path=`$WHICH "$new_path" 2> /dev/null`
40752  # bat and cmd files are not always considered executable in cygwin causing which
40753  # to not find them
40754  if test "x$new_path" = x \
40755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40757    new_path=`$CYGPATH -u "$path"`
40758  fi
40759  if test "x$new_path" = x; then
40760    # Oops. Which didn't find the executable.
40761    # The splitting of arguments from the executable at a space might have been incorrect,
40762    # since paths with space are more likely in Windows. Give it another try with the whole
40763    # argument.
40764    path="$complete"
40765    arguments="EOL"
40766    new_path=`$CYGPATH -u "$path"`
40767    new_path=`$WHICH "$new_path" 2> /dev/null`
40768    # bat and cmd files are not always considered executable in cygwin causing which
40769    # to not find them
40770    if test "x$new_path" = x \
40771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40773      new_path=`$CYGPATH -u "$path"`
40774    fi
40775    if test "x$new_path" = x; then
40776      # It's still not found. Now this is an unrecoverable error.
40777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40778$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40779      has_space=`$ECHO "$complete" | $GREP " "`
40780      if test "x$has_space" != x; then
40781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40783      fi
40784      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40785    fi
40786  fi
40787
40788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40791  # "foo.exe" is OK but "foo" is an error.
40792  #
40793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40794  # It is also a way to make sure we got the proper file name for the real test later on.
40795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40796  if test "x$test_shortpath" = x; then
40797    # Short path failed, file does not exist as specified.
40798    # Try adding .exe or .cmd
40799    if test -f "${new_path}.exe"; then
40800      input_to_shortpath="${new_path}.exe"
40801    elif test -f "${new_path}.cmd"; then
40802      input_to_shortpath="${new_path}.cmd"
40803    else
40804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40805$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40808      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40809    fi
40810  else
40811    input_to_shortpath="$new_path"
40812  fi
40813
40814  # Call helper function which possibly converts this using DOS-style short mode.
40815  # If so, the updated path is stored in $new_path.
40816  new_path="$input_to_shortpath"
40817
40818  input_path="$input_to_shortpath"
40819  # Check if we need to convert this using DOS-style short mode. If the path
40820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40821  # take no chances and rewrite it.
40822  # Note: m4 eats our [], so we need to use [ and ] instead.
40823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40824  if test "x$has_forbidden_chars" != x; then
40825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40829      # Going to short mode and back again did indeed matter. Since short mode is
40830      # case insensitive, let's make it lowercase to improve readability.
40831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40832      # Now convert it back to Unix-style (cygpath)
40833      input_path=`$CYGPATH -u "$shortmode_path"`
40834      new_path="$input_path"
40835    fi
40836  fi
40837
40838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40839  if test "x$test_cygdrive_prefix" = x; then
40840    # As a simple fix, exclude /usr/bin since it's not a real path.
40841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40843      # a path prefixed by /cygdrive for fixpath to work.
40844      new_path="$CYGWIN_ROOT_PATH$input_path"
40845    fi
40846  fi
40847
40848  # remove trailing .exe if any
40849  new_path="${new_path/%.exe/}"
40850
40851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852
40853  # First separate the path from the arguments. This will split at the first
40854  # space.
40855  complete="$GNM"
40856  path="${complete%% *}"
40857  tmp="$complete EOL"
40858  arguments="${tmp#* }"
40859
40860  # Input might be given as Windows format, start by converting to
40861  # unix format.
40862  new_path="$path"
40863
40864  windows_path="$new_path"
40865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40866    unix_path=`$CYGPATH -u "$windows_path"`
40867    new_path="$unix_path"
40868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40870    new_path="$unix_path"
40871  fi
40872
40873
40874  # Now try to locate executable using which
40875  new_path=`$WHICH "$new_path" 2> /dev/null`
40876
40877  if test "x$new_path" = x; then
40878    # Oops. Which didn't find the executable.
40879    # The splitting of arguments from the executable at a space might have been incorrect,
40880    # since paths with space are more likely in Windows. Give it another try with the whole
40881    # argument.
40882    path="$complete"
40883    arguments="EOL"
40884    new_path="$path"
40885
40886  windows_path="$new_path"
40887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40888    unix_path=`$CYGPATH -u "$windows_path"`
40889    new_path="$unix_path"
40890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40892    new_path="$unix_path"
40893  fi
40894
40895
40896    new_path=`$WHICH "$new_path" 2> /dev/null`
40897    # bat and cmd files are not always considered executable in MSYS causing which
40898    # to not find them
40899    if test "x$new_path" = x \
40900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40902      new_path="$path"
40903
40904  windows_path="$new_path"
40905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40906    unix_path=`$CYGPATH -u "$windows_path"`
40907    new_path="$unix_path"
40908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40910    new_path="$unix_path"
40911  fi
40912
40913    fi
40914
40915    if test "x$new_path" = x; then
40916      # It's still not found. Now this is an unrecoverable error.
40917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40918$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40919      has_space=`$ECHO "$complete" | $GREP " "`
40920      if test "x$has_space" != x; then
40921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40923      fi
40924      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40925    fi
40926  fi
40927
40928  # Now new_path has a complete unix path to the binary
40929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40930    # Keep paths in /bin as-is, but remove trailing .exe if any
40931    new_path="${new_path/%.exe/}"
40932    # Do not save /bin paths to all_fixpath_prefixes!
40933  else
40934    # Not in mixed or Windows style, start by that.
40935    new_path=`cmd //c echo $new_path`
40936
40937  input_path="$new_path"
40938  # Check if we need to convert this using DOS-style short mode. If the path
40939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40940  # take no chances and rewrite it.
40941  # Note: m4 eats our [], so we need to use [ and ] instead.
40942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40943  if test "x$has_forbidden_chars" != x; then
40944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40946  fi
40947
40948    # Output is in $new_path
40949
40950  windows_path="$new_path"
40951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40952    unix_path=`$CYGPATH -u "$windows_path"`
40953    new_path="$unix_path"
40954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40956    new_path="$unix_path"
40957  fi
40958
40959    # remove trailing .exe if any
40960    new_path="${new_path/%.exe/}"
40961
40962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40964  fi
40965
40966    else
40967      # We're on a unix platform. Hooray! :)
40968      # First separate the path from the arguments. This will split at the first
40969      # space.
40970      complete="$GNM"
40971      path="${complete%% *}"
40972      tmp="$complete EOL"
40973      arguments="${tmp#* }"
40974
40975      # Cannot rely on the command "which" here since it doesn't always work.
40976      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40977      if test -z "$is_absolute_path"; then
40978        # Path to executable is not absolute. Find it.
40979        IFS_save="$IFS"
40980        IFS=:
40981        for p in $PATH; do
40982          if test -f "$p/$path" && test -x "$p/$path"; then
40983            new_path="$p/$path"
40984            break
40985          fi
40986        done
40987        IFS="$IFS_save"
40988      else
40989        # This is an absolute path, we can use it without further modifications.
40990        new_path="$path"
40991      fi
40992
40993      if test "x$new_path" = x; then
40994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40995$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40996        has_space=`$ECHO "$complete" | $GREP " "`
40997        if test "x$has_space" != x; then
40998          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41000        fi
41001        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41002      fi
41003    fi
41004
41005    # Now join together the path and the arguments once again
41006    if test "x$arguments" != xEOL; then
41007      new_complete="$new_path ${arguments% *}"
41008    else
41009      new_complete="$new_path"
41010    fi
41011
41012    if test "x$complete" != "x$new_complete"; then
41013      GNM="$new_complete"
41014      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41015$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41016    fi
41017  fi
41018
41019  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41020    # FIXME: we should unify this with the solaris case above.
41021
41022
41023  # Publish this variable in the help.
41024
41025
41026  if [ -z "${STRIP+x}" ]; then
41027    # The variable is not set by user, try to locate tool using the code snippet
41028    if test -n "$ac_tool_prefix"; then
41029  for ac_prog in strip
41030  do
41031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41034$as_echo_n "checking for $ac_word... " >&6; }
41035if ${ac_cv_prog_STRIP+:} false; then :
41036  $as_echo_n "(cached) " >&6
41037else
41038  if test -n "$STRIP"; then
41039  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41040else
41041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41042for as_dir in $PATH
41043do
41044  IFS=$as_save_IFS
41045  test -z "$as_dir" && as_dir=.
41046    for ac_exec_ext in '' $ac_executable_extensions; do
41047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41048    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41050    break 2
41051  fi
41052done
41053  done
41054IFS=$as_save_IFS
41055
41056fi
41057fi
41058STRIP=$ac_cv_prog_STRIP
41059if test -n "$STRIP"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41061$as_echo "$STRIP" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068    test -n "$STRIP" && break
41069  done
41070fi
41071if test -z "$STRIP"; then
41072  ac_ct_STRIP=$STRIP
41073  for ac_prog in strip
41074do
41075  # Extract the first word of "$ac_prog", so it can be a program name with args.
41076set dummy $ac_prog; ac_word=$2
41077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41078$as_echo_n "checking for $ac_word... " >&6; }
41079if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41080  $as_echo_n "(cached) " >&6
41081else
41082  if test -n "$ac_ct_STRIP"; then
41083  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41084else
41085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41086for as_dir in $PATH
41087do
41088  IFS=$as_save_IFS
41089  test -z "$as_dir" && as_dir=.
41090    for ac_exec_ext in '' $ac_executable_extensions; do
41091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41092    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41094    break 2
41095  fi
41096done
41097  done
41098IFS=$as_save_IFS
41099
41100fi
41101fi
41102ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41103if test -n "$ac_ct_STRIP"; then
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41105$as_echo "$ac_ct_STRIP" >&6; }
41106else
41107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41108$as_echo "no" >&6; }
41109fi
41110
41111
41112  test -n "$ac_ct_STRIP" && break
41113done
41114
41115  if test "x$ac_ct_STRIP" = x; then
41116    STRIP=""
41117  else
41118    case $cross_compiling:$ac_tool_warned in
41119yes:)
41120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41122ac_tool_warned=yes ;;
41123esac
41124    STRIP=$ac_ct_STRIP
41125  fi
41126fi
41127
41128  else
41129    # The variable is set, but is it from the command line or the environment?
41130
41131    # Try to remove the string !STRIP! from our list.
41132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41134      # If it failed, the variable was not from the command line. Ignore it,
41135      # but warn the user (except for BASH, which is always set by the calling BASH).
41136      if test "xSTRIP" != xBASH; then
41137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41138$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41139      fi
41140      # Try to locate tool using the code snippet
41141      if test -n "$ac_tool_prefix"; then
41142  for ac_prog in strip
41143  do
41144    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41147$as_echo_n "checking for $ac_word... " >&6; }
41148if ${ac_cv_prog_STRIP+:} false; then :
41149  $as_echo_n "(cached) " >&6
41150else
41151  if test -n "$STRIP"; then
41152  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41153else
41154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41155for as_dir in $PATH
41156do
41157  IFS=$as_save_IFS
41158  test -z "$as_dir" && as_dir=.
41159    for ac_exec_ext in '' $ac_executable_extensions; do
41160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41161    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41163    break 2
41164  fi
41165done
41166  done
41167IFS=$as_save_IFS
41168
41169fi
41170fi
41171STRIP=$ac_cv_prog_STRIP
41172if test -n "$STRIP"; then
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41174$as_echo "$STRIP" >&6; }
41175else
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41177$as_echo "no" >&6; }
41178fi
41179
41180
41181    test -n "$STRIP" && break
41182  done
41183fi
41184if test -z "$STRIP"; then
41185  ac_ct_STRIP=$STRIP
41186  for ac_prog in strip
41187do
41188  # Extract the first word of "$ac_prog", so it can be a program name with args.
41189set dummy $ac_prog; ac_word=$2
41190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41191$as_echo_n "checking for $ac_word... " >&6; }
41192if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41193  $as_echo_n "(cached) " >&6
41194else
41195  if test -n "$ac_ct_STRIP"; then
41196  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41197else
41198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41199for as_dir in $PATH
41200do
41201  IFS=$as_save_IFS
41202  test -z "$as_dir" && as_dir=.
41203    for ac_exec_ext in '' $ac_executable_extensions; do
41204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41205    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41207    break 2
41208  fi
41209done
41210  done
41211IFS=$as_save_IFS
41212
41213fi
41214fi
41215ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41216if test -n "$ac_ct_STRIP"; then
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41218$as_echo "$ac_ct_STRIP" >&6; }
41219else
41220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41221$as_echo "no" >&6; }
41222fi
41223
41224
41225  test -n "$ac_ct_STRIP" && break
41226done
41227
41228  if test "x$ac_ct_STRIP" = x; then
41229    STRIP=""
41230  else
41231    case $cross_compiling:$ac_tool_warned in
41232yes:)
41233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41235ac_tool_warned=yes ;;
41236esac
41237    STRIP=$ac_ct_STRIP
41238  fi
41239fi
41240
41241    else
41242      # If it succeeded, then it was overridden by the user. We will use it
41243      # for the tool.
41244
41245      # First remove it from the list of overridden variables, so we can test
41246      # for unknown variables in the end.
41247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41248
41249      # Check if we try to supply an empty value
41250      if test "x$STRIP" = x; then
41251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41252$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41254$as_echo_n "checking for STRIP... " >&6; }
41255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41256$as_echo "disabled" >&6; }
41257      else
41258        # Check if the provided tool contains a complete path.
41259        tool_specified="$STRIP"
41260        tool_basename="${tool_specified##*/}"
41261        if test "x$tool_basename" = "x$tool_specified"; then
41262          # A command without a complete path is provided, search $PATH.
41263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41264$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41265          # Extract the first word of "$tool_basename", so it can be a program name with args.
41266set dummy $tool_basename; ac_word=$2
41267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41268$as_echo_n "checking for $ac_word... " >&6; }
41269if ${ac_cv_path_STRIP+:} false; then :
41270  $as_echo_n "(cached) " >&6
41271else
41272  case $STRIP in
41273  [\\/]* | ?:[\\/]*)
41274  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41275  ;;
41276  *)
41277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41278for as_dir in $PATH
41279do
41280  IFS=$as_save_IFS
41281  test -z "$as_dir" && as_dir=.
41282    for ac_exec_ext in '' $ac_executable_extensions; do
41283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41284    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41286    break 2
41287  fi
41288done
41289  done
41290IFS=$as_save_IFS
41291
41292  ;;
41293esac
41294fi
41295STRIP=$ac_cv_path_STRIP
41296if test -n "$STRIP"; then
41297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41298$as_echo "$STRIP" >&6; }
41299else
41300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41301$as_echo "no" >&6; }
41302fi
41303
41304
41305          if test "x$STRIP" = x; then
41306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41307          fi
41308        else
41309          # Otherwise we believe it is a complete path. Use it as it is.
41310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41311$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41313$as_echo_n "checking for STRIP... " >&6; }
41314          if test ! -x "$tool_specified"; then
41315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41316$as_echo "not found" >&6; }
41317            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41318          fi
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41320$as_echo "$tool_specified" >&6; }
41321        fi
41322      fi
41323    fi
41324
41325  fi
41326
41327
41328
41329  # Only process if variable expands to non-empty
41330
41331  if test "x$STRIP" != x; then
41332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41333
41334  # First separate the path from the arguments. This will split at the first
41335  # space.
41336  complete="$STRIP"
41337  path="${complete%% *}"
41338  tmp="$complete EOL"
41339  arguments="${tmp#* }"
41340
41341  # Input might be given as Windows format, start by converting to
41342  # unix format.
41343  new_path=`$CYGPATH -u "$path"`
41344
41345  # Now try to locate executable using which
41346  new_path=`$WHICH "$new_path" 2> /dev/null`
41347  # bat and cmd files are not always considered executable in cygwin causing which
41348  # to not find them
41349  if test "x$new_path" = x \
41350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41352    new_path=`$CYGPATH -u "$path"`
41353  fi
41354  if test "x$new_path" = x; then
41355    # Oops. Which didn't find the executable.
41356    # The splitting of arguments from the executable at a space might have been incorrect,
41357    # since paths with space are more likely in Windows. Give it another try with the whole
41358    # argument.
41359    path="$complete"
41360    arguments="EOL"
41361    new_path=`$CYGPATH -u "$path"`
41362    new_path=`$WHICH "$new_path" 2> /dev/null`
41363    # bat and cmd files are not always considered executable in cygwin causing which
41364    # to not find them
41365    if test "x$new_path" = x \
41366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41368      new_path=`$CYGPATH -u "$path"`
41369    fi
41370    if test "x$new_path" = x; then
41371      # It's still not found. Now this is an unrecoverable error.
41372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41373$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41374      has_space=`$ECHO "$complete" | $GREP " "`
41375      if test "x$has_space" != x; then
41376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41378      fi
41379      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41380    fi
41381  fi
41382
41383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41386  # "foo.exe" is OK but "foo" is an error.
41387  #
41388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41389  # It is also a way to make sure we got the proper file name for the real test later on.
41390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41391  if test "x$test_shortpath" = x; then
41392    # Short path failed, file does not exist as specified.
41393    # Try adding .exe or .cmd
41394    if test -f "${new_path}.exe"; then
41395      input_to_shortpath="${new_path}.exe"
41396    elif test -f "${new_path}.cmd"; then
41397      input_to_shortpath="${new_path}.cmd"
41398    else
41399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41400$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41403      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41404    fi
41405  else
41406    input_to_shortpath="$new_path"
41407  fi
41408
41409  # Call helper function which possibly converts this using DOS-style short mode.
41410  # If so, the updated path is stored in $new_path.
41411  new_path="$input_to_shortpath"
41412
41413  input_path="$input_to_shortpath"
41414  # Check if we need to convert this using DOS-style short mode. If the path
41415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41416  # take no chances and rewrite it.
41417  # Note: m4 eats our [], so we need to use [ and ] instead.
41418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41419  if test "x$has_forbidden_chars" != x; then
41420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41424      # Going to short mode and back again did indeed matter. Since short mode is
41425      # case insensitive, let's make it lowercase to improve readability.
41426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41427      # Now convert it back to Unix-style (cygpath)
41428      input_path=`$CYGPATH -u "$shortmode_path"`
41429      new_path="$input_path"
41430    fi
41431  fi
41432
41433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41434  if test "x$test_cygdrive_prefix" = x; then
41435    # As a simple fix, exclude /usr/bin since it's not a real path.
41436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41438      # a path prefixed by /cygdrive for fixpath to work.
41439      new_path="$CYGWIN_ROOT_PATH$input_path"
41440    fi
41441  fi
41442
41443  # remove trailing .exe if any
41444  new_path="${new_path/%.exe/}"
41445
41446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41447
41448  # First separate the path from the arguments. This will split at the first
41449  # space.
41450  complete="$STRIP"
41451  path="${complete%% *}"
41452  tmp="$complete EOL"
41453  arguments="${tmp#* }"
41454
41455  # Input might be given as Windows format, start by converting to
41456  # unix format.
41457  new_path="$path"
41458
41459  windows_path="$new_path"
41460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41461    unix_path=`$CYGPATH -u "$windows_path"`
41462    new_path="$unix_path"
41463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41465    new_path="$unix_path"
41466  fi
41467
41468
41469  # Now try to locate executable using which
41470  new_path=`$WHICH "$new_path" 2> /dev/null`
41471
41472  if test "x$new_path" = x; then
41473    # Oops. Which didn't find the executable.
41474    # The splitting of arguments from the executable at a space might have been incorrect,
41475    # since paths with space are more likely in Windows. Give it another try with the whole
41476    # argument.
41477    path="$complete"
41478    arguments="EOL"
41479    new_path="$path"
41480
41481  windows_path="$new_path"
41482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41483    unix_path=`$CYGPATH -u "$windows_path"`
41484    new_path="$unix_path"
41485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41487    new_path="$unix_path"
41488  fi
41489
41490
41491    new_path=`$WHICH "$new_path" 2> /dev/null`
41492    # bat and cmd files are not always considered executable in MSYS causing which
41493    # to not find them
41494    if test "x$new_path" = x \
41495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41497      new_path="$path"
41498
41499  windows_path="$new_path"
41500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41501    unix_path=`$CYGPATH -u "$windows_path"`
41502    new_path="$unix_path"
41503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41505    new_path="$unix_path"
41506  fi
41507
41508    fi
41509
41510    if test "x$new_path" = x; then
41511      # It's still not found. Now this is an unrecoverable error.
41512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41513$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41514      has_space=`$ECHO "$complete" | $GREP " "`
41515      if test "x$has_space" != x; then
41516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41518      fi
41519      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41520    fi
41521  fi
41522
41523  # Now new_path has a complete unix path to the binary
41524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41525    # Keep paths in /bin as-is, but remove trailing .exe if any
41526    new_path="${new_path/%.exe/}"
41527    # Do not save /bin paths to all_fixpath_prefixes!
41528  else
41529    # Not in mixed or Windows style, start by that.
41530    new_path=`cmd //c echo $new_path`
41531
41532  input_path="$new_path"
41533  # Check if we need to convert this using DOS-style short mode. If the path
41534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41535  # take no chances and rewrite it.
41536  # Note: m4 eats our [], so we need to use [ and ] instead.
41537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41538  if test "x$has_forbidden_chars" != x; then
41539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41541  fi
41542
41543    # Output is in $new_path
41544
41545  windows_path="$new_path"
41546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41547    unix_path=`$CYGPATH -u "$windows_path"`
41548    new_path="$unix_path"
41549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41551    new_path="$unix_path"
41552  fi
41553
41554    # remove trailing .exe if any
41555    new_path="${new_path/%.exe/}"
41556
41557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41559  fi
41560
41561    else
41562      # We're on a unix platform. Hooray! :)
41563      # First separate the path from the arguments. This will split at the first
41564      # space.
41565      complete="$STRIP"
41566      path="${complete%% *}"
41567      tmp="$complete EOL"
41568      arguments="${tmp#* }"
41569
41570      # Cannot rely on the command "which" here since it doesn't always work.
41571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41572      if test -z "$is_absolute_path"; then
41573        # Path to executable is not absolute. Find it.
41574        IFS_save="$IFS"
41575        IFS=:
41576        for p in $PATH; do
41577          if test -f "$p/$path" && test -x "$p/$path"; then
41578            new_path="$p/$path"
41579            break
41580          fi
41581        done
41582        IFS="$IFS_save"
41583      else
41584        # This is an absolute path, we can use it without further modifications.
41585        new_path="$path"
41586      fi
41587
41588      if test "x$new_path" = x; then
41589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41590$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41591        has_space=`$ECHO "$complete" | $GREP " "`
41592        if test "x$has_space" != x; then
41593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41595        fi
41596        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41597      fi
41598    fi
41599
41600    # Now join together the path and the arguments once again
41601    if test "x$arguments" != xEOL; then
41602      new_complete="$new_path ${arguments% *}"
41603    else
41604      new_complete="$new_path"
41605    fi
41606
41607    if test "x$complete" != "x$new_complete"; then
41608      STRIP="$new_complete"
41609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41610$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41611    fi
41612  fi
41613
41614    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41615
41616
41617  # Publish this variable in the help.
41618
41619
41620  if [ -z "${NM+x}" ]; then
41621    # The variable is not set by user, try to locate tool using the code snippet
41622    if test -n "$ac_tool_prefix"; then
41623  for ac_prog in nm gcc-nm
41624  do
41625    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41626set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41628$as_echo_n "checking for $ac_word... " >&6; }
41629if ${ac_cv_prog_NM+:} false; then :
41630  $as_echo_n "(cached) " >&6
41631else
41632  if test -n "$NM"; then
41633  ac_cv_prog_NM="$NM" # Let the user override the test.
41634else
41635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41636for as_dir in $PATH
41637do
41638  IFS=$as_save_IFS
41639  test -z "$as_dir" && as_dir=.
41640    for ac_exec_ext in '' $ac_executable_extensions; do
41641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41642    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41644    break 2
41645  fi
41646done
41647  done
41648IFS=$as_save_IFS
41649
41650fi
41651fi
41652NM=$ac_cv_prog_NM
41653if test -n "$NM"; then
41654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41655$as_echo "$NM" >&6; }
41656else
41657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41658$as_echo "no" >&6; }
41659fi
41660
41661
41662    test -n "$NM" && break
41663  done
41664fi
41665if test -z "$NM"; then
41666  ac_ct_NM=$NM
41667  for ac_prog in nm gcc-nm
41668do
41669  # Extract the first word of "$ac_prog", so it can be a program name with args.
41670set dummy $ac_prog; ac_word=$2
41671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41672$as_echo_n "checking for $ac_word... " >&6; }
41673if ${ac_cv_prog_ac_ct_NM+:} false; then :
41674  $as_echo_n "(cached) " >&6
41675else
41676  if test -n "$ac_ct_NM"; then
41677  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41678else
41679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41680for as_dir in $PATH
41681do
41682  IFS=$as_save_IFS
41683  test -z "$as_dir" && as_dir=.
41684    for ac_exec_ext in '' $ac_executable_extensions; do
41685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41686    ac_cv_prog_ac_ct_NM="$ac_prog"
41687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41688    break 2
41689  fi
41690done
41691  done
41692IFS=$as_save_IFS
41693
41694fi
41695fi
41696ac_ct_NM=$ac_cv_prog_ac_ct_NM
41697if test -n "$ac_ct_NM"; then
41698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41699$as_echo "$ac_ct_NM" >&6; }
41700else
41701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41702$as_echo "no" >&6; }
41703fi
41704
41705
41706  test -n "$ac_ct_NM" && break
41707done
41708
41709  if test "x$ac_ct_NM" = x; then
41710    NM=""
41711  else
41712    case $cross_compiling:$ac_tool_warned in
41713yes:)
41714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41716ac_tool_warned=yes ;;
41717esac
41718    NM=$ac_ct_NM
41719  fi
41720fi
41721
41722  else
41723    # The variable is set, but is it from the command line or the environment?
41724
41725    # Try to remove the string !NM! from our list.
41726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41728      # If it failed, the variable was not from the command line. Ignore it,
41729      # but warn the user (except for BASH, which is always set by the calling BASH).
41730      if test "xNM" != xBASH; then
41731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41732$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41733      fi
41734      # Try to locate tool using the code snippet
41735      if test -n "$ac_tool_prefix"; then
41736  for ac_prog in nm gcc-nm
41737  do
41738    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41741$as_echo_n "checking for $ac_word... " >&6; }
41742if ${ac_cv_prog_NM+:} false; then :
41743  $as_echo_n "(cached) " >&6
41744else
41745  if test -n "$NM"; then
41746  ac_cv_prog_NM="$NM" # Let the user override the test.
41747else
41748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41749for as_dir in $PATH
41750do
41751  IFS=$as_save_IFS
41752  test -z "$as_dir" && as_dir=.
41753    for ac_exec_ext in '' $ac_executable_extensions; do
41754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41755    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41757    break 2
41758  fi
41759done
41760  done
41761IFS=$as_save_IFS
41762
41763fi
41764fi
41765NM=$ac_cv_prog_NM
41766if test -n "$NM"; then
41767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41768$as_echo "$NM" >&6; }
41769else
41770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41771$as_echo "no" >&6; }
41772fi
41773
41774
41775    test -n "$NM" && break
41776  done
41777fi
41778if test -z "$NM"; then
41779  ac_ct_NM=$NM
41780  for ac_prog in nm gcc-nm
41781do
41782  # Extract the first word of "$ac_prog", so it can be a program name with args.
41783set dummy $ac_prog; ac_word=$2
41784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41785$as_echo_n "checking for $ac_word... " >&6; }
41786if ${ac_cv_prog_ac_ct_NM+:} false; then :
41787  $as_echo_n "(cached) " >&6
41788else
41789  if test -n "$ac_ct_NM"; then
41790  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41791else
41792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41793for as_dir in $PATH
41794do
41795  IFS=$as_save_IFS
41796  test -z "$as_dir" && as_dir=.
41797    for ac_exec_ext in '' $ac_executable_extensions; do
41798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41799    ac_cv_prog_ac_ct_NM="$ac_prog"
41800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41801    break 2
41802  fi
41803done
41804  done
41805IFS=$as_save_IFS
41806
41807fi
41808fi
41809ac_ct_NM=$ac_cv_prog_ac_ct_NM
41810if test -n "$ac_ct_NM"; then
41811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41812$as_echo "$ac_ct_NM" >&6; }
41813else
41814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41815$as_echo "no" >&6; }
41816fi
41817
41818
41819  test -n "$ac_ct_NM" && break
41820done
41821
41822  if test "x$ac_ct_NM" = x; then
41823    NM=""
41824  else
41825    case $cross_compiling:$ac_tool_warned in
41826yes:)
41827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41829ac_tool_warned=yes ;;
41830esac
41831    NM=$ac_ct_NM
41832  fi
41833fi
41834
41835    else
41836      # If it succeeded, then it was overridden by the user. We will use it
41837      # for the tool.
41838
41839      # First remove it from the list of overridden variables, so we can test
41840      # for unknown variables in the end.
41841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41842
41843      # Check if we try to supply an empty value
41844      if test "x$NM" = x; then
41845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41846$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41848$as_echo_n "checking for NM... " >&6; }
41849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41850$as_echo "disabled" >&6; }
41851      else
41852        # Check if the provided tool contains a complete path.
41853        tool_specified="$NM"
41854        tool_basename="${tool_specified##*/}"
41855        if test "x$tool_basename" = "x$tool_specified"; then
41856          # A command without a complete path is provided, search $PATH.
41857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41858$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41859          # Extract the first word of "$tool_basename", so it can be a program name with args.
41860set dummy $tool_basename; ac_word=$2
41861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41862$as_echo_n "checking for $ac_word... " >&6; }
41863if ${ac_cv_path_NM+:} false; then :
41864  $as_echo_n "(cached) " >&6
41865else
41866  case $NM in
41867  [\\/]* | ?:[\\/]*)
41868  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41869  ;;
41870  *)
41871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41872for as_dir in $PATH
41873do
41874  IFS=$as_save_IFS
41875  test -z "$as_dir" && as_dir=.
41876    for ac_exec_ext in '' $ac_executable_extensions; do
41877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41878    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41880    break 2
41881  fi
41882done
41883  done
41884IFS=$as_save_IFS
41885
41886  ;;
41887esac
41888fi
41889NM=$ac_cv_path_NM
41890if test -n "$NM"; then
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41892$as_echo "$NM" >&6; }
41893else
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41895$as_echo "no" >&6; }
41896fi
41897
41898
41899          if test "x$NM" = x; then
41900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41901          fi
41902        else
41903          # Otherwise we believe it is a complete path. Use it as it is.
41904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41905$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41907$as_echo_n "checking for NM... " >&6; }
41908          if test ! -x "$tool_specified"; then
41909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41910$as_echo "not found" >&6; }
41911            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41912          fi
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41914$as_echo "$tool_specified" >&6; }
41915        fi
41916      fi
41917    fi
41918
41919  fi
41920
41921
41922    else
41923
41924
41925  # Publish this variable in the help.
41926
41927
41928  if [ -z "${NM+x}" ]; then
41929    # The variable is not set by user, try to locate tool using the code snippet
41930    if test -n "$ac_tool_prefix"; then
41931  for ac_prog in nm
41932  do
41933    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41934set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41936$as_echo_n "checking for $ac_word... " >&6; }
41937if ${ac_cv_prog_NM+:} false; then :
41938  $as_echo_n "(cached) " >&6
41939else
41940  if test -n "$NM"; then
41941  ac_cv_prog_NM="$NM" # Let the user override the test.
41942else
41943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41944for as_dir in $PATH
41945do
41946  IFS=$as_save_IFS
41947  test -z "$as_dir" && as_dir=.
41948    for ac_exec_ext in '' $ac_executable_extensions; do
41949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41950    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41952    break 2
41953  fi
41954done
41955  done
41956IFS=$as_save_IFS
41957
41958fi
41959fi
41960NM=$ac_cv_prog_NM
41961if test -n "$NM"; then
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41963$as_echo "$NM" >&6; }
41964else
41965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966$as_echo "no" >&6; }
41967fi
41968
41969
41970    test -n "$NM" && break
41971  done
41972fi
41973if test -z "$NM"; then
41974  ac_ct_NM=$NM
41975  for ac_prog in nm
41976do
41977  # Extract the first word of "$ac_prog", so it can be a program name with args.
41978set dummy $ac_prog; ac_word=$2
41979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41980$as_echo_n "checking for $ac_word... " >&6; }
41981if ${ac_cv_prog_ac_ct_NM+:} false; then :
41982  $as_echo_n "(cached) " >&6
41983else
41984  if test -n "$ac_ct_NM"; then
41985  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41986else
41987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41988for as_dir in $PATH
41989do
41990  IFS=$as_save_IFS
41991  test -z "$as_dir" && as_dir=.
41992    for ac_exec_ext in '' $ac_executable_extensions; do
41993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41994    ac_cv_prog_ac_ct_NM="$ac_prog"
41995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41996    break 2
41997  fi
41998done
41999  done
42000IFS=$as_save_IFS
42001
42002fi
42003fi
42004ac_ct_NM=$ac_cv_prog_ac_ct_NM
42005if test -n "$ac_ct_NM"; then
42006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42007$as_echo "$ac_ct_NM" >&6; }
42008else
42009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42010$as_echo "no" >&6; }
42011fi
42012
42013
42014  test -n "$ac_ct_NM" && break
42015done
42016
42017  if test "x$ac_ct_NM" = x; then
42018    NM=""
42019  else
42020    case $cross_compiling:$ac_tool_warned in
42021yes:)
42022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42024ac_tool_warned=yes ;;
42025esac
42026    NM=$ac_ct_NM
42027  fi
42028fi
42029
42030  else
42031    # The variable is set, but is it from the command line or the environment?
42032
42033    # Try to remove the string !NM! from our list.
42034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42036      # If it failed, the variable was not from the command line. Ignore it,
42037      # but warn the user (except for BASH, which is always set by the calling BASH).
42038      if test "xNM" != xBASH; then
42039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42040$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42041      fi
42042      # Try to locate tool using the code snippet
42043      if test -n "$ac_tool_prefix"; then
42044  for ac_prog in nm
42045  do
42046    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42049$as_echo_n "checking for $ac_word... " >&6; }
42050if ${ac_cv_prog_NM+:} false; then :
42051  $as_echo_n "(cached) " >&6
42052else
42053  if test -n "$NM"; then
42054  ac_cv_prog_NM="$NM" # Let the user override the test.
42055else
42056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42057for as_dir in $PATH
42058do
42059  IFS=$as_save_IFS
42060  test -z "$as_dir" && as_dir=.
42061    for ac_exec_ext in '' $ac_executable_extensions; do
42062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42063    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42065    break 2
42066  fi
42067done
42068  done
42069IFS=$as_save_IFS
42070
42071fi
42072fi
42073NM=$ac_cv_prog_NM
42074if test -n "$NM"; then
42075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42076$as_echo "$NM" >&6; }
42077else
42078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42079$as_echo "no" >&6; }
42080fi
42081
42082
42083    test -n "$NM" && break
42084  done
42085fi
42086if test -z "$NM"; then
42087  ac_ct_NM=$NM
42088  for ac_prog in nm
42089do
42090  # Extract the first word of "$ac_prog", so it can be a program name with args.
42091set dummy $ac_prog; ac_word=$2
42092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42093$as_echo_n "checking for $ac_word... " >&6; }
42094if ${ac_cv_prog_ac_ct_NM+:} false; then :
42095  $as_echo_n "(cached) " >&6
42096else
42097  if test -n "$ac_ct_NM"; then
42098  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42099else
42100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42101for as_dir in $PATH
42102do
42103  IFS=$as_save_IFS
42104  test -z "$as_dir" && as_dir=.
42105    for ac_exec_ext in '' $ac_executable_extensions; do
42106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42107    ac_cv_prog_ac_ct_NM="$ac_prog"
42108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42109    break 2
42110  fi
42111done
42112  done
42113IFS=$as_save_IFS
42114
42115fi
42116fi
42117ac_ct_NM=$ac_cv_prog_ac_ct_NM
42118if test -n "$ac_ct_NM"; then
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42120$as_echo "$ac_ct_NM" >&6; }
42121else
42122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42123$as_echo "no" >&6; }
42124fi
42125
42126
42127  test -n "$ac_ct_NM" && break
42128done
42129
42130  if test "x$ac_ct_NM" = x; then
42131    NM=""
42132  else
42133    case $cross_compiling:$ac_tool_warned in
42134yes:)
42135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42137ac_tool_warned=yes ;;
42138esac
42139    NM=$ac_ct_NM
42140  fi
42141fi
42142
42143    else
42144      # If it succeeded, then it was overridden by the user. We will use it
42145      # for the tool.
42146
42147      # First remove it from the list of overridden variables, so we can test
42148      # for unknown variables in the end.
42149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42150
42151      # Check if we try to supply an empty value
42152      if test "x$NM" = x; then
42153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42154$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42156$as_echo_n "checking for NM... " >&6; }
42157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42158$as_echo "disabled" >&6; }
42159      else
42160        # Check if the provided tool contains a complete path.
42161        tool_specified="$NM"
42162        tool_basename="${tool_specified##*/}"
42163        if test "x$tool_basename" = "x$tool_specified"; then
42164          # A command without a complete path is provided, search $PATH.
42165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42166$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42167          # Extract the first word of "$tool_basename", so it can be a program name with args.
42168set dummy $tool_basename; ac_word=$2
42169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42170$as_echo_n "checking for $ac_word... " >&6; }
42171if ${ac_cv_path_NM+:} false; then :
42172  $as_echo_n "(cached) " >&6
42173else
42174  case $NM in
42175  [\\/]* | ?:[\\/]*)
42176  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42177  ;;
42178  *)
42179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42180for as_dir in $PATH
42181do
42182  IFS=$as_save_IFS
42183  test -z "$as_dir" && as_dir=.
42184    for ac_exec_ext in '' $ac_executable_extensions; do
42185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42186    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42188    break 2
42189  fi
42190done
42191  done
42192IFS=$as_save_IFS
42193
42194  ;;
42195esac
42196fi
42197NM=$ac_cv_path_NM
42198if test -n "$NM"; then
42199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42200$as_echo "$NM" >&6; }
42201else
42202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42203$as_echo "no" >&6; }
42204fi
42205
42206
42207          if test "x$NM" = x; then
42208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42209          fi
42210        else
42211          # Otherwise we believe it is a complete path. Use it as it is.
42212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42213$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42215$as_echo_n "checking for NM... " >&6; }
42216          if test ! -x "$tool_specified"; then
42217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42218$as_echo "not found" >&6; }
42219            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42220          fi
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42222$as_echo "$tool_specified" >&6; }
42223        fi
42224      fi
42225    fi
42226
42227  fi
42228
42229
42230    fi
42231
42232  # Only process if variable expands to non-empty
42233
42234  if test "x$NM" != x; then
42235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42236
42237  # First separate the path from the arguments. This will split at the first
42238  # space.
42239  complete="$NM"
42240  path="${complete%% *}"
42241  tmp="$complete EOL"
42242  arguments="${tmp#* }"
42243
42244  # Input might be given as Windows format, start by converting to
42245  # unix format.
42246  new_path=`$CYGPATH -u "$path"`
42247
42248  # Now try to locate executable using which
42249  new_path=`$WHICH "$new_path" 2> /dev/null`
42250  # bat and cmd files are not always considered executable in cygwin causing which
42251  # to not find them
42252  if test "x$new_path" = x \
42253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42255    new_path=`$CYGPATH -u "$path"`
42256  fi
42257  if test "x$new_path" = x; then
42258    # Oops. Which didn't find the executable.
42259    # The splitting of arguments from the executable at a space might have been incorrect,
42260    # since paths with space are more likely in Windows. Give it another try with the whole
42261    # argument.
42262    path="$complete"
42263    arguments="EOL"
42264    new_path=`$CYGPATH -u "$path"`
42265    new_path=`$WHICH "$new_path" 2> /dev/null`
42266    # bat and cmd files are not always considered executable in cygwin causing which
42267    # to not find them
42268    if test "x$new_path" = x \
42269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42271      new_path=`$CYGPATH -u "$path"`
42272    fi
42273    if test "x$new_path" = x; then
42274      # It's still not found. Now this is an unrecoverable error.
42275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42276$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42277      has_space=`$ECHO "$complete" | $GREP " "`
42278      if test "x$has_space" != x; then
42279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42281      fi
42282      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42283    fi
42284  fi
42285
42286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42289  # "foo.exe" is OK but "foo" is an error.
42290  #
42291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42292  # It is also a way to make sure we got the proper file name for the real test later on.
42293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42294  if test "x$test_shortpath" = x; then
42295    # Short path failed, file does not exist as specified.
42296    # Try adding .exe or .cmd
42297    if test -f "${new_path}.exe"; then
42298      input_to_shortpath="${new_path}.exe"
42299    elif test -f "${new_path}.cmd"; then
42300      input_to_shortpath="${new_path}.cmd"
42301    else
42302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42303$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42306      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42307    fi
42308  else
42309    input_to_shortpath="$new_path"
42310  fi
42311
42312  # Call helper function which possibly converts this using DOS-style short mode.
42313  # If so, the updated path is stored in $new_path.
42314  new_path="$input_to_shortpath"
42315
42316  input_path="$input_to_shortpath"
42317  # Check if we need to convert this using DOS-style short mode. If the path
42318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42319  # take no chances and rewrite it.
42320  # Note: m4 eats our [], so we need to use [ and ] instead.
42321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42322  if test "x$has_forbidden_chars" != x; then
42323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42327      # Going to short mode and back again did indeed matter. Since short mode is
42328      # case insensitive, let's make it lowercase to improve readability.
42329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42330      # Now convert it back to Unix-style (cygpath)
42331      input_path=`$CYGPATH -u "$shortmode_path"`
42332      new_path="$input_path"
42333    fi
42334  fi
42335
42336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42337  if test "x$test_cygdrive_prefix" = x; then
42338    # As a simple fix, exclude /usr/bin since it's not a real path.
42339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42341      # a path prefixed by /cygdrive for fixpath to work.
42342      new_path="$CYGWIN_ROOT_PATH$input_path"
42343    fi
42344  fi
42345
42346  # remove trailing .exe if any
42347  new_path="${new_path/%.exe/}"
42348
42349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42350
42351  # First separate the path from the arguments. This will split at the first
42352  # space.
42353  complete="$NM"
42354  path="${complete%% *}"
42355  tmp="$complete EOL"
42356  arguments="${tmp#* }"
42357
42358  # Input might be given as Windows format, start by converting to
42359  # unix format.
42360  new_path="$path"
42361
42362  windows_path="$new_path"
42363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42364    unix_path=`$CYGPATH -u "$windows_path"`
42365    new_path="$unix_path"
42366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42368    new_path="$unix_path"
42369  fi
42370
42371
42372  # Now try to locate executable using which
42373  new_path=`$WHICH "$new_path" 2> /dev/null`
42374
42375  if test "x$new_path" = x; then
42376    # Oops. Which didn't find the executable.
42377    # The splitting of arguments from the executable at a space might have been incorrect,
42378    # since paths with space are more likely in Windows. Give it another try with the whole
42379    # argument.
42380    path="$complete"
42381    arguments="EOL"
42382    new_path="$path"
42383
42384  windows_path="$new_path"
42385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42386    unix_path=`$CYGPATH -u "$windows_path"`
42387    new_path="$unix_path"
42388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42390    new_path="$unix_path"
42391  fi
42392
42393
42394    new_path=`$WHICH "$new_path" 2> /dev/null`
42395    # bat and cmd files are not always considered executable in MSYS causing which
42396    # to not find them
42397    if test "x$new_path" = x \
42398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42400      new_path="$path"
42401
42402  windows_path="$new_path"
42403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42404    unix_path=`$CYGPATH -u "$windows_path"`
42405    new_path="$unix_path"
42406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42408    new_path="$unix_path"
42409  fi
42410
42411    fi
42412
42413    if test "x$new_path" = x; then
42414      # It's still not found. Now this is an unrecoverable error.
42415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42416$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42417      has_space=`$ECHO "$complete" | $GREP " "`
42418      if test "x$has_space" != x; then
42419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42421      fi
42422      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42423    fi
42424  fi
42425
42426  # Now new_path has a complete unix path to the binary
42427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42428    # Keep paths in /bin as-is, but remove trailing .exe if any
42429    new_path="${new_path/%.exe/}"
42430    # Do not save /bin paths to all_fixpath_prefixes!
42431  else
42432    # Not in mixed or Windows style, start by that.
42433    new_path=`cmd //c echo $new_path`
42434
42435  input_path="$new_path"
42436  # Check if we need to convert this using DOS-style short mode. If the path
42437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42438  # take no chances and rewrite it.
42439  # Note: m4 eats our [], so we need to use [ and ] instead.
42440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42441  if test "x$has_forbidden_chars" != x; then
42442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42444  fi
42445
42446    # Output is in $new_path
42447
42448  windows_path="$new_path"
42449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42450    unix_path=`$CYGPATH -u "$windows_path"`
42451    new_path="$unix_path"
42452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42454    new_path="$unix_path"
42455  fi
42456
42457    # remove trailing .exe if any
42458    new_path="${new_path/%.exe/}"
42459
42460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42462  fi
42463
42464    else
42465      # We're on a unix platform. Hooray! :)
42466      # First separate the path from the arguments. This will split at the first
42467      # space.
42468      complete="$NM"
42469      path="${complete%% *}"
42470      tmp="$complete EOL"
42471      arguments="${tmp#* }"
42472
42473      # Cannot rely on the command "which" here since it doesn't always work.
42474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42475      if test -z "$is_absolute_path"; then
42476        # Path to executable is not absolute. Find it.
42477        IFS_save="$IFS"
42478        IFS=:
42479        for p in $PATH; do
42480          if test -f "$p/$path" && test -x "$p/$path"; then
42481            new_path="$p/$path"
42482            break
42483          fi
42484        done
42485        IFS="$IFS_save"
42486      else
42487        # This is an absolute path, we can use it without further modifications.
42488        new_path="$path"
42489      fi
42490
42491      if test "x$new_path" = x; then
42492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42493$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42494        has_space=`$ECHO "$complete" | $GREP " "`
42495        if test "x$has_space" != x; then
42496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42498        fi
42499        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42500      fi
42501    fi
42502
42503    # Now join together the path and the arguments once again
42504    if test "x$arguments" != xEOL; then
42505      new_complete="$new_path ${arguments% *}"
42506    else
42507      new_complete="$new_path"
42508    fi
42509
42510    if test "x$complete" != "x$new_complete"; then
42511      NM="$new_complete"
42512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42513$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42514    fi
42515  fi
42516
42517    GNM="$NM"
42518
42519  fi
42520
42521  # objcopy is used for moving debug symbols to separate files when
42522  # full debug symbols are enabled.
42523  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42524
42525
42526  # Publish this variable in the help.
42527
42528
42529  if [ -z "${OBJCOPY+x}" ]; then
42530    # The variable is not set by user, try to locate tool using the code snippet
42531    if test -n "$ac_tool_prefix"; then
42532  for ac_prog in gobjcopy objcopy
42533  do
42534    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42535set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42537$as_echo_n "checking for $ac_word... " >&6; }
42538if ${ac_cv_prog_OBJCOPY+:} false; then :
42539  $as_echo_n "(cached) " >&6
42540else
42541  if test -n "$OBJCOPY"; then
42542  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42543else
42544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42545for as_dir in $PATH
42546do
42547  IFS=$as_save_IFS
42548  test -z "$as_dir" && as_dir=.
42549    for ac_exec_ext in '' $ac_executable_extensions; do
42550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42551    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42553    break 2
42554  fi
42555done
42556  done
42557IFS=$as_save_IFS
42558
42559fi
42560fi
42561OBJCOPY=$ac_cv_prog_OBJCOPY
42562if test -n "$OBJCOPY"; then
42563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42564$as_echo "$OBJCOPY" >&6; }
42565else
42566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42567$as_echo "no" >&6; }
42568fi
42569
42570
42571    test -n "$OBJCOPY" && break
42572  done
42573fi
42574if test -z "$OBJCOPY"; then
42575  ac_ct_OBJCOPY=$OBJCOPY
42576  for ac_prog in gobjcopy objcopy
42577do
42578  # Extract the first word of "$ac_prog", so it can be a program name with args.
42579set dummy $ac_prog; ac_word=$2
42580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42581$as_echo_n "checking for $ac_word... " >&6; }
42582if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42583  $as_echo_n "(cached) " >&6
42584else
42585  if test -n "$ac_ct_OBJCOPY"; then
42586  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42587else
42588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42589for as_dir in $PATH
42590do
42591  IFS=$as_save_IFS
42592  test -z "$as_dir" && as_dir=.
42593    for ac_exec_ext in '' $ac_executable_extensions; do
42594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42595    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42597    break 2
42598  fi
42599done
42600  done
42601IFS=$as_save_IFS
42602
42603fi
42604fi
42605ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42606if test -n "$ac_ct_OBJCOPY"; then
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42608$as_echo "$ac_ct_OBJCOPY" >&6; }
42609else
42610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42611$as_echo "no" >&6; }
42612fi
42613
42614
42615  test -n "$ac_ct_OBJCOPY" && break
42616done
42617
42618  if test "x$ac_ct_OBJCOPY" = x; then
42619    OBJCOPY=""
42620  else
42621    case $cross_compiling:$ac_tool_warned in
42622yes:)
42623{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42624$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42625ac_tool_warned=yes ;;
42626esac
42627    OBJCOPY=$ac_ct_OBJCOPY
42628  fi
42629fi
42630
42631  else
42632    # The variable is set, but is it from the command line or the environment?
42633
42634    # Try to remove the string !OBJCOPY! from our list.
42635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42637      # If it failed, the variable was not from the command line. Ignore it,
42638      # but warn the user (except for BASH, which is always set by the calling BASH).
42639      if test "xOBJCOPY" != xBASH; then
42640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42641$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42642      fi
42643      # Try to locate tool using the code snippet
42644      if test -n "$ac_tool_prefix"; then
42645  for ac_prog in gobjcopy objcopy
42646  do
42647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42650$as_echo_n "checking for $ac_word... " >&6; }
42651if ${ac_cv_prog_OBJCOPY+:} false; then :
42652  $as_echo_n "(cached) " >&6
42653else
42654  if test -n "$OBJCOPY"; then
42655  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42656else
42657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42658for as_dir in $PATH
42659do
42660  IFS=$as_save_IFS
42661  test -z "$as_dir" && as_dir=.
42662    for ac_exec_ext in '' $ac_executable_extensions; do
42663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42664    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42666    break 2
42667  fi
42668done
42669  done
42670IFS=$as_save_IFS
42671
42672fi
42673fi
42674OBJCOPY=$ac_cv_prog_OBJCOPY
42675if test -n "$OBJCOPY"; then
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42677$as_echo "$OBJCOPY" >&6; }
42678else
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680$as_echo "no" >&6; }
42681fi
42682
42683
42684    test -n "$OBJCOPY" && break
42685  done
42686fi
42687if test -z "$OBJCOPY"; then
42688  ac_ct_OBJCOPY=$OBJCOPY
42689  for ac_prog in gobjcopy objcopy
42690do
42691  # Extract the first word of "$ac_prog", so it can be a program name with args.
42692set dummy $ac_prog; ac_word=$2
42693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42694$as_echo_n "checking for $ac_word... " >&6; }
42695if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42696  $as_echo_n "(cached) " >&6
42697else
42698  if test -n "$ac_ct_OBJCOPY"; then
42699  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42700else
42701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42702for as_dir in $PATH
42703do
42704  IFS=$as_save_IFS
42705  test -z "$as_dir" && as_dir=.
42706    for ac_exec_ext in '' $ac_executable_extensions; do
42707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42708    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42710    break 2
42711  fi
42712done
42713  done
42714IFS=$as_save_IFS
42715
42716fi
42717fi
42718ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42719if test -n "$ac_ct_OBJCOPY"; then
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42721$as_echo "$ac_ct_OBJCOPY" >&6; }
42722else
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42724$as_echo "no" >&6; }
42725fi
42726
42727
42728  test -n "$ac_ct_OBJCOPY" && break
42729done
42730
42731  if test "x$ac_ct_OBJCOPY" = x; then
42732    OBJCOPY=""
42733  else
42734    case $cross_compiling:$ac_tool_warned in
42735yes:)
42736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42738ac_tool_warned=yes ;;
42739esac
42740    OBJCOPY=$ac_ct_OBJCOPY
42741  fi
42742fi
42743
42744    else
42745      # If it succeeded, then it was overridden by the user. We will use it
42746      # for the tool.
42747
42748      # First remove it from the list of overridden variables, so we can test
42749      # for unknown variables in the end.
42750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42751
42752      # Check if we try to supply an empty value
42753      if test "x$OBJCOPY" = x; then
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42755$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42757$as_echo_n "checking for OBJCOPY... " >&6; }
42758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42759$as_echo "disabled" >&6; }
42760      else
42761        # Check if the provided tool contains a complete path.
42762        tool_specified="$OBJCOPY"
42763        tool_basename="${tool_specified##*/}"
42764        if test "x$tool_basename" = "x$tool_specified"; then
42765          # A command without a complete path is provided, search $PATH.
42766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42767$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42768          # Extract the first word of "$tool_basename", so it can be a program name with args.
42769set dummy $tool_basename; ac_word=$2
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42771$as_echo_n "checking for $ac_word... " >&6; }
42772if ${ac_cv_path_OBJCOPY+:} false; then :
42773  $as_echo_n "(cached) " >&6
42774else
42775  case $OBJCOPY in
42776  [\\/]* | ?:[\\/]*)
42777  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42778  ;;
42779  *)
42780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42781for as_dir in $PATH
42782do
42783  IFS=$as_save_IFS
42784  test -z "$as_dir" && as_dir=.
42785    for ac_exec_ext in '' $ac_executable_extensions; do
42786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42787    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42789    break 2
42790  fi
42791done
42792  done
42793IFS=$as_save_IFS
42794
42795  ;;
42796esac
42797fi
42798OBJCOPY=$ac_cv_path_OBJCOPY
42799if test -n "$OBJCOPY"; then
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42801$as_echo "$OBJCOPY" >&6; }
42802else
42803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42804$as_echo "no" >&6; }
42805fi
42806
42807
42808          if test "x$OBJCOPY" = x; then
42809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42810          fi
42811        else
42812          # Otherwise we believe it is a complete path. Use it as it is.
42813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42814$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42816$as_echo_n "checking for OBJCOPY... " >&6; }
42817          if test ! -x "$tool_specified"; then
42818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42819$as_echo "not found" >&6; }
42820            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42821          fi
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42823$as_echo "$tool_specified" >&6; }
42824        fi
42825      fi
42826    fi
42827
42828  fi
42829
42830
42831    # Only call fixup if objcopy was found.
42832    if test -n "$OBJCOPY"; then
42833
42834  # Only process if variable expands to non-empty
42835
42836  if test "x$OBJCOPY" != x; then
42837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42838
42839  # First separate the path from the arguments. This will split at the first
42840  # space.
42841  complete="$OBJCOPY"
42842  path="${complete%% *}"
42843  tmp="$complete EOL"
42844  arguments="${tmp#* }"
42845
42846  # Input might be given as Windows format, start by converting to
42847  # unix format.
42848  new_path=`$CYGPATH -u "$path"`
42849
42850  # Now try to locate executable using which
42851  new_path=`$WHICH "$new_path" 2> /dev/null`
42852  # bat and cmd files are not always considered executable in cygwin causing which
42853  # to not find them
42854  if test "x$new_path" = x \
42855      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42856      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42857    new_path=`$CYGPATH -u "$path"`
42858  fi
42859  if test "x$new_path" = x; then
42860    # Oops. Which didn't find the executable.
42861    # The splitting of arguments from the executable at a space might have been incorrect,
42862    # since paths with space are more likely in Windows. Give it another try with the whole
42863    # argument.
42864    path="$complete"
42865    arguments="EOL"
42866    new_path=`$CYGPATH -u "$path"`
42867    new_path=`$WHICH "$new_path" 2> /dev/null`
42868    # bat and cmd files are not always considered executable in cygwin causing which
42869    # to not find them
42870    if test "x$new_path" = x \
42871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42873      new_path=`$CYGPATH -u "$path"`
42874    fi
42875    if test "x$new_path" = x; then
42876      # It's still not found. Now this is an unrecoverable error.
42877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42878$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42879      has_space=`$ECHO "$complete" | $GREP " "`
42880      if test "x$has_space" != x; then
42881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42883      fi
42884      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42885    fi
42886  fi
42887
42888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42891  # "foo.exe" is OK but "foo" is an error.
42892  #
42893  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42894  # It is also a way to make sure we got the proper file name for the real test later on.
42895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42896  if test "x$test_shortpath" = x; then
42897    # Short path failed, file does not exist as specified.
42898    # Try adding .exe or .cmd
42899    if test -f "${new_path}.exe"; then
42900      input_to_shortpath="${new_path}.exe"
42901    elif test -f "${new_path}.cmd"; then
42902      input_to_shortpath="${new_path}.cmd"
42903    else
42904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42905$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42906      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42907$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42908      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42909    fi
42910  else
42911    input_to_shortpath="$new_path"
42912  fi
42913
42914  # Call helper function which possibly converts this using DOS-style short mode.
42915  # If so, the updated path is stored in $new_path.
42916  new_path="$input_to_shortpath"
42917
42918  input_path="$input_to_shortpath"
42919  # Check if we need to convert this using DOS-style short mode. If the path
42920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42921  # take no chances and rewrite it.
42922  # Note: m4 eats our [], so we need to use [ and ] instead.
42923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42924  if test "x$has_forbidden_chars" != x; then
42925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42929      # Going to short mode and back again did indeed matter. Since short mode is
42930      # case insensitive, let's make it lowercase to improve readability.
42931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42932      # Now convert it back to Unix-style (cygpath)
42933      input_path=`$CYGPATH -u "$shortmode_path"`
42934      new_path="$input_path"
42935    fi
42936  fi
42937
42938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42939  if test "x$test_cygdrive_prefix" = x; then
42940    # As a simple fix, exclude /usr/bin since it's not a real path.
42941    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42943      # a path prefixed by /cygdrive for fixpath to work.
42944      new_path="$CYGWIN_ROOT_PATH$input_path"
42945    fi
42946  fi
42947
42948  # remove trailing .exe if any
42949  new_path="${new_path/%.exe/}"
42950
42951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42952
42953  # First separate the path from the arguments. This will split at the first
42954  # space.
42955  complete="$OBJCOPY"
42956  path="${complete%% *}"
42957  tmp="$complete EOL"
42958  arguments="${tmp#* }"
42959
42960  # Input might be given as Windows format, start by converting to
42961  # unix format.
42962  new_path="$path"
42963
42964  windows_path="$new_path"
42965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42966    unix_path=`$CYGPATH -u "$windows_path"`
42967    new_path="$unix_path"
42968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42970    new_path="$unix_path"
42971  fi
42972
42973
42974  # Now try to locate executable using which
42975  new_path=`$WHICH "$new_path" 2> /dev/null`
42976
42977  if test "x$new_path" = x; then
42978    # Oops. Which didn't find the executable.
42979    # The splitting of arguments from the executable at a space might have been incorrect,
42980    # since paths with space are more likely in Windows. Give it another try with the whole
42981    # argument.
42982    path="$complete"
42983    arguments="EOL"
42984    new_path="$path"
42985
42986  windows_path="$new_path"
42987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42988    unix_path=`$CYGPATH -u "$windows_path"`
42989    new_path="$unix_path"
42990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42992    new_path="$unix_path"
42993  fi
42994
42995
42996    new_path=`$WHICH "$new_path" 2> /dev/null`
42997    # bat and cmd files are not always considered executable in MSYS causing which
42998    # to not find them
42999    if test "x$new_path" = x \
43000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43002      new_path="$path"
43003
43004  windows_path="$new_path"
43005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43006    unix_path=`$CYGPATH -u "$windows_path"`
43007    new_path="$unix_path"
43008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43010    new_path="$unix_path"
43011  fi
43012
43013    fi
43014
43015    if test "x$new_path" = x; then
43016      # It's still not found. Now this is an unrecoverable error.
43017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43018$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43019      has_space=`$ECHO "$complete" | $GREP " "`
43020      if test "x$has_space" != x; then
43021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43023      fi
43024      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43025    fi
43026  fi
43027
43028  # Now new_path has a complete unix path to the binary
43029  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43030    # Keep paths in /bin as-is, but remove trailing .exe if any
43031    new_path="${new_path/%.exe/}"
43032    # Do not save /bin paths to all_fixpath_prefixes!
43033  else
43034    # Not in mixed or Windows style, start by that.
43035    new_path=`cmd //c echo $new_path`
43036
43037  input_path="$new_path"
43038  # Check if we need to convert this using DOS-style short mode. If the path
43039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43040  # take no chances and rewrite it.
43041  # Note: m4 eats our [], so we need to use [ and ] instead.
43042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43043  if test "x$has_forbidden_chars" != x; then
43044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43046  fi
43047
43048    # Output is in $new_path
43049
43050  windows_path="$new_path"
43051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43052    unix_path=`$CYGPATH -u "$windows_path"`
43053    new_path="$unix_path"
43054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43056    new_path="$unix_path"
43057  fi
43058
43059    # remove trailing .exe if any
43060    new_path="${new_path/%.exe/}"
43061
43062    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43063    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43064  fi
43065
43066    else
43067      # We're on a unix platform. Hooray! :)
43068      # First separate the path from the arguments. This will split at the first
43069      # space.
43070      complete="$OBJCOPY"
43071      path="${complete%% *}"
43072      tmp="$complete EOL"
43073      arguments="${tmp#* }"
43074
43075      # Cannot rely on the command "which" here since it doesn't always work.
43076      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43077      if test -z "$is_absolute_path"; then
43078        # Path to executable is not absolute. Find it.
43079        IFS_save="$IFS"
43080        IFS=:
43081        for p in $PATH; do
43082          if test -f "$p/$path" && test -x "$p/$path"; then
43083            new_path="$p/$path"
43084            break
43085          fi
43086        done
43087        IFS="$IFS_save"
43088      else
43089        # This is an absolute path, we can use it without further modifications.
43090        new_path="$path"
43091      fi
43092
43093      if test "x$new_path" = x; then
43094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43095$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43096        has_space=`$ECHO "$complete" | $GREP " "`
43097        if test "x$has_space" != x; then
43098          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43099$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43100        fi
43101        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43102      fi
43103    fi
43104
43105    # Now join together the path and the arguments once again
43106    if test "x$arguments" != xEOL; then
43107      new_complete="$new_path ${arguments% *}"
43108    else
43109      new_complete="$new_path"
43110    fi
43111
43112    if test "x$complete" != "x$new_complete"; then
43113      OBJCOPY="$new_complete"
43114      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43115$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43116    fi
43117  fi
43118
43119      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43120        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43121        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43122        # - version number is last blank separate word on first line
43123        # - version number formats that have been seen:
43124        #   - <major>.<minor>
43125        #   - <major>.<minor>.<micro>
43126        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43127        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43128         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43129              -e 's/.* //' \
43130              -e '/^[01]\./b bad' \
43131              -e '/^2\./{' \
43132              -e '  s/^2\.//' \
43133              -e '  /^[0-9]$/b bad' \
43134              -e '  /^[0-9]\./b bad' \
43135              -e '  /^1[0-9]$/b bad' \
43136              -e '  /^1[0-9]\./b bad' \
43137              -e '  /^20\./b bad' \
43138              -e '  /^21\.0$/b bad' \
43139              -e '  /^21\.0\./b bad' \
43140              -e '}' \
43141              -e ':good' \
43142              -e 's/.*/VALID_VERSION/p' \
43143              -e 'q' \
43144              -e ':bad' \
43145              -e 's/.*/BAD_VERSION/p' \
43146              -e 'q'`
43147        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43148          OBJCOPY=
43149          { $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
43150$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43152$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43154$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43155          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43156$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43157          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43158$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43159        fi
43160      fi
43161    fi
43162  fi
43163
43164
43165
43166  # Publish this variable in the help.
43167
43168
43169  if [ -z "${OBJDUMP+x}" ]; then
43170    # The variable is not set by user, try to locate tool using the code snippet
43171    if test -n "$ac_tool_prefix"; then
43172  for ac_prog in gobjdump objdump
43173  do
43174    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43175set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43177$as_echo_n "checking for $ac_word... " >&6; }
43178if ${ac_cv_prog_OBJDUMP+:} false; then :
43179  $as_echo_n "(cached) " >&6
43180else
43181  if test -n "$OBJDUMP"; then
43182  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43183else
43184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43185for as_dir in $PATH
43186do
43187  IFS=$as_save_IFS
43188  test -z "$as_dir" && as_dir=.
43189    for ac_exec_ext in '' $ac_executable_extensions; do
43190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43191    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43193    break 2
43194  fi
43195done
43196  done
43197IFS=$as_save_IFS
43198
43199fi
43200fi
43201OBJDUMP=$ac_cv_prog_OBJDUMP
43202if test -n "$OBJDUMP"; then
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43204$as_echo "$OBJDUMP" >&6; }
43205else
43206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43207$as_echo "no" >&6; }
43208fi
43209
43210
43211    test -n "$OBJDUMP" && break
43212  done
43213fi
43214if test -z "$OBJDUMP"; then
43215  ac_ct_OBJDUMP=$OBJDUMP
43216  for ac_prog in gobjdump objdump
43217do
43218  # Extract the first word of "$ac_prog", so it can be a program name with args.
43219set dummy $ac_prog; ac_word=$2
43220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43221$as_echo_n "checking for $ac_word... " >&6; }
43222if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43223  $as_echo_n "(cached) " >&6
43224else
43225  if test -n "$ac_ct_OBJDUMP"; then
43226  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43227else
43228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43229for as_dir in $PATH
43230do
43231  IFS=$as_save_IFS
43232  test -z "$as_dir" && as_dir=.
43233    for ac_exec_ext in '' $ac_executable_extensions; do
43234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43235    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43237    break 2
43238  fi
43239done
43240  done
43241IFS=$as_save_IFS
43242
43243fi
43244fi
43245ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43246if test -n "$ac_ct_OBJDUMP"; then
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43248$as_echo "$ac_ct_OBJDUMP" >&6; }
43249else
43250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43251$as_echo "no" >&6; }
43252fi
43253
43254
43255  test -n "$ac_ct_OBJDUMP" && break
43256done
43257
43258  if test "x$ac_ct_OBJDUMP" = x; then
43259    OBJDUMP=""
43260  else
43261    case $cross_compiling:$ac_tool_warned in
43262yes:)
43263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43265ac_tool_warned=yes ;;
43266esac
43267    OBJDUMP=$ac_ct_OBJDUMP
43268  fi
43269fi
43270
43271  else
43272    # The variable is set, but is it from the command line or the environment?
43273
43274    # Try to remove the string !OBJDUMP! from our list.
43275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43277      # If it failed, the variable was not from the command line. Ignore it,
43278      # but warn the user (except for BASH, which is always set by the calling BASH).
43279      if test "xOBJDUMP" != xBASH; then
43280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43281$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43282      fi
43283      # Try to locate tool using the code snippet
43284      if test -n "$ac_tool_prefix"; then
43285  for ac_prog in gobjdump objdump
43286  do
43287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43290$as_echo_n "checking for $ac_word... " >&6; }
43291if ${ac_cv_prog_OBJDUMP+:} false; then :
43292  $as_echo_n "(cached) " >&6
43293else
43294  if test -n "$OBJDUMP"; then
43295  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43296else
43297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43298for as_dir in $PATH
43299do
43300  IFS=$as_save_IFS
43301  test -z "$as_dir" && as_dir=.
43302    for ac_exec_ext in '' $ac_executable_extensions; do
43303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43304    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43306    break 2
43307  fi
43308done
43309  done
43310IFS=$as_save_IFS
43311
43312fi
43313fi
43314OBJDUMP=$ac_cv_prog_OBJDUMP
43315if test -n "$OBJDUMP"; then
43316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43317$as_echo "$OBJDUMP" >&6; }
43318else
43319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43320$as_echo "no" >&6; }
43321fi
43322
43323
43324    test -n "$OBJDUMP" && break
43325  done
43326fi
43327if test -z "$OBJDUMP"; then
43328  ac_ct_OBJDUMP=$OBJDUMP
43329  for ac_prog in gobjdump objdump
43330do
43331  # Extract the first word of "$ac_prog", so it can be a program name with args.
43332set dummy $ac_prog; ac_word=$2
43333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43334$as_echo_n "checking for $ac_word... " >&6; }
43335if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43336  $as_echo_n "(cached) " >&6
43337else
43338  if test -n "$ac_ct_OBJDUMP"; then
43339  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43340else
43341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43342for as_dir in $PATH
43343do
43344  IFS=$as_save_IFS
43345  test -z "$as_dir" && as_dir=.
43346    for ac_exec_ext in '' $ac_executable_extensions; do
43347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43348    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43350    break 2
43351  fi
43352done
43353  done
43354IFS=$as_save_IFS
43355
43356fi
43357fi
43358ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43359if test -n "$ac_ct_OBJDUMP"; then
43360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43361$as_echo "$ac_ct_OBJDUMP" >&6; }
43362else
43363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43364$as_echo "no" >&6; }
43365fi
43366
43367
43368  test -n "$ac_ct_OBJDUMP" && break
43369done
43370
43371  if test "x$ac_ct_OBJDUMP" = x; then
43372    OBJDUMP=""
43373  else
43374    case $cross_compiling:$ac_tool_warned in
43375yes:)
43376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43378ac_tool_warned=yes ;;
43379esac
43380    OBJDUMP=$ac_ct_OBJDUMP
43381  fi
43382fi
43383
43384    else
43385      # If it succeeded, then it was overridden by the user. We will use it
43386      # for the tool.
43387
43388      # First remove it from the list of overridden variables, so we can test
43389      # for unknown variables in the end.
43390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43391
43392      # Check if we try to supply an empty value
43393      if test "x$OBJDUMP" = x; then
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43395$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43397$as_echo_n "checking for OBJDUMP... " >&6; }
43398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43399$as_echo "disabled" >&6; }
43400      else
43401        # Check if the provided tool contains a complete path.
43402        tool_specified="$OBJDUMP"
43403        tool_basename="${tool_specified##*/}"
43404        if test "x$tool_basename" = "x$tool_specified"; then
43405          # A command without a complete path is provided, search $PATH.
43406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43407$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43408          # Extract the first word of "$tool_basename", so it can be a program name with args.
43409set dummy $tool_basename; ac_word=$2
43410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43411$as_echo_n "checking for $ac_word... " >&6; }
43412if ${ac_cv_path_OBJDUMP+:} false; then :
43413  $as_echo_n "(cached) " >&6
43414else
43415  case $OBJDUMP in
43416  [\\/]* | ?:[\\/]*)
43417  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43418  ;;
43419  *)
43420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43421for as_dir in $PATH
43422do
43423  IFS=$as_save_IFS
43424  test -z "$as_dir" && as_dir=.
43425    for ac_exec_ext in '' $ac_executable_extensions; do
43426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43427    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43429    break 2
43430  fi
43431done
43432  done
43433IFS=$as_save_IFS
43434
43435  ;;
43436esac
43437fi
43438OBJDUMP=$ac_cv_path_OBJDUMP
43439if test -n "$OBJDUMP"; then
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43441$as_echo "$OBJDUMP" >&6; }
43442else
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43444$as_echo "no" >&6; }
43445fi
43446
43447
43448          if test "x$OBJDUMP" = x; then
43449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43450          fi
43451        else
43452          # Otherwise we believe it is a complete path. Use it as it is.
43453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43454$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43456$as_echo_n "checking for OBJDUMP... " >&6; }
43457          if test ! -x "$tool_specified"; then
43458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43459$as_echo "not found" >&6; }
43460            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43461          fi
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43463$as_echo "$tool_specified" >&6; }
43464        fi
43465      fi
43466    fi
43467
43468  fi
43469
43470
43471  if test "x$OBJDUMP" != x; then
43472    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43473    # bails if argument is missing.
43474
43475  # Only process if variable expands to non-empty
43476
43477  if test "x$OBJDUMP" != x; then
43478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43479
43480  # First separate the path from the arguments. This will split at the first
43481  # space.
43482  complete="$OBJDUMP"
43483  path="${complete%% *}"
43484  tmp="$complete EOL"
43485  arguments="${tmp#* }"
43486
43487  # Input might be given as Windows format, start by converting to
43488  # unix format.
43489  new_path=`$CYGPATH -u "$path"`
43490
43491  # Now try to locate executable using which
43492  new_path=`$WHICH "$new_path" 2> /dev/null`
43493  # bat and cmd files are not always considered executable in cygwin causing which
43494  # to not find them
43495  if test "x$new_path" = x \
43496      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43497      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43498    new_path=`$CYGPATH -u "$path"`
43499  fi
43500  if test "x$new_path" = x; then
43501    # Oops. Which didn't find the executable.
43502    # The splitting of arguments from the executable at a space might have been incorrect,
43503    # since paths with space are more likely in Windows. Give it another try with the whole
43504    # argument.
43505    path="$complete"
43506    arguments="EOL"
43507    new_path=`$CYGPATH -u "$path"`
43508    new_path=`$WHICH "$new_path" 2> /dev/null`
43509    # bat and cmd files are not always considered executable in cygwin causing which
43510    # to not find them
43511    if test "x$new_path" = x \
43512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43514      new_path=`$CYGPATH -u "$path"`
43515    fi
43516    if test "x$new_path" = x; then
43517      # It's still not found. Now this is an unrecoverable error.
43518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43519$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43520      has_space=`$ECHO "$complete" | $GREP " "`
43521      if test "x$has_space" != x; then
43522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43524      fi
43525      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43526    fi
43527  fi
43528
43529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43532  # "foo.exe" is OK but "foo" is an error.
43533  #
43534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43535  # It is also a way to make sure we got the proper file name for the real test later on.
43536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43537  if test "x$test_shortpath" = x; then
43538    # Short path failed, file does not exist as specified.
43539    # Try adding .exe or .cmd
43540    if test -f "${new_path}.exe"; then
43541      input_to_shortpath="${new_path}.exe"
43542    elif test -f "${new_path}.cmd"; then
43543      input_to_shortpath="${new_path}.cmd"
43544    else
43545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43546$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43549      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43550    fi
43551  else
43552    input_to_shortpath="$new_path"
43553  fi
43554
43555  # Call helper function which possibly converts this using DOS-style short mode.
43556  # If so, the updated path is stored in $new_path.
43557  new_path="$input_to_shortpath"
43558
43559  input_path="$input_to_shortpath"
43560  # Check if we need to convert this using DOS-style short mode. If the path
43561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43562  # take no chances and rewrite it.
43563  # Note: m4 eats our [], so we need to use [ and ] instead.
43564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43565  if test "x$has_forbidden_chars" != x; then
43566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43570      # Going to short mode and back again did indeed matter. Since short mode is
43571      # case insensitive, let's make it lowercase to improve readability.
43572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43573      # Now convert it back to Unix-style (cygpath)
43574      input_path=`$CYGPATH -u "$shortmode_path"`
43575      new_path="$input_path"
43576    fi
43577  fi
43578
43579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43580  if test "x$test_cygdrive_prefix" = x; then
43581    # As a simple fix, exclude /usr/bin since it's not a real path.
43582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43584      # a path prefixed by /cygdrive for fixpath to work.
43585      new_path="$CYGWIN_ROOT_PATH$input_path"
43586    fi
43587  fi
43588
43589  # remove trailing .exe if any
43590  new_path="${new_path/%.exe/}"
43591
43592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43593
43594  # First separate the path from the arguments. This will split at the first
43595  # space.
43596  complete="$OBJDUMP"
43597  path="${complete%% *}"
43598  tmp="$complete EOL"
43599  arguments="${tmp#* }"
43600
43601  # Input might be given as Windows format, start by converting to
43602  # unix format.
43603  new_path="$path"
43604
43605  windows_path="$new_path"
43606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43607    unix_path=`$CYGPATH -u "$windows_path"`
43608    new_path="$unix_path"
43609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43611    new_path="$unix_path"
43612  fi
43613
43614
43615  # Now try to locate executable using which
43616  new_path=`$WHICH "$new_path" 2> /dev/null`
43617
43618  if test "x$new_path" = x; then
43619    # Oops. Which didn't find the executable.
43620    # The splitting of arguments from the executable at a space might have been incorrect,
43621    # since paths with space are more likely in Windows. Give it another try with the whole
43622    # argument.
43623    path="$complete"
43624    arguments="EOL"
43625    new_path="$path"
43626
43627  windows_path="$new_path"
43628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43629    unix_path=`$CYGPATH -u "$windows_path"`
43630    new_path="$unix_path"
43631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43633    new_path="$unix_path"
43634  fi
43635
43636
43637    new_path=`$WHICH "$new_path" 2> /dev/null`
43638    # bat and cmd files are not always considered executable in MSYS causing which
43639    # to not find them
43640    if test "x$new_path" = x \
43641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43643      new_path="$path"
43644
43645  windows_path="$new_path"
43646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43647    unix_path=`$CYGPATH -u "$windows_path"`
43648    new_path="$unix_path"
43649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43651    new_path="$unix_path"
43652  fi
43653
43654    fi
43655
43656    if test "x$new_path" = x; then
43657      # It's still not found. Now this is an unrecoverable error.
43658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43659$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43660      has_space=`$ECHO "$complete" | $GREP " "`
43661      if test "x$has_space" != x; then
43662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43664      fi
43665      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43666    fi
43667  fi
43668
43669  # Now new_path has a complete unix path to the binary
43670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43671    # Keep paths in /bin as-is, but remove trailing .exe if any
43672    new_path="${new_path/%.exe/}"
43673    # Do not save /bin paths to all_fixpath_prefixes!
43674  else
43675    # Not in mixed or Windows style, start by that.
43676    new_path=`cmd //c echo $new_path`
43677
43678  input_path="$new_path"
43679  # Check if we need to convert this using DOS-style short mode. If the path
43680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43681  # take no chances and rewrite it.
43682  # Note: m4 eats our [], so we need to use [ and ] instead.
43683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43684  if test "x$has_forbidden_chars" != x; then
43685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43687  fi
43688
43689    # Output is in $new_path
43690
43691  windows_path="$new_path"
43692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43693    unix_path=`$CYGPATH -u "$windows_path"`
43694    new_path="$unix_path"
43695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43697    new_path="$unix_path"
43698  fi
43699
43700    # remove trailing .exe if any
43701    new_path="${new_path/%.exe/}"
43702
43703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43705  fi
43706
43707    else
43708      # We're on a unix platform. Hooray! :)
43709      # First separate the path from the arguments. This will split at the first
43710      # space.
43711      complete="$OBJDUMP"
43712      path="${complete%% *}"
43713      tmp="$complete EOL"
43714      arguments="${tmp#* }"
43715
43716      # Cannot rely on the command "which" here since it doesn't always work.
43717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43718      if test -z "$is_absolute_path"; then
43719        # Path to executable is not absolute. Find it.
43720        IFS_save="$IFS"
43721        IFS=:
43722        for p in $PATH; do
43723          if test -f "$p/$path" && test -x "$p/$path"; then
43724            new_path="$p/$path"
43725            break
43726          fi
43727        done
43728        IFS="$IFS_save"
43729      else
43730        # This is an absolute path, we can use it without further modifications.
43731        new_path="$path"
43732      fi
43733
43734      if test "x$new_path" = x; then
43735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43736$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43737        has_space=`$ECHO "$complete" | $GREP " "`
43738        if test "x$has_space" != x; then
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43741        fi
43742        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43743      fi
43744    fi
43745
43746    # Now join together the path and the arguments once again
43747    if test "x$arguments" != xEOL; then
43748      new_complete="$new_path ${arguments% *}"
43749    else
43750      new_complete="$new_path"
43751    fi
43752
43753    if test "x$complete" != "x$new_complete"; then
43754      OBJDUMP="$new_complete"
43755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43756$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43757    fi
43758  fi
43759
43760  fi
43761
43762
43763  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43764  # to remain in place. Otherwise the compiler will not work in some siutations
43765  # in later configure checks.
43766  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43767    PATH="$OLD_PATH"
43768  fi
43769
43770  # Restore the flags to the user specified values.
43771  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43772  CFLAGS="$ORG_CFLAGS"
43773  CXXFLAGS="$ORG_CXXFLAGS"
43774
43775
43776# Finally do some processing after the detection phase
43777
43778  if test "x$COMPILE_TYPE" = "xcross"; then
43779    # Now we need to find a C/C++ compiler that can build executables for the
43780    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43781    # used once. Also, we need to do this without adding a tools dir to the
43782    # path, otherwise we might pick up cross-compilers which don't use standard
43783    # naming.
43784
43785    OLDPATH="$PATH"
43786
43787
43788# Check whether --with-build-devkit was given.
43789if test "${with_build_devkit+set}" = set; then :
43790  withval=$with_build_devkit;
43791fi
43792
43793    if test "x$with_build_devkit" = "xyes"; then
43794      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43795    elif test -n "$with_build_devkit"; then
43796      if test ! -d "$with_build_devkit"; then
43797        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43798      else
43799
43800  # Only process if variable expands to non-empty
43801
43802  if test "x$with_build_devkit" != x; then
43803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43804
43805  # Input might be given as Windows format, start by converting to
43806  # unix format.
43807  path="$with_build_devkit"
43808  new_path=`$CYGPATH -u "$path"`
43809
43810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43813  # "foo.exe" is OK but "foo" is an error.
43814  #
43815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43816  # It is also a way to make sure we got the proper file name for the real test later on.
43817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43818  if test "x$test_shortpath" = x; then
43819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43820$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43821    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43822  fi
43823
43824  # Call helper function which possibly converts this using DOS-style short mode.
43825  # If so, the updated path is stored in $new_path.
43826
43827  input_path="$new_path"
43828  # Check if we need to convert this using DOS-style short mode. If the path
43829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43830  # take no chances and rewrite it.
43831  # Note: m4 eats our [], so we need to use [ and ] instead.
43832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43833  if test "x$has_forbidden_chars" != x; then
43834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43838      # Going to short mode and back again did indeed matter. Since short mode is
43839      # case insensitive, let's make it lowercase to improve readability.
43840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43841      # Now convert it back to Unix-style (cygpath)
43842      input_path=`$CYGPATH -u "$shortmode_path"`
43843      new_path="$input_path"
43844    fi
43845  fi
43846
43847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43848  if test "x$test_cygdrive_prefix" = x; then
43849    # As a simple fix, exclude /usr/bin since it's not a real path.
43850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43852      # a path prefixed by /cygdrive for fixpath to work.
43853      new_path="$CYGWIN_ROOT_PATH$input_path"
43854    fi
43855  fi
43856
43857
43858  if test "x$path" != "x$new_path"; then
43859    with_build_devkit="$new_path"
43860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43861$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43862  fi
43863
43864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43865
43866  path="$with_build_devkit"
43867  has_colon=`$ECHO $path | $GREP ^.:`
43868  new_path="$path"
43869  if test "x$has_colon" = x; then
43870    # Not in mixed or Windows style, start by that.
43871    new_path=`cmd //c echo $path`
43872  fi
43873
43874
43875  input_path="$new_path"
43876  # Check if we need to convert this using DOS-style short mode. If the path
43877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43878  # take no chances and rewrite it.
43879  # Note: m4 eats our [], so we need to use [ and ] instead.
43880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43881  if test "x$has_forbidden_chars" != x; then
43882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43884  fi
43885
43886
43887  windows_path="$new_path"
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889    unix_path=`$CYGPATH -u "$windows_path"`
43890    new_path="$unix_path"
43891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43893    new_path="$unix_path"
43894  fi
43895
43896  if test "x$path" != "x$new_path"; then
43897    with_build_devkit="$new_path"
43898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43899$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43900  fi
43901
43902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43904
43905    else
43906      # We're on a unix platform. Hooray! :)
43907      path="$with_build_devkit"
43908      has_space=`$ECHO "$path" | $GREP " "`
43909      if test "x$has_space" != x; then
43910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43911$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43913      fi
43914
43915      # Use eval to expand a potential ~
43916      eval path="$path"
43917      if test ! -f "$path" && test ! -d "$path"; then
43918        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43919      fi
43920
43921      if test -d "$path"; then
43922        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43923      else
43924        dir="`$DIRNAME "$path"`"
43925        base="`$BASENAME "$path"`"
43926        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43927      fi
43928    fi
43929  fi
43930
43931        BUILD_DEVKIT_ROOT="$with_build_devkit"
43932        # Check for a meta data info file in the root of the devkit
43933        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43934          # Process devkit.info so that existing devkit variables are not
43935          # modified by this
43936          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43937              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43938              -e "s/\$host/\$build/g" \
43939              $BUILD_DEVKIT_ROOT/devkit.info \
43940              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43941          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43942          # This potentially sets the following:
43943          # A descriptive name of the devkit
43944
43945  if test "x$BUILD_DEVKIT_NAME" = x; then
43946    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43947  fi
43948
43949          # Corresponds to --with-extra-path
43950
43951  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43952    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43953  fi
43954
43955          # Corresponds to --with-toolchain-path
43956
43957  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43958    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43959  fi
43960
43961          # Corresponds to --with-sysroot
43962
43963  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43964    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43965  fi
43966
43967          # Skip the Window specific parts
43968        fi
43969
43970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43971$as_echo_n "checking for build platform devkit... " >&6; }
43972        if test "x$BUILD_DEVKIT_NAME" != x; then
43973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43974$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43975        else
43976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43977$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43978        fi
43979
43980        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43981
43982  if test "x$BUILD_SYSROOT" != "x"; then
43983    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43984      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43985        # Solaris Studio does not have a concept of sysroot. Instead we must
43986        # make sure the default include and lib dirs are appended to each
43987        # compile and link command line. Must also add -I-xbuiltin to enable
43988        # inlining of system functions and intrinsics.
43989        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43990        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43991            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43992      fi
43993    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43994      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43995      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43996    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43997      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43998      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43999    fi
44000    # Propagate the sysroot args to hotspot
44001    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44004    # The global CFLAGS and LDFLAGS variables need these for configure to function
44005    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44006    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44007    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44008    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44009  fi
44010
44011  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44012    # We also need -iframework<path>/System/Library/Frameworks
44013    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44014    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44015    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44016    # set this here so it doesn't have to be peppered throughout the forest
44017    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44018    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44019  fi
44020
44021
44022
44023
44024
44025         # Fallback default of just /bin if DEVKIT_PATH is not defined
44026        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44027          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44028        fi
44029        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44030      fi
44031    fi
44032
44033    # FIXME: we should list the discovered compilers as an exclude pattern!
44034    # If we do that, we can do this detection before POST_DETECTION, and still
44035    # find the build compilers in the tools dir, if needed.
44036
44037
44038
44039  # Publish this variable in the help.
44040
44041
44042  if [ -z "${BUILD_CC+x}" ]; then
44043    # The variable is not set by user, try to locate tool using the code snippet
44044    for ac_prog in cl cc gcc
44045do
44046  # Extract the first word of "$ac_prog", so it can be a program name with args.
44047set dummy $ac_prog; ac_word=$2
44048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44049$as_echo_n "checking for $ac_word... " >&6; }
44050if ${ac_cv_path_BUILD_CC+:} false; then :
44051  $as_echo_n "(cached) " >&6
44052else
44053  case $BUILD_CC in
44054  [\\/]* | ?:[\\/]*)
44055  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44056  ;;
44057  *)
44058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44059for as_dir in $PATH
44060do
44061  IFS=$as_save_IFS
44062  test -z "$as_dir" && as_dir=.
44063    for ac_exec_ext in '' $ac_executable_extensions; do
44064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44065    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44067    break 2
44068  fi
44069done
44070  done
44071IFS=$as_save_IFS
44072
44073  ;;
44074esac
44075fi
44076BUILD_CC=$ac_cv_path_BUILD_CC
44077if test -n "$BUILD_CC"; then
44078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44079$as_echo "$BUILD_CC" >&6; }
44080else
44081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44082$as_echo "no" >&6; }
44083fi
44084
44085
44086  test -n "$BUILD_CC" && break
44087done
44088
44089  else
44090    # The variable is set, but is it from the command line or the environment?
44091
44092    # Try to remove the string !BUILD_CC! from our list.
44093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44095      # If it failed, the variable was not from the command line. Ignore it,
44096      # but warn the user (except for BASH, which is always set by the calling BASH).
44097      if test "xBUILD_CC" != xBASH; then
44098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44099$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44100      fi
44101      # Try to locate tool using the code snippet
44102      for ac_prog in cl cc gcc
44103do
44104  # Extract the first word of "$ac_prog", so it can be a program name with args.
44105set dummy $ac_prog; ac_word=$2
44106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44107$as_echo_n "checking for $ac_word... " >&6; }
44108if ${ac_cv_path_BUILD_CC+:} false; then :
44109  $as_echo_n "(cached) " >&6
44110else
44111  case $BUILD_CC in
44112  [\\/]* | ?:[\\/]*)
44113  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44114  ;;
44115  *)
44116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44117for as_dir in $PATH
44118do
44119  IFS=$as_save_IFS
44120  test -z "$as_dir" && as_dir=.
44121    for ac_exec_ext in '' $ac_executable_extensions; do
44122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44123    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44125    break 2
44126  fi
44127done
44128  done
44129IFS=$as_save_IFS
44130
44131  ;;
44132esac
44133fi
44134BUILD_CC=$ac_cv_path_BUILD_CC
44135if test -n "$BUILD_CC"; then
44136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44137$as_echo "$BUILD_CC" >&6; }
44138else
44139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44140$as_echo "no" >&6; }
44141fi
44142
44143
44144  test -n "$BUILD_CC" && break
44145done
44146
44147    else
44148      # If it succeeded, then it was overridden by the user. We will use it
44149      # for the tool.
44150
44151      # First remove it from the list of overridden variables, so we can test
44152      # for unknown variables in the end.
44153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44154
44155      # Check if we try to supply an empty value
44156      if test "x$BUILD_CC" = x; then
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44158$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44160$as_echo_n "checking for BUILD_CC... " >&6; }
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44162$as_echo "disabled" >&6; }
44163      else
44164        # Check if the provided tool contains a complete path.
44165        tool_specified="$BUILD_CC"
44166        tool_basename="${tool_specified##*/}"
44167        if test "x$tool_basename" = "x$tool_specified"; then
44168          # A command without a complete path is provided, search $PATH.
44169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44170$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44171          # Extract the first word of "$tool_basename", so it can be a program name with args.
44172set dummy $tool_basename; ac_word=$2
44173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44174$as_echo_n "checking for $ac_word... " >&6; }
44175if ${ac_cv_path_BUILD_CC+:} false; then :
44176  $as_echo_n "(cached) " >&6
44177else
44178  case $BUILD_CC in
44179  [\\/]* | ?:[\\/]*)
44180  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44181  ;;
44182  *)
44183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44184for as_dir in $PATH
44185do
44186  IFS=$as_save_IFS
44187  test -z "$as_dir" && as_dir=.
44188    for ac_exec_ext in '' $ac_executable_extensions; do
44189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44190    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44192    break 2
44193  fi
44194done
44195  done
44196IFS=$as_save_IFS
44197
44198  ;;
44199esac
44200fi
44201BUILD_CC=$ac_cv_path_BUILD_CC
44202if test -n "$BUILD_CC"; then
44203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44204$as_echo "$BUILD_CC" >&6; }
44205else
44206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44207$as_echo "no" >&6; }
44208fi
44209
44210
44211          if test "x$BUILD_CC" = x; then
44212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44213          fi
44214        else
44215          # Otherwise we believe it is a complete path. Use it as it is.
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44217$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44219$as_echo_n "checking for BUILD_CC... " >&6; }
44220          if test ! -x "$tool_specified"; then
44221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44222$as_echo "not found" >&6; }
44223            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44224          fi
44225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44226$as_echo "$tool_specified" >&6; }
44227        fi
44228      fi
44229    fi
44230
44231  fi
44232
44233
44234
44235  if test "x$BUILD_CC" = x; then
44236    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44237  fi
44238
44239
44240
44241  # Only process if variable expands to non-empty
44242
44243  if test "x$BUILD_CC" != x; then
44244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44245
44246  # First separate the path from the arguments. This will split at the first
44247  # space.
44248  complete="$BUILD_CC"
44249  path="${complete%% *}"
44250  tmp="$complete EOL"
44251  arguments="${tmp#* }"
44252
44253  # Input might be given as Windows format, start by converting to
44254  # unix format.
44255  new_path=`$CYGPATH -u "$path"`
44256
44257  # Now try to locate executable using which
44258  new_path=`$WHICH "$new_path" 2> /dev/null`
44259  # bat and cmd files are not always considered executable in cygwin causing which
44260  # to not find them
44261  if test "x$new_path" = x \
44262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44264    new_path=`$CYGPATH -u "$path"`
44265  fi
44266  if test "x$new_path" = x; then
44267    # Oops. Which didn't find the executable.
44268    # The splitting of arguments from the executable at a space might have been incorrect,
44269    # since paths with space are more likely in Windows. Give it another try with the whole
44270    # argument.
44271    path="$complete"
44272    arguments="EOL"
44273    new_path=`$CYGPATH -u "$path"`
44274    new_path=`$WHICH "$new_path" 2> /dev/null`
44275    # bat and cmd files are not always considered executable in cygwin causing which
44276    # to not find them
44277    if test "x$new_path" = x \
44278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44280      new_path=`$CYGPATH -u "$path"`
44281    fi
44282    if test "x$new_path" = x; then
44283      # It's still not found. Now this is an unrecoverable error.
44284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44285$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44286      has_space=`$ECHO "$complete" | $GREP " "`
44287      if test "x$has_space" != x; then
44288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44290      fi
44291      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44292    fi
44293  fi
44294
44295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44298  # "foo.exe" is OK but "foo" is an error.
44299  #
44300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44301  # It is also a way to make sure we got the proper file name for the real test later on.
44302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44303  if test "x$test_shortpath" = x; then
44304    # Short path failed, file does not exist as specified.
44305    # Try adding .exe or .cmd
44306    if test -f "${new_path}.exe"; then
44307      input_to_shortpath="${new_path}.exe"
44308    elif test -f "${new_path}.cmd"; then
44309      input_to_shortpath="${new_path}.cmd"
44310    else
44311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44312$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44315      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44316    fi
44317  else
44318    input_to_shortpath="$new_path"
44319  fi
44320
44321  # Call helper function which possibly converts this using DOS-style short mode.
44322  # If so, the updated path is stored in $new_path.
44323  new_path="$input_to_shortpath"
44324
44325  input_path="$input_to_shortpath"
44326  # Check if we need to convert this using DOS-style short mode. If the path
44327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44328  # take no chances and rewrite it.
44329  # Note: m4 eats our [], so we need to use [ and ] instead.
44330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44331  if test "x$has_forbidden_chars" != x; then
44332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44336      # Going to short mode and back again did indeed matter. Since short mode is
44337      # case insensitive, let's make it lowercase to improve readability.
44338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44339      # Now convert it back to Unix-style (cygpath)
44340      input_path=`$CYGPATH -u "$shortmode_path"`
44341      new_path="$input_path"
44342    fi
44343  fi
44344
44345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44346  if test "x$test_cygdrive_prefix" = x; then
44347    # As a simple fix, exclude /usr/bin since it's not a real path.
44348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44350      # a path prefixed by /cygdrive for fixpath to work.
44351      new_path="$CYGWIN_ROOT_PATH$input_path"
44352    fi
44353  fi
44354
44355  # remove trailing .exe if any
44356  new_path="${new_path/%.exe/}"
44357
44358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44359
44360  # First separate the path from the arguments. This will split at the first
44361  # space.
44362  complete="$BUILD_CC"
44363  path="${complete%% *}"
44364  tmp="$complete EOL"
44365  arguments="${tmp#* }"
44366
44367  # Input might be given as Windows format, start by converting to
44368  # unix format.
44369  new_path="$path"
44370
44371  windows_path="$new_path"
44372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44373    unix_path=`$CYGPATH -u "$windows_path"`
44374    new_path="$unix_path"
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44377    new_path="$unix_path"
44378  fi
44379
44380
44381  # Now try to locate executable using which
44382  new_path=`$WHICH "$new_path" 2> /dev/null`
44383
44384  if test "x$new_path" = x; then
44385    # Oops. Which didn't find the executable.
44386    # The splitting of arguments from the executable at a space might have been incorrect,
44387    # since paths with space are more likely in Windows. Give it another try with the whole
44388    # argument.
44389    path="$complete"
44390    arguments="EOL"
44391    new_path="$path"
44392
44393  windows_path="$new_path"
44394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44395    unix_path=`$CYGPATH -u "$windows_path"`
44396    new_path="$unix_path"
44397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44399    new_path="$unix_path"
44400  fi
44401
44402
44403    new_path=`$WHICH "$new_path" 2> /dev/null`
44404    # bat and cmd files are not always considered executable in MSYS causing which
44405    # to not find them
44406    if test "x$new_path" = x \
44407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44409      new_path="$path"
44410
44411  windows_path="$new_path"
44412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44413    unix_path=`$CYGPATH -u "$windows_path"`
44414    new_path="$unix_path"
44415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44417    new_path="$unix_path"
44418  fi
44419
44420    fi
44421
44422    if test "x$new_path" = x; then
44423      # It's still not found. Now this is an unrecoverable error.
44424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44425$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44426      has_space=`$ECHO "$complete" | $GREP " "`
44427      if test "x$has_space" != x; then
44428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44430      fi
44431      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44432    fi
44433  fi
44434
44435  # Now new_path has a complete unix path to the binary
44436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44437    # Keep paths in /bin as-is, but remove trailing .exe if any
44438    new_path="${new_path/%.exe/}"
44439    # Do not save /bin paths to all_fixpath_prefixes!
44440  else
44441    # Not in mixed or Windows style, start by that.
44442    new_path=`cmd //c echo $new_path`
44443
44444  input_path="$new_path"
44445  # Check if we need to convert this using DOS-style short mode. If the path
44446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44447  # take no chances and rewrite it.
44448  # Note: m4 eats our [], so we need to use [ and ] instead.
44449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44450  if test "x$has_forbidden_chars" != x; then
44451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44453  fi
44454
44455    # Output is in $new_path
44456
44457  windows_path="$new_path"
44458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44459    unix_path=`$CYGPATH -u "$windows_path"`
44460    new_path="$unix_path"
44461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44463    new_path="$unix_path"
44464  fi
44465
44466    # remove trailing .exe if any
44467    new_path="${new_path/%.exe/}"
44468
44469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44471  fi
44472
44473    else
44474      # We're on a unix platform. Hooray! :)
44475      # First separate the path from the arguments. This will split at the first
44476      # space.
44477      complete="$BUILD_CC"
44478      path="${complete%% *}"
44479      tmp="$complete EOL"
44480      arguments="${tmp#* }"
44481
44482      # Cannot rely on the command "which" here since it doesn't always work.
44483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44484      if test -z "$is_absolute_path"; then
44485        # Path to executable is not absolute. Find it.
44486        IFS_save="$IFS"
44487        IFS=:
44488        for p in $PATH; do
44489          if test -f "$p/$path" && test -x "$p/$path"; then
44490            new_path="$p/$path"
44491            break
44492          fi
44493        done
44494        IFS="$IFS_save"
44495      else
44496        # This is an absolute path, we can use it without further modifications.
44497        new_path="$path"
44498      fi
44499
44500      if test "x$new_path" = x; then
44501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44502$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44503        has_space=`$ECHO "$complete" | $GREP " "`
44504        if test "x$has_space" != x; then
44505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44507        fi
44508        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44509      fi
44510    fi
44511
44512    # Now join together the path and the arguments once again
44513    if test "x$arguments" != xEOL; then
44514      new_complete="$new_path ${arguments% *}"
44515    else
44516      new_complete="$new_path"
44517    fi
44518
44519    if test "x$complete" != "x$new_complete"; then
44520      BUILD_CC="$new_complete"
44521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44522$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44523    fi
44524  fi
44525
44526
44527
44528
44529  # Publish this variable in the help.
44530
44531
44532  if [ -z "${BUILD_CXX+x}" ]; then
44533    # The variable is not set by user, try to locate tool using the code snippet
44534    for ac_prog in cl CC g++
44535do
44536  # Extract the first word of "$ac_prog", so it can be a program name with args.
44537set dummy $ac_prog; ac_word=$2
44538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44539$as_echo_n "checking for $ac_word... " >&6; }
44540if ${ac_cv_path_BUILD_CXX+:} false; then :
44541  $as_echo_n "(cached) " >&6
44542else
44543  case $BUILD_CXX in
44544  [\\/]* | ?:[\\/]*)
44545  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44546  ;;
44547  *)
44548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44549for as_dir in $PATH
44550do
44551  IFS=$as_save_IFS
44552  test -z "$as_dir" && as_dir=.
44553    for ac_exec_ext in '' $ac_executable_extensions; do
44554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44555    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44557    break 2
44558  fi
44559done
44560  done
44561IFS=$as_save_IFS
44562
44563  ;;
44564esac
44565fi
44566BUILD_CXX=$ac_cv_path_BUILD_CXX
44567if test -n "$BUILD_CXX"; then
44568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44569$as_echo "$BUILD_CXX" >&6; }
44570else
44571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44572$as_echo "no" >&6; }
44573fi
44574
44575
44576  test -n "$BUILD_CXX" && break
44577done
44578
44579  else
44580    # The variable is set, but is it from the command line or the environment?
44581
44582    # Try to remove the string !BUILD_CXX! from our list.
44583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44585      # If it failed, the variable was not from the command line. Ignore it,
44586      # but warn the user (except for BASH, which is always set by the calling BASH).
44587      if test "xBUILD_CXX" != xBASH; then
44588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44589$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44590      fi
44591      # Try to locate tool using the code snippet
44592      for ac_prog in cl CC g++
44593do
44594  # Extract the first word of "$ac_prog", so it can be a program name with args.
44595set dummy $ac_prog; ac_word=$2
44596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44597$as_echo_n "checking for $ac_word... " >&6; }
44598if ${ac_cv_path_BUILD_CXX+:} false; then :
44599  $as_echo_n "(cached) " >&6
44600else
44601  case $BUILD_CXX in
44602  [\\/]* | ?:[\\/]*)
44603  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44604  ;;
44605  *)
44606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44607for as_dir in $PATH
44608do
44609  IFS=$as_save_IFS
44610  test -z "$as_dir" && as_dir=.
44611    for ac_exec_ext in '' $ac_executable_extensions; do
44612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44613    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44615    break 2
44616  fi
44617done
44618  done
44619IFS=$as_save_IFS
44620
44621  ;;
44622esac
44623fi
44624BUILD_CXX=$ac_cv_path_BUILD_CXX
44625if test -n "$BUILD_CXX"; then
44626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44627$as_echo "$BUILD_CXX" >&6; }
44628else
44629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44630$as_echo "no" >&6; }
44631fi
44632
44633
44634  test -n "$BUILD_CXX" && break
44635done
44636
44637    else
44638      # If it succeeded, then it was overridden by the user. We will use it
44639      # for the tool.
44640
44641      # First remove it from the list of overridden variables, so we can test
44642      # for unknown variables in the end.
44643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44644
44645      # Check if we try to supply an empty value
44646      if test "x$BUILD_CXX" = x; then
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44648$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44650$as_echo_n "checking for BUILD_CXX... " >&6; }
44651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44652$as_echo "disabled" >&6; }
44653      else
44654        # Check if the provided tool contains a complete path.
44655        tool_specified="$BUILD_CXX"
44656        tool_basename="${tool_specified##*/}"
44657        if test "x$tool_basename" = "x$tool_specified"; then
44658          # A command without a complete path is provided, search $PATH.
44659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44660$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44661          # Extract the first word of "$tool_basename", so it can be a program name with args.
44662set dummy $tool_basename; ac_word=$2
44663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44664$as_echo_n "checking for $ac_word... " >&6; }
44665if ${ac_cv_path_BUILD_CXX+:} false; then :
44666  $as_echo_n "(cached) " >&6
44667else
44668  case $BUILD_CXX in
44669  [\\/]* | ?:[\\/]*)
44670  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44671  ;;
44672  *)
44673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44674for as_dir in $PATH
44675do
44676  IFS=$as_save_IFS
44677  test -z "$as_dir" && as_dir=.
44678    for ac_exec_ext in '' $ac_executable_extensions; do
44679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44680    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44682    break 2
44683  fi
44684done
44685  done
44686IFS=$as_save_IFS
44687
44688  ;;
44689esac
44690fi
44691BUILD_CXX=$ac_cv_path_BUILD_CXX
44692if test -n "$BUILD_CXX"; then
44693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44694$as_echo "$BUILD_CXX" >&6; }
44695else
44696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44697$as_echo "no" >&6; }
44698fi
44699
44700
44701          if test "x$BUILD_CXX" = x; then
44702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44703          fi
44704        else
44705          # Otherwise we believe it is a complete path. Use it as it is.
44706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44707$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44709$as_echo_n "checking for BUILD_CXX... " >&6; }
44710          if test ! -x "$tool_specified"; then
44711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44712$as_echo "not found" >&6; }
44713            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44714          fi
44715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44716$as_echo "$tool_specified" >&6; }
44717        fi
44718      fi
44719    fi
44720
44721  fi
44722
44723
44724
44725  if test "x$BUILD_CXX" = x; then
44726    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44727  fi
44728
44729
44730
44731  # Only process if variable expands to non-empty
44732
44733  if test "x$BUILD_CXX" != x; then
44734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44735
44736  # First separate the path from the arguments. This will split at the first
44737  # space.
44738  complete="$BUILD_CXX"
44739  path="${complete%% *}"
44740  tmp="$complete EOL"
44741  arguments="${tmp#* }"
44742
44743  # Input might be given as Windows format, start by converting to
44744  # unix format.
44745  new_path=`$CYGPATH -u "$path"`
44746
44747  # Now try to locate executable using which
44748  new_path=`$WHICH "$new_path" 2> /dev/null`
44749  # bat and cmd files are not always considered executable in cygwin causing which
44750  # to not find them
44751  if test "x$new_path" = x \
44752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44754    new_path=`$CYGPATH -u "$path"`
44755  fi
44756  if test "x$new_path" = x; then
44757    # Oops. Which didn't find the executable.
44758    # The splitting of arguments from the executable at a space might have been incorrect,
44759    # since paths with space are more likely in Windows. Give it another try with the whole
44760    # argument.
44761    path="$complete"
44762    arguments="EOL"
44763    new_path=`$CYGPATH -u "$path"`
44764    new_path=`$WHICH "$new_path" 2> /dev/null`
44765    # bat and cmd files are not always considered executable in cygwin causing which
44766    # to not find them
44767    if test "x$new_path" = x \
44768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44770      new_path=`$CYGPATH -u "$path"`
44771    fi
44772    if test "x$new_path" = x; then
44773      # It's still not found. Now this is an unrecoverable error.
44774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44775$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44776      has_space=`$ECHO "$complete" | $GREP " "`
44777      if test "x$has_space" != x; then
44778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44780      fi
44781      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44782    fi
44783  fi
44784
44785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44788  # "foo.exe" is OK but "foo" is an error.
44789  #
44790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44791  # It is also a way to make sure we got the proper file name for the real test later on.
44792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44793  if test "x$test_shortpath" = x; then
44794    # Short path failed, file does not exist as specified.
44795    # Try adding .exe or .cmd
44796    if test -f "${new_path}.exe"; then
44797      input_to_shortpath="${new_path}.exe"
44798    elif test -f "${new_path}.cmd"; then
44799      input_to_shortpath="${new_path}.cmd"
44800    else
44801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44802$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44805      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44806    fi
44807  else
44808    input_to_shortpath="$new_path"
44809  fi
44810
44811  # Call helper function which possibly converts this using DOS-style short mode.
44812  # If so, the updated path is stored in $new_path.
44813  new_path="$input_to_shortpath"
44814
44815  input_path="$input_to_shortpath"
44816  # Check if we need to convert this using DOS-style short mode. If the path
44817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44818  # take no chances and rewrite it.
44819  # Note: m4 eats our [], so we need to use [ and ] instead.
44820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44821  if test "x$has_forbidden_chars" != x; then
44822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44826      # Going to short mode and back again did indeed matter. Since short mode is
44827      # case insensitive, let's make it lowercase to improve readability.
44828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44829      # Now convert it back to Unix-style (cygpath)
44830      input_path=`$CYGPATH -u "$shortmode_path"`
44831      new_path="$input_path"
44832    fi
44833  fi
44834
44835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44836  if test "x$test_cygdrive_prefix" = x; then
44837    # As a simple fix, exclude /usr/bin since it's not a real path.
44838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44840      # a path prefixed by /cygdrive for fixpath to work.
44841      new_path="$CYGWIN_ROOT_PATH$input_path"
44842    fi
44843  fi
44844
44845  # remove trailing .exe if any
44846  new_path="${new_path/%.exe/}"
44847
44848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44849
44850  # First separate the path from the arguments. This will split at the first
44851  # space.
44852  complete="$BUILD_CXX"
44853  path="${complete%% *}"
44854  tmp="$complete EOL"
44855  arguments="${tmp#* }"
44856
44857  # Input might be given as Windows format, start by converting to
44858  # unix format.
44859  new_path="$path"
44860
44861  windows_path="$new_path"
44862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44863    unix_path=`$CYGPATH -u "$windows_path"`
44864    new_path="$unix_path"
44865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44867    new_path="$unix_path"
44868  fi
44869
44870
44871  # Now try to locate executable using which
44872  new_path=`$WHICH "$new_path" 2> /dev/null`
44873
44874  if test "x$new_path" = x; then
44875    # Oops. Which didn't find the executable.
44876    # The splitting of arguments from the executable at a space might have been incorrect,
44877    # since paths with space are more likely in Windows. Give it another try with the whole
44878    # argument.
44879    path="$complete"
44880    arguments="EOL"
44881    new_path="$path"
44882
44883  windows_path="$new_path"
44884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44885    unix_path=`$CYGPATH -u "$windows_path"`
44886    new_path="$unix_path"
44887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44889    new_path="$unix_path"
44890  fi
44891
44892
44893    new_path=`$WHICH "$new_path" 2> /dev/null`
44894    # bat and cmd files are not always considered executable in MSYS causing which
44895    # to not find them
44896    if test "x$new_path" = x \
44897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44899      new_path="$path"
44900
44901  windows_path="$new_path"
44902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44903    unix_path=`$CYGPATH -u "$windows_path"`
44904    new_path="$unix_path"
44905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44907    new_path="$unix_path"
44908  fi
44909
44910    fi
44911
44912    if test "x$new_path" = x; then
44913      # It's still not found. Now this is an unrecoverable error.
44914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44915$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44916      has_space=`$ECHO "$complete" | $GREP " "`
44917      if test "x$has_space" != x; then
44918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44920      fi
44921      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44922    fi
44923  fi
44924
44925  # Now new_path has a complete unix path to the binary
44926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44927    # Keep paths in /bin as-is, but remove trailing .exe if any
44928    new_path="${new_path/%.exe/}"
44929    # Do not save /bin paths to all_fixpath_prefixes!
44930  else
44931    # Not in mixed or Windows style, start by that.
44932    new_path=`cmd //c echo $new_path`
44933
44934  input_path="$new_path"
44935  # Check if we need to convert this using DOS-style short mode. If the path
44936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44937  # take no chances and rewrite it.
44938  # Note: m4 eats our [], so we need to use [ and ] instead.
44939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44940  if test "x$has_forbidden_chars" != x; then
44941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44943  fi
44944
44945    # Output is in $new_path
44946
44947  windows_path="$new_path"
44948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44949    unix_path=`$CYGPATH -u "$windows_path"`
44950    new_path="$unix_path"
44951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44953    new_path="$unix_path"
44954  fi
44955
44956    # remove trailing .exe if any
44957    new_path="${new_path/%.exe/}"
44958
44959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44961  fi
44962
44963    else
44964      # We're on a unix platform. Hooray! :)
44965      # First separate the path from the arguments. This will split at the first
44966      # space.
44967      complete="$BUILD_CXX"
44968      path="${complete%% *}"
44969      tmp="$complete EOL"
44970      arguments="${tmp#* }"
44971
44972      # Cannot rely on the command "which" here since it doesn't always work.
44973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44974      if test -z "$is_absolute_path"; then
44975        # Path to executable is not absolute. Find it.
44976        IFS_save="$IFS"
44977        IFS=:
44978        for p in $PATH; do
44979          if test -f "$p/$path" && test -x "$p/$path"; then
44980            new_path="$p/$path"
44981            break
44982          fi
44983        done
44984        IFS="$IFS_save"
44985      else
44986        # This is an absolute path, we can use it without further modifications.
44987        new_path="$path"
44988      fi
44989
44990      if test "x$new_path" = x; then
44991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44992$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44993        has_space=`$ECHO "$complete" | $GREP " "`
44994        if test "x$has_space" != x; then
44995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44997        fi
44998        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44999      fi
45000    fi
45001
45002    # Now join together the path and the arguments once again
45003    if test "x$arguments" != xEOL; then
45004      new_complete="$new_path ${arguments% *}"
45005    else
45006      new_complete="$new_path"
45007    fi
45008
45009    if test "x$complete" != "x$new_complete"; then
45010      BUILD_CXX="$new_complete"
45011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45012$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45013    fi
45014  fi
45015
45016
45017
45018  # Publish this variable in the help.
45019
45020
45021  if [ -z "${BUILD_NM+x}" ]; then
45022    # The variable is not set by user, try to locate tool using the code snippet
45023    for ac_prog in nm gcc-nm
45024do
45025  # Extract the first word of "$ac_prog", so it can be a program name with args.
45026set dummy $ac_prog; ac_word=$2
45027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45028$as_echo_n "checking for $ac_word... " >&6; }
45029if ${ac_cv_path_BUILD_NM+:} false; then :
45030  $as_echo_n "(cached) " >&6
45031else
45032  case $BUILD_NM in
45033  [\\/]* | ?:[\\/]*)
45034  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45035  ;;
45036  *)
45037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45038for as_dir in $PATH
45039do
45040  IFS=$as_save_IFS
45041  test -z "$as_dir" && as_dir=.
45042    for ac_exec_ext in '' $ac_executable_extensions; do
45043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45044    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45046    break 2
45047  fi
45048done
45049  done
45050IFS=$as_save_IFS
45051
45052  ;;
45053esac
45054fi
45055BUILD_NM=$ac_cv_path_BUILD_NM
45056if test -n "$BUILD_NM"; then
45057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45058$as_echo "$BUILD_NM" >&6; }
45059else
45060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45061$as_echo "no" >&6; }
45062fi
45063
45064
45065  test -n "$BUILD_NM" && break
45066done
45067
45068  else
45069    # The variable is set, but is it from the command line or the environment?
45070
45071    # Try to remove the string !BUILD_NM! from our list.
45072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45074      # If it failed, the variable was not from the command line. Ignore it,
45075      # but warn the user (except for BASH, which is always set by the calling BASH).
45076      if test "xBUILD_NM" != xBASH; then
45077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45078$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45079      fi
45080      # Try to locate tool using the code snippet
45081      for ac_prog in nm gcc-nm
45082do
45083  # Extract the first word of "$ac_prog", so it can be a program name with args.
45084set dummy $ac_prog; ac_word=$2
45085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45086$as_echo_n "checking for $ac_word... " >&6; }
45087if ${ac_cv_path_BUILD_NM+:} false; then :
45088  $as_echo_n "(cached) " >&6
45089else
45090  case $BUILD_NM in
45091  [\\/]* | ?:[\\/]*)
45092  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45093  ;;
45094  *)
45095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45096for as_dir in $PATH
45097do
45098  IFS=$as_save_IFS
45099  test -z "$as_dir" && as_dir=.
45100    for ac_exec_ext in '' $ac_executable_extensions; do
45101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45102    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45104    break 2
45105  fi
45106done
45107  done
45108IFS=$as_save_IFS
45109
45110  ;;
45111esac
45112fi
45113BUILD_NM=$ac_cv_path_BUILD_NM
45114if test -n "$BUILD_NM"; then
45115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45116$as_echo "$BUILD_NM" >&6; }
45117else
45118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45119$as_echo "no" >&6; }
45120fi
45121
45122
45123  test -n "$BUILD_NM" && break
45124done
45125
45126    else
45127      # If it succeeded, then it was overridden by the user. We will use it
45128      # for the tool.
45129
45130      # First remove it from the list of overridden variables, so we can test
45131      # for unknown variables in the end.
45132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45133
45134      # Check if we try to supply an empty value
45135      if test "x$BUILD_NM" = x; then
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45137$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45139$as_echo_n "checking for BUILD_NM... " >&6; }
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45141$as_echo "disabled" >&6; }
45142      else
45143        # Check if the provided tool contains a complete path.
45144        tool_specified="$BUILD_NM"
45145        tool_basename="${tool_specified##*/}"
45146        if test "x$tool_basename" = "x$tool_specified"; then
45147          # A command without a complete path is provided, search $PATH.
45148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45149$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45150          # Extract the first word of "$tool_basename", so it can be a program name with args.
45151set dummy $tool_basename; ac_word=$2
45152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45153$as_echo_n "checking for $ac_word... " >&6; }
45154if ${ac_cv_path_BUILD_NM+:} false; then :
45155  $as_echo_n "(cached) " >&6
45156else
45157  case $BUILD_NM in
45158  [\\/]* | ?:[\\/]*)
45159  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45160  ;;
45161  *)
45162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45163for as_dir in $PATH
45164do
45165  IFS=$as_save_IFS
45166  test -z "$as_dir" && as_dir=.
45167    for ac_exec_ext in '' $ac_executable_extensions; do
45168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45169    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45171    break 2
45172  fi
45173done
45174  done
45175IFS=$as_save_IFS
45176
45177  ;;
45178esac
45179fi
45180BUILD_NM=$ac_cv_path_BUILD_NM
45181if test -n "$BUILD_NM"; then
45182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45183$as_echo "$BUILD_NM" >&6; }
45184else
45185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45186$as_echo "no" >&6; }
45187fi
45188
45189
45190          if test "x$BUILD_NM" = x; then
45191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45192          fi
45193        else
45194          # Otherwise we believe it is a complete path. Use it as it is.
45195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45196$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45198$as_echo_n "checking for BUILD_NM... " >&6; }
45199          if test ! -x "$tool_specified"; then
45200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45201$as_echo "not found" >&6; }
45202            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45203          fi
45204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45205$as_echo "$tool_specified" >&6; }
45206        fi
45207      fi
45208    fi
45209
45210  fi
45211
45212
45213
45214  # Only process if variable expands to non-empty
45215
45216  if test "x$BUILD_NM" != x; then
45217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45218
45219  # First separate the path from the arguments. This will split at the first
45220  # space.
45221  complete="$BUILD_NM"
45222  path="${complete%% *}"
45223  tmp="$complete EOL"
45224  arguments="${tmp#* }"
45225
45226  # Input might be given as Windows format, start by converting to
45227  # unix format.
45228  new_path=`$CYGPATH -u "$path"`
45229
45230  # Now try to locate executable using which
45231  new_path=`$WHICH "$new_path" 2> /dev/null`
45232  # bat and cmd files are not always considered executable in cygwin causing which
45233  # to not find them
45234  if test "x$new_path" = x \
45235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45237    new_path=`$CYGPATH -u "$path"`
45238  fi
45239  if test "x$new_path" = x; then
45240    # Oops. Which didn't find the executable.
45241    # The splitting of arguments from the executable at a space might have been incorrect,
45242    # since paths with space are more likely in Windows. Give it another try with the whole
45243    # argument.
45244    path="$complete"
45245    arguments="EOL"
45246    new_path=`$CYGPATH -u "$path"`
45247    new_path=`$WHICH "$new_path" 2> /dev/null`
45248    # bat and cmd files are not always considered executable in cygwin causing which
45249    # to not find them
45250    if test "x$new_path" = x \
45251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45253      new_path=`$CYGPATH -u "$path"`
45254    fi
45255    if test "x$new_path" = x; then
45256      # It's still not found. Now this is an unrecoverable error.
45257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45258$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45259      has_space=`$ECHO "$complete" | $GREP " "`
45260      if test "x$has_space" != x; then
45261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45263      fi
45264      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45265    fi
45266  fi
45267
45268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45271  # "foo.exe" is OK but "foo" is an error.
45272  #
45273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45274  # It is also a way to make sure we got the proper file name for the real test later on.
45275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45276  if test "x$test_shortpath" = x; then
45277    # Short path failed, file does not exist as specified.
45278    # Try adding .exe or .cmd
45279    if test -f "${new_path}.exe"; then
45280      input_to_shortpath="${new_path}.exe"
45281    elif test -f "${new_path}.cmd"; then
45282      input_to_shortpath="${new_path}.cmd"
45283    else
45284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45285$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45288      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45289    fi
45290  else
45291    input_to_shortpath="$new_path"
45292  fi
45293
45294  # Call helper function which possibly converts this using DOS-style short mode.
45295  # If so, the updated path is stored in $new_path.
45296  new_path="$input_to_shortpath"
45297
45298  input_path="$input_to_shortpath"
45299  # Check if we need to convert this using DOS-style short mode. If the path
45300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45301  # take no chances and rewrite it.
45302  # Note: m4 eats our [], so we need to use [ and ] instead.
45303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45304  if test "x$has_forbidden_chars" != x; then
45305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45309      # Going to short mode and back again did indeed matter. Since short mode is
45310      # case insensitive, let's make it lowercase to improve readability.
45311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45312      # Now convert it back to Unix-style (cygpath)
45313      input_path=`$CYGPATH -u "$shortmode_path"`
45314      new_path="$input_path"
45315    fi
45316  fi
45317
45318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45319  if test "x$test_cygdrive_prefix" = x; then
45320    # As a simple fix, exclude /usr/bin since it's not a real path.
45321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45323      # a path prefixed by /cygdrive for fixpath to work.
45324      new_path="$CYGWIN_ROOT_PATH$input_path"
45325    fi
45326  fi
45327
45328  # remove trailing .exe if any
45329  new_path="${new_path/%.exe/}"
45330
45331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45332
45333  # First separate the path from the arguments. This will split at the first
45334  # space.
45335  complete="$BUILD_NM"
45336  path="${complete%% *}"
45337  tmp="$complete EOL"
45338  arguments="${tmp#* }"
45339
45340  # Input might be given as Windows format, start by converting to
45341  # unix format.
45342  new_path="$path"
45343
45344  windows_path="$new_path"
45345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45346    unix_path=`$CYGPATH -u "$windows_path"`
45347    new_path="$unix_path"
45348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45350    new_path="$unix_path"
45351  fi
45352
45353
45354  # Now try to locate executable using which
45355  new_path=`$WHICH "$new_path" 2> /dev/null`
45356
45357  if test "x$new_path" = x; then
45358    # Oops. Which didn't find the executable.
45359    # The splitting of arguments from the executable at a space might have been incorrect,
45360    # since paths with space are more likely in Windows. Give it another try with the whole
45361    # argument.
45362    path="$complete"
45363    arguments="EOL"
45364    new_path="$path"
45365
45366  windows_path="$new_path"
45367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368    unix_path=`$CYGPATH -u "$windows_path"`
45369    new_path="$unix_path"
45370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45372    new_path="$unix_path"
45373  fi
45374
45375
45376    new_path=`$WHICH "$new_path" 2> /dev/null`
45377    # bat and cmd files are not always considered executable in MSYS causing which
45378    # to not find them
45379    if test "x$new_path" = x \
45380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45382      new_path="$path"
45383
45384  windows_path="$new_path"
45385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45386    unix_path=`$CYGPATH -u "$windows_path"`
45387    new_path="$unix_path"
45388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45390    new_path="$unix_path"
45391  fi
45392
45393    fi
45394
45395    if test "x$new_path" = x; then
45396      # It's still not found. Now this is an unrecoverable error.
45397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45398$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45399      has_space=`$ECHO "$complete" | $GREP " "`
45400      if test "x$has_space" != x; then
45401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45403      fi
45404      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45405    fi
45406  fi
45407
45408  # Now new_path has a complete unix path to the binary
45409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45410    # Keep paths in /bin as-is, but remove trailing .exe if any
45411    new_path="${new_path/%.exe/}"
45412    # Do not save /bin paths to all_fixpath_prefixes!
45413  else
45414    # Not in mixed or Windows style, start by that.
45415    new_path=`cmd //c echo $new_path`
45416
45417  input_path="$new_path"
45418  # Check if we need to convert this using DOS-style short mode. If the path
45419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45420  # take no chances and rewrite it.
45421  # Note: m4 eats our [], so we need to use [ and ] instead.
45422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45423  if test "x$has_forbidden_chars" != x; then
45424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45426  fi
45427
45428    # Output is in $new_path
45429
45430  windows_path="$new_path"
45431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45432    unix_path=`$CYGPATH -u "$windows_path"`
45433    new_path="$unix_path"
45434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45436    new_path="$unix_path"
45437  fi
45438
45439    # remove trailing .exe if any
45440    new_path="${new_path/%.exe/}"
45441
45442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45444  fi
45445
45446    else
45447      # We're on a unix platform. Hooray! :)
45448      # First separate the path from the arguments. This will split at the first
45449      # space.
45450      complete="$BUILD_NM"
45451      path="${complete%% *}"
45452      tmp="$complete EOL"
45453      arguments="${tmp#* }"
45454
45455      # Cannot rely on the command "which" here since it doesn't always work.
45456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45457      if test -z "$is_absolute_path"; then
45458        # Path to executable is not absolute. Find it.
45459        IFS_save="$IFS"
45460        IFS=:
45461        for p in $PATH; do
45462          if test -f "$p/$path" && test -x "$p/$path"; then
45463            new_path="$p/$path"
45464            break
45465          fi
45466        done
45467        IFS="$IFS_save"
45468      else
45469        # This is an absolute path, we can use it without further modifications.
45470        new_path="$path"
45471      fi
45472
45473      if test "x$new_path" = x; then
45474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45475$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45476        has_space=`$ECHO "$complete" | $GREP " "`
45477        if test "x$has_space" != x; then
45478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45480        fi
45481        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45482      fi
45483    fi
45484
45485    # Now join together the path and the arguments once again
45486    if test "x$arguments" != xEOL; then
45487      new_complete="$new_path ${arguments% *}"
45488    else
45489      new_complete="$new_path"
45490    fi
45491
45492    if test "x$complete" != "x$new_complete"; then
45493      BUILD_NM="$new_complete"
45494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45495$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45496    fi
45497  fi
45498
45499
45500
45501  # Publish this variable in the help.
45502
45503
45504  if [ -z "${BUILD_AR+x}" ]; then
45505    # The variable is not set by user, try to locate tool using the code snippet
45506    for ac_prog in ar gcc-ar
45507do
45508  # Extract the first word of "$ac_prog", so it can be a program name with args.
45509set dummy $ac_prog; ac_word=$2
45510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45511$as_echo_n "checking for $ac_word... " >&6; }
45512if ${ac_cv_path_BUILD_AR+:} false; then :
45513  $as_echo_n "(cached) " >&6
45514else
45515  case $BUILD_AR in
45516  [\\/]* | ?:[\\/]*)
45517  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45518  ;;
45519  *)
45520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45521for as_dir in $PATH
45522do
45523  IFS=$as_save_IFS
45524  test -z "$as_dir" && as_dir=.
45525    for ac_exec_ext in '' $ac_executable_extensions; do
45526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45527    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45529    break 2
45530  fi
45531done
45532  done
45533IFS=$as_save_IFS
45534
45535  ;;
45536esac
45537fi
45538BUILD_AR=$ac_cv_path_BUILD_AR
45539if test -n "$BUILD_AR"; then
45540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45541$as_echo "$BUILD_AR" >&6; }
45542else
45543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45544$as_echo "no" >&6; }
45545fi
45546
45547
45548  test -n "$BUILD_AR" && break
45549done
45550
45551  else
45552    # The variable is set, but is it from the command line or the environment?
45553
45554    # Try to remove the string !BUILD_AR! from our list.
45555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45557      # If it failed, the variable was not from the command line. Ignore it,
45558      # but warn the user (except for BASH, which is always set by the calling BASH).
45559      if test "xBUILD_AR" != xBASH; then
45560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45561$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45562      fi
45563      # Try to locate tool using the code snippet
45564      for ac_prog in ar gcc-ar
45565do
45566  # Extract the first word of "$ac_prog", so it can be a program name with args.
45567set dummy $ac_prog; ac_word=$2
45568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45569$as_echo_n "checking for $ac_word... " >&6; }
45570if ${ac_cv_path_BUILD_AR+:} false; then :
45571  $as_echo_n "(cached) " >&6
45572else
45573  case $BUILD_AR in
45574  [\\/]* | ?:[\\/]*)
45575  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45576  ;;
45577  *)
45578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45579for as_dir in $PATH
45580do
45581  IFS=$as_save_IFS
45582  test -z "$as_dir" && as_dir=.
45583    for ac_exec_ext in '' $ac_executable_extensions; do
45584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45585    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45587    break 2
45588  fi
45589done
45590  done
45591IFS=$as_save_IFS
45592
45593  ;;
45594esac
45595fi
45596BUILD_AR=$ac_cv_path_BUILD_AR
45597if test -n "$BUILD_AR"; then
45598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45599$as_echo "$BUILD_AR" >&6; }
45600else
45601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45602$as_echo "no" >&6; }
45603fi
45604
45605
45606  test -n "$BUILD_AR" && break
45607done
45608
45609    else
45610      # If it succeeded, then it was overridden by the user. We will use it
45611      # for the tool.
45612
45613      # First remove it from the list of overridden variables, so we can test
45614      # for unknown variables in the end.
45615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45616
45617      # Check if we try to supply an empty value
45618      if test "x$BUILD_AR" = x; then
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45620$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45622$as_echo_n "checking for BUILD_AR... " >&6; }
45623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45624$as_echo "disabled" >&6; }
45625      else
45626        # Check if the provided tool contains a complete path.
45627        tool_specified="$BUILD_AR"
45628        tool_basename="${tool_specified##*/}"
45629        if test "x$tool_basename" = "x$tool_specified"; then
45630          # A command without a complete path is provided, search $PATH.
45631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45632$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45633          # Extract the first word of "$tool_basename", so it can be a program name with args.
45634set dummy $tool_basename; ac_word=$2
45635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45636$as_echo_n "checking for $ac_word... " >&6; }
45637if ${ac_cv_path_BUILD_AR+:} false; then :
45638  $as_echo_n "(cached) " >&6
45639else
45640  case $BUILD_AR in
45641  [\\/]* | ?:[\\/]*)
45642  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45643  ;;
45644  *)
45645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45646for as_dir in $PATH
45647do
45648  IFS=$as_save_IFS
45649  test -z "$as_dir" && as_dir=.
45650    for ac_exec_ext in '' $ac_executable_extensions; do
45651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45652    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45654    break 2
45655  fi
45656done
45657  done
45658IFS=$as_save_IFS
45659
45660  ;;
45661esac
45662fi
45663BUILD_AR=$ac_cv_path_BUILD_AR
45664if test -n "$BUILD_AR"; then
45665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45666$as_echo "$BUILD_AR" >&6; }
45667else
45668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45669$as_echo "no" >&6; }
45670fi
45671
45672
45673          if test "x$BUILD_AR" = x; then
45674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45675          fi
45676        else
45677          # Otherwise we believe it is a complete path. Use it as it is.
45678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45679$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45681$as_echo_n "checking for BUILD_AR... " >&6; }
45682          if test ! -x "$tool_specified"; then
45683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45684$as_echo "not found" >&6; }
45685            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45686          fi
45687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45688$as_echo "$tool_specified" >&6; }
45689        fi
45690      fi
45691    fi
45692
45693  fi
45694
45695
45696
45697  # Only process if variable expands to non-empty
45698
45699  if test "x$BUILD_AR" != x; then
45700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45701
45702  # First separate the path from the arguments. This will split at the first
45703  # space.
45704  complete="$BUILD_AR"
45705  path="${complete%% *}"
45706  tmp="$complete EOL"
45707  arguments="${tmp#* }"
45708
45709  # Input might be given as Windows format, start by converting to
45710  # unix format.
45711  new_path=`$CYGPATH -u "$path"`
45712
45713  # Now try to locate executable using which
45714  new_path=`$WHICH "$new_path" 2> /dev/null`
45715  # bat and cmd files are not always considered executable in cygwin causing which
45716  # to not find them
45717  if test "x$new_path" = x \
45718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45720    new_path=`$CYGPATH -u "$path"`
45721  fi
45722  if test "x$new_path" = x; then
45723    # Oops. Which didn't find the executable.
45724    # The splitting of arguments from the executable at a space might have been incorrect,
45725    # since paths with space are more likely in Windows. Give it another try with the whole
45726    # argument.
45727    path="$complete"
45728    arguments="EOL"
45729    new_path=`$CYGPATH -u "$path"`
45730    new_path=`$WHICH "$new_path" 2> /dev/null`
45731    # bat and cmd files are not always considered executable in cygwin causing which
45732    # to not find them
45733    if test "x$new_path" = x \
45734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45736      new_path=`$CYGPATH -u "$path"`
45737    fi
45738    if test "x$new_path" = x; then
45739      # It's still not found. Now this is an unrecoverable error.
45740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45741$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45742      has_space=`$ECHO "$complete" | $GREP " "`
45743      if test "x$has_space" != x; then
45744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45746      fi
45747      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45748    fi
45749  fi
45750
45751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45754  # "foo.exe" is OK but "foo" is an error.
45755  #
45756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45757  # It is also a way to make sure we got the proper file name for the real test later on.
45758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45759  if test "x$test_shortpath" = x; then
45760    # Short path failed, file does not exist as specified.
45761    # Try adding .exe or .cmd
45762    if test -f "${new_path}.exe"; then
45763      input_to_shortpath="${new_path}.exe"
45764    elif test -f "${new_path}.cmd"; then
45765      input_to_shortpath="${new_path}.cmd"
45766    else
45767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45768$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45771      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45772    fi
45773  else
45774    input_to_shortpath="$new_path"
45775  fi
45776
45777  # Call helper function which possibly converts this using DOS-style short mode.
45778  # If so, the updated path is stored in $new_path.
45779  new_path="$input_to_shortpath"
45780
45781  input_path="$input_to_shortpath"
45782  # Check if we need to convert this using DOS-style short mode. If the path
45783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45784  # take no chances and rewrite it.
45785  # Note: m4 eats our [], so we need to use [ and ] instead.
45786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45787  if test "x$has_forbidden_chars" != x; then
45788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45792      # Going to short mode and back again did indeed matter. Since short mode is
45793      # case insensitive, let's make it lowercase to improve readability.
45794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45795      # Now convert it back to Unix-style (cygpath)
45796      input_path=`$CYGPATH -u "$shortmode_path"`
45797      new_path="$input_path"
45798    fi
45799  fi
45800
45801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45802  if test "x$test_cygdrive_prefix" = x; then
45803    # As a simple fix, exclude /usr/bin since it's not a real path.
45804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45806      # a path prefixed by /cygdrive for fixpath to work.
45807      new_path="$CYGWIN_ROOT_PATH$input_path"
45808    fi
45809  fi
45810
45811  # remove trailing .exe if any
45812  new_path="${new_path/%.exe/}"
45813
45814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45815
45816  # First separate the path from the arguments. This will split at the first
45817  # space.
45818  complete="$BUILD_AR"
45819  path="${complete%% *}"
45820  tmp="$complete EOL"
45821  arguments="${tmp#* }"
45822
45823  # Input might be given as Windows format, start by converting to
45824  # unix format.
45825  new_path="$path"
45826
45827  windows_path="$new_path"
45828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45829    unix_path=`$CYGPATH -u "$windows_path"`
45830    new_path="$unix_path"
45831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45833    new_path="$unix_path"
45834  fi
45835
45836
45837  # Now try to locate executable using which
45838  new_path=`$WHICH "$new_path" 2> /dev/null`
45839
45840  if test "x$new_path" = x; then
45841    # Oops. Which didn't find the executable.
45842    # The splitting of arguments from the executable at a space might have been incorrect,
45843    # since paths with space are more likely in Windows. Give it another try with the whole
45844    # argument.
45845    path="$complete"
45846    arguments="EOL"
45847    new_path="$path"
45848
45849  windows_path="$new_path"
45850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45851    unix_path=`$CYGPATH -u "$windows_path"`
45852    new_path="$unix_path"
45853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45855    new_path="$unix_path"
45856  fi
45857
45858
45859    new_path=`$WHICH "$new_path" 2> /dev/null`
45860    # bat and cmd files are not always considered executable in MSYS causing which
45861    # to not find them
45862    if test "x$new_path" = x \
45863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45865      new_path="$path"
45866
45867  windows_path="$new_path"
45868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45869    unix_path=`$CYGPATH -u "$windows_path"`
45870    new_path="$unix_path"
45871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45873    new_path="$unix_path"
45874  fi
45875
45876    fi
45877
45878    if test "x$new_path" = x; then
45879      # It's still not found. Now this is an unrecoverable error.
45880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45881$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45882      has_space=`$ECHO "$complete" | $GREP " "`
45883      if test "x$has_space" != x; then
45884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45886      fi
45887      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45888    fi
45889  fi
45890
45891  # Now new_path has a complete unix path to the binary
45892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45893    # Keep paths in /bin as-is, but remove trailing .exe if any
45894    new_path="${new_path/%.exe/}"
45895    # Do not save /bin paths to all_fixpath_prefixes!
45896  else
45897    # Not in mixed or Windows style, start by that.
45898    new_path=`cmd //c echo $new_path`
45899
45900  input_path="$new_path"
45901  # Check if we need to convert this using DOS-style short mode. If the path
45902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45903  # take no chances and rewrite it.
45904  # Note: m4 eats our [], so we need to use [ and ] instead.
45905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45906  if test "x$has_forbidden_chars" != x; then
45907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45909  fi
45910
45911    # Output is in $new_path
45912
45913  windows_path="$new_path"
45914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45915    unix_path=`$CYGPATH -u "$windows_path"`
45916    new_path="$unix_path"
45917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45919    new_path="$unix_path"
45920  fi
45921
45922    # remove trailing .exe if any
45923    new_path="${new_path/%.exe/}"
45924
45925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45927  fi
45928
45929    else
45930      # We're on a unix platform. Hooray! :)
45931      # First separate the path from the arguments. This will split at the first
45932      # space.
45933      complete="$BUILD_AR"
45934      path="${complete%% *}"
45935      tmp="$complete EOL"
45936      arguments="${tmp#* }"
45937
45938      # Cannot rely on the command "which" here since it doesn't always work.
45939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45940      if test -z "$is_absolute_path"; then
45941        # Path to executable is not absolute. Find it.
45942        IFS_save="$IFS"
45943        IFS=:
45944        for p in $PATH; do
45945          if test -f "$p/$path" && test -x "$p/$path"; then
45946            new_path="$p/$path"
45947            break
45948          fi
45949        done
45950        IFS="$IFS_save"
45951      else
45952        # This is an absolute path, we can use it without further modifications.
45953        new_path="$path"
45954      fi
45955
45956      if test "x$new_path" = x; then
45957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45958$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45959        has_space=`$ECHO "$complete" | $GREP " "`
45960        if test "x$has_space" != x; then
45961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45963        fi
45964        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45965      fi
45966    fi
45967
45968    # Now join together the path and the arguments once again
45969    if test "x$arguments" != xEOL; then
45970      new_complete="$new_path ${arguments% *}"
45971    else
45972      new_complete="$new_path"
45973    fi
45974
45975    if test "x$complete" != "x$new_complete"; then
45976      BUILD_AR="$new_complete"
45977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45978$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45979    fi
45980  fi
45981
45982
45983
45984  # Publish this variable in the help.
45985
45986
45987  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45988    # The variable is not set by user, try to locate tool using the code snippet
45989    for ac_prog in objcopy
45990do
45991  # Extract the first word of "$ac_prog", so it can be a program name with args.
45992set dummy $ac_prog; ac_word=$2
45993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45994$as_echo_n "checking for $ac_word... " >&6; }
45995if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45996  $as_echo_n "(cached) " >&6
45997else
45998  case $BUILD_OBJCOPY in
45999  [\\/]* | ?:[\\/]*)
46000  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46001  ;;
46002  *)
46003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46004for as_dir in $PATH
46005do
46006  IFS=$as_save_IFS
46007  test -z "$as_dir" && as_dir=.
46008    for ac_exec_ext in '' $ac_executable_extensions; do
46009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46010    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46012    break 2
46013  fi
46014done
46015  done
46016IFS=$as_save_IFS
46017
46018  ;;
46019esac
46020fi
46021BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46022if test -n "$BUILD_OBJCOPY"; then
46023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46024$as_echo "$BUILD_OBJCOPY" >&6; }
46025else
46026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46027$as_echo "no" >&6; }
46028fi
46029
46030
46031  test -n "$BUILD_OBJCOPY" && break
46032done
46033
46034  else
46035    # The variable is set, but is it from the command line or the environment?
46036
46037    # Try to remove the string !BUILD_OBJCOPY! from our list.
46038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46040      # If it failed, the variable was not from the command line. Ignore it,
46041      # but warn the user (except for BASH, which is always set by the calling BASH).
46042      if test "xBUILD_OBJCOPY" != xBASH; then
46043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46044$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46045      fi
46046      # Try to locate tool using the code snippet
46047      for ac_prog in objcopy
46048do
46049  # Extract the first word of "$ac_prog", so it can be a program name with args.
46050set dummy $ac_prog; ac_word=$2
46051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46052$as_echo_n "checking for $ac_word... " >&6; }
46053if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46054  $as_echo_n "(cached) " >&6
46055else
46056  case $BUILD_OBJCOPY in
46057  [\\/]* | ?:[\\/]*)
46058  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46059  ;;
46060  *)
46061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46062for as_dir in $PATH
46063do
46064  IFS=$as_save_IFS
46065  test -z "$as_dir" && as_dir=.
46066    for ac_exec_ext in '' $ac_executable_extensions; do
46067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46068    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46070    break 2
46071  fi
46072done
46073  done
46074IFS=$as_save_IFS
46075
46076  ;;
46077esac
46078fi
46079BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46080if test -n "$BUILD_OBJCOPY"; then
46081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46082$as_echo "$BUILD_OBJCOPY" >&6; }
46083else
46084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46085$as_echo "no" >&6; }
46086fi
46087
46088
46089  test -n "$BUILD_OBJCOPY" && break
46090done
46091
46092    else
46093      # If it succeeded, then it was overridden by the user. We will use it
46094      # for the tool.
46095
46096      # First remove it from the list of overridden variables, so we can test
46097      # for unknown variables in the end.
46098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46099
46100      # Check if we try to supply an empty value
46101      if test "x$BUILD_OBJCOPY" = x; then
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46103$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46105$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46107$as_echo "disabled" >&6; }
46108      else
46109        # Check if the provided tool contains a complete path.
46110        tool_specified="$BUILD_OBJCOPY"
46111        tool_basename="${tool_specified##*/}"
46112        if test "x$tool_basename" = "x$tool_specified"; then
46113          # A command without a complete path is provided, search $PATH.
46114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46115$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46116          # Extract the first word of "$tool_basename", so it can be a program name with args.
46117set dummy $tool_basename; ac_word=$2
46118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46119$as_echo_n "checking for $ac_word... " >&6; }
46120if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46121  $as_echo_n "(cached) " >&6
46122else
46123  case $BUILD_OBJCOPY in
46124  [\\/]* | ?:[\\/]*)
46125  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46126  ;;
46127  *)
46128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46129for as_dir in $PATH
46130do
46131  IFS=$as_save_IFS
46132  test -z "$as_dir" && as_dir=.
46133    for ac_exec_ext in '' $ac_executable_extensions; do
46134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46135    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46137    break 2
46138  fi
46139done
46140  done
46141IFS=$as_save_IFS
46142
46143  ;;
46144esac
46145fi
46146BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46147if test -n "$BUILD_OBJCOPY"; then
46148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46149$as_echo "$BUILD_OBJCOPY" >&6; }
46150else
46151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46152$as_echo "no" >&6; }
46153fi
46154
46155
46156          if test "x$BUILD_OBJCOPY" = x; then
46157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46158          fi
46159        else
46160          # Otherwise we believe it is a complete path. Use it as it is.
46161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46162$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46164$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46165          if test ! -x "$tool_specified"; then
46166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46167$as_echo "not found" >&6; }
46168            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46169          fi
46170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46171$as_echo "$tool_specified" >&6; }
46172        fi
46173      fi
46174    fi
46175
46176  fi
46177
46178
46179
46180  # Only process if variable expands to non-empty
46181
46182  if test "x$BUILD_OBJCOPY" != x; then
46183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46184
46185  # First separate the path from the arguments. This will split at the first
46186  # space.
46187  complete="$BUILD_OBJCOPY"
46188  path="${complete%% *}"
46189  tmp="$complete EOL"
46190  arguments="${tmp#* }"
46191
46192  # Input might be given as Windows format, start by converting to
46193  # unix format.
46194  new_path=`$CYGPATH -u "$path"`
46195
46196  # Now try to locate executable using which
46197  new_path=`$WHICH "$new_path" 2> /dev/null`
46198  # bat and cmd files are not always considered executable in cygwin causing which
46199  # to not find them
46200  if test "x$new_path" = x \
46201      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46202      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46203    new_path=`$CYGPATH -u "$path"`
46204  fi
46205  if test "x$new_path" = x; then
46206    # Oops. Which didn't find the executable.
46207    # The splitting of arguments from the executable at a space might have been incorrect,
46208    # since paths with space are more likely in Windows. Give it another try with the whole
46209    # argument.
46210    path="$complete"
46211    arguments="EOL"
46212    new_path=`$CYGPATH -u "$path"`
46213    new_path=`$WHICH "$new_path" 2> /dev/null`
46214    # bat and cmd files are not always considered executable in cygwin causing which
46215    # to not find them
46216    if test "x$new_path" = x \
46217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46219      new_path=`$CYGPATH -u "$path"`
46220    fi
46221    if test "x$new_path" = x; then
46222      # It's still not found. Now this is an unrecoverable error.
46223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46224$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46225      has_space=`$ECHO "$complete" | $GREP " "`
46226      if test "x$has_space" != x; then
46227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46229      fi
46230      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46231    fi
46232  fi
46233
46234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46237  # "foo.exe" is OK but "foo" is an error.
46238  #
46239  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46240  # It is also a way to make sure we got the proper file name for the real test later on.
46241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46242  if test "x$test_shortpath" = x; then
46243    # Short path failed, file does not exist as specified.
46244    # Try adding .exe or .cmd
46245    if test -f "${new_path}.exe"; then
46246      input_to_shortpath="${new_path}.exe"
46247    elif test -f "${new_path}.cmd"; then
46248      input_to_shortpath="${new_path}.cmd"
46249    else
46250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46251$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46254      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46255    fi
46256  else
46257    input_to_shortpath="$new_path"
46258  fi
46259
46260  # Call helper function which possibly converts this using DOS-style short mode.
46261  # If so, the updated path is stored in $new_path.
46262  new_path="$input_to_shortpath"
46263
46264  input_path="$input_to_shortpath"
46265  # Check if we need to convert this using DOS-style short mode. If the path
46266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46267  # take no chances and rewrite it.
46268  # Note: m4 eats our [], so we need to use [ and ] instead.
46269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46270  if test "x$has_forbidden_chars" != x; then
46271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46275      # Going to short mode and back again did indeed matter. Since short mode is
46276      # case insensitive, let's make it lowercase to improve readability.
46277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46278      # Now convert it back to Unix-style (cygpath)
46279      input_path=`$CYGPATH -u "$shortmode_path"`
46280      new_path="$input_path"
46281    fi
46282  fi
46283
46284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46285  if test "x$test_cygdrive_prefix" = x; then
46286    # As a simple fix, exclude /usr/bin since it's not a real path.
46287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46289      # a path prefixed by /cygdrive for fixpath to work.
46290      new_path="$CYGWIN_ROOT_PATH$input_path"
46291    fi
46292  fi
46293
46294  # remove trailing .exe if any
46295  new_path="${new_path/%.exe/}"
46296
46297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46298
46299  # First separate the path from the arguments. This will split at the first
46300  # space.
46301  complete="$BUILD_OBJCOPY"
46302  path="${complete%% *}"
46303  tmp="$complete EOL"
46304  arguments="${tmp#* }"
46305
46306  # Input might be given as Windows format, start by converting to
46307  # unix format.
46308  new_path="$path"
46309
46310  windows_path="$new_path"
46311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46312    unix_path=`$CYGPATH -u "$windows_path"`
46313    new_path="$unix_path"
46314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46316    new_path="$unix_path"
46317  fi
46318
46319
46320  # Now try to locate executable using which
46321  new_path=`$WHICH "$new_path" 2> /dev/null`
46322
46323  if test "x$new_path" = x; then
46324    # Oops. Which didn't find the executable.
46325    # The splitting of arguments from the executable at a space might have been incorrect,
46326    # since paths with space are more likely in Windows. Give it another try with the whole
46327    # argument.
46328    path="$complete"
46329    arguments="EOL"
46330    new_path="$path"
46331
46332  windows_path="$new_path"
46333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334    unix_path=`$CYGPATH -u "$windows_path"`
46335    new_path="$unix_path"
46336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46338    new_path="$unix_path"
46339  fi
46340
46341
46342    new_path=`$WHICH "$new_path" 2> /dev/null`
46343    # bat and cmd files are not always considered executable in MSYS causing which
46344    # to not find them
46345    if test "x$new_path" = x \
46346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46348      new_path="$path"
46349
46350  windows_path="$new_path"
46351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46352    unix_path=`$CYGPATH -u "$windows_path"`
46353    new_path="$unix_path"
46354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46356    new_path="$unix_path"
46357  fi
46358
46359    fi
46360
46361    if test "x$new_path" = x; then
46362      # It's still not found. Now this is an unrecoverable error.
46363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46364$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46365      has_space=`$ECHO "$complete" | $GREP " "`
46366      if test "x$has_space" != x; then
46367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46369      fi
46370      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46371    fi
46372  fi
46373
46374  # Now new_path has a complete unix path to the binary
46375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46376    # Keep paths in /bin as-is, but remove trailing .exe if any
46377    new_path="${new_path/%.exe/}"
46378    # Do not save /bin paths to all_fixpath_prefixes!
46379  else
46380    # Not in mixed or Windows style, start by that.
46381    new_path=`cmd //c echo $new_path`
46382
46383  input_path="$new_path"
46384  # Check if we need to convert this using DOS-style short mode. If the path
46385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46386  # take no chances and rewrite it.
46387  # Note: m4 eats our [], so we need to use [ and ] instead.
46388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46389  if test "x$has_forbidden_chars" != x; then
46390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46392  fi
46393
46394    # Output is in $new_path
46395
46396  windows_path="$new_path"
46397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46398    unix_path=`$CYGPATH -u "$windows_path"`
46399    new_path="$unix_path"
46400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46402    new_path="$unix_path"
46403  fi
46404
46405    # remove trailing .exe if any
46406    new_path="${new_path/%.exe/}"
46407
46408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46410  fi
46411
46412    else
46413      # We're on a unix platform. Hooray! :)
46414      # First separate the path from the arguments. This will split at the first
46415      # space.
46416      complete="$BUILD_OBJCOPY"
46417      path="${complete%% *}"
46418      tmp="$complete EOL"
46419      arguments="${tmp#* }"
46420
46421      # Cannot rely on the command "which" here since it doesn't always work.
46422      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46423      if test -z "$is_absolute_path"; then
46424        # Path to executable is not absolute. Find it.
46425        IFS_save="$IFS"
46426        IFS=:
46427        for p in $PATH; do
46428          if test -f "$p/$path" && test -x "$p/$path"; then
46429            new_path="$p/$path"
46430            break
46431          fi
46432        done
46433        IFS="$IFS_save"
46434      else
46435        # This is an absolute path, we can use it without further modifications.
46436        new_path="$path"
46437      fi
46438
46439      if test "x$new_path" = x; then
46440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46441$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46442        has_space=`$ECHO "$complete" | $GREP " "`
46443        if test "x$has_space" != x; then
46444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46446        fi
46447        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46448      fi
46449    fi
46450
46451    # Now join together the path and the arguments once again
46452    if test "x$arguments" != xEOL; then
46453      new_complete="$new_path ${arguments% *}"
46454    else
46455      new_complete="$new_path"
46456    fi
46457
46458    if test "x$complete" != "x$new_complete"; then
46459      BUILD_OBJCOPY="$new_complete"
46460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46461$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46462    fi
46463  fi
46464
46465
46466
46467  # Publish this variable in the help.
46468
46469
46470  if [ -z "${BUILD_STRIP+x}" ]; then
46471    # The variable is not set by user, try to locate tool using the code snippet
46472    for ac_prog in strip
46473do
46474  # Extract the first word of "$ac_prog", so it can be a program name with args.
46475set dummy $ac_prog; ac_word=$2
46476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46477$as_echo_n "checking for $ac_word... " >&6; }
46478if ${ac_cv_path_BUILD_STRIP+:} false; then :
46479  $as_echo_n "(cached) " >&6
46480else
46481  case $BUILD_STRIP in
46482  [\\/]* | ?:[\\/]*)
46483  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46484  ;;
46485  *)
46486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46487for as_dir in $PATH
46488do
46489  IFS=$as_save_IFS
46490  test -z "$as_dir" && as_dir=.
46491    for ac_exec_ext in '' $ac_executable_extensions; do
46492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46493    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46495    break 2
46496  fi
46497done
46498  done
46499IFS=$as_save_IFS
46500
46501  ;;
46502esac
46503fi
46504BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46505if test -n "$BUILD_STRIP"; then
46506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46507$as_echo "$BUILD_STRIP" >&6; }
46508else
46509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46510$as_echo "no" >&6; }
46511fi
46512
46513
46514  test -n "$BUILD_STRIP" && break
46515done
46516
46517  else
46518    # The variable is set, but is it from the command line or the environment?
46519
46520    # Try to remove the string !BUILD_STRIP! from our list.
46521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46523      # If it failed, the variable was not from the command line. Ignore it,
46524      # but warn the user (except for BASH, which is always set by the calling BASH).
46525      if test "xBUILD_STRIP" != xBASH; then
46526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46527$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46528      fi
46529      # Try to locate tool using the code snippet
46530      for ac_prog in strip
46531do
46532  # Extract the first word of "$ac_prog", so it can be a program name with args.
46533set dummy $ac_prog; ac_word=$2
46534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46535$as_echo_n "checking for $ac_word... " >&6; }
46536if ${ac_cv_path_BUILD_STRIP+:} false; then :
46537  $as_echo_n "(cached) " >&6
46538else
46539  case $BUILD_STRIP in
46540  [\\/]* | ?:[\\/]*)
46541  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46542  ;;
46543  *)
46544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46545for as_dir in $PATH
46546do
46547  IFS=$as_save_IFS
46548  test -z "$as_dir" && as_dir=.
46549    for ac_exec_ext in '' $ac_executable_extensions; do
46550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46551    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46553    break 2
46554  fi
46555done
46556  done
46557IFS=$as_save_IFS
46558
46559  ;;
46560esac
46561fi
46562BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46563if test -n "$BUILD_STRIP"; then
46564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46565$as_echo "$BUILD_STRIP" >&6; }
46566else
46567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46568$as_echo "no" >&6; }
46569fi
46570
46571
46572  test -n "$BUILD_STRIP" && break
46573done
46574
46575    else
46576      # If it succeeded, then it was overridden by the user. We will use it
46577      # for the tool.
46578
46579      # First remove it from the list of overridden variables, so we can test
46580      # for unknown variables in the end.
46581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46582
46583      # Check if we try to supply an empty value
46584      if test "x$BUILD_STRIP" = x; then
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46586$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46588$as_echo_n "checking for BUILD_STRIP... " >&6; }
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46590$as_echo "disabled" >&6; }
46591      else
46592        # Check if the provided tool contains a complete path.
46593        tool_specified="$BUILD_STRIP"
46594        tool_basename="${tool_specified##*/}"
46595        if test "x$tool_basename" = "x$tool_specified"; then
46596          # A command without a complete path is provided, search $PATH.
46597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46598$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46599          # Extract the first word of "$tool_basename", so it can be a program name with args.
46600set dummy $tool_basename; ac_word=$2
46601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46602$as_echo_n "checking for $ac_word... " >&6; }
46603if ${ac_cv_path_BUILD_STRIP+:} false; then :
46604  $as_echo_n "(cached) " >&6
46605else
46606  case $BUILD_STRIP in
46607  [\\/]* | ?:[\\/]*)
46608  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46609  ;;
46610  *)
46611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46612for as_dir in $PATH
46613do
46614  IFS=$as_save_IFS
46615  test -z "$as_dir" && as_dir=.
46616    for ac_exec_ext in '' $ac_executable_extensions; do
46617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46618    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46620    break 2
46621  fi
46622done
46623  done
46624IFS=$as_save_IFS
46625
46626  ;;
46627esac
46628fi
46629BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46630if test -n "$BUILD_STRIP"; then
46631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46632$as_echo "$BUILD_STRIP" >&6; }
46633else
46634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46635$as_echo "no" >&6; }
46636fi
46637
46638
46639          if test "x$BUILD_STRIP" = x; then
46640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46641          fi
46642        else
46643          # Otherwise we believe it is a complete path. Use it as it is.
46644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46645$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46647$as_echo_n "checking for BUILD_STRIP... " >&6; }
46648          if test ! -x "$tool_specified"; then
46649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46650$as_echo "not found" >&6; }
46651            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46652          fi
46653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46654$as_echo "$tool_specified" >&6; }
46655        fi
46656      fi
46657    fi
46658
46659  fi
46660
46661
46662
46663  # Only process if variable expands to non-empty
46664
46665  if test "x$BUILD_STRIP" != x; then
46666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46667
46668  # First separate the path from the arguments. This will split at the first
46669  # space.
46670  complete="$BUILD_STRIP"
46671  path="${complete%% *}"
46672  tmp="$complete EOL"
46673  arguments="${tmp#* }"
46674
46675  # Input might be given as Windows format, start by converting to
46676  # unix format.
46677  new_path=`$CYGPATH -u "$path"`
46678
46679  # Now try to locate executable using which
46680  new_path=`$WHICH "$new_path" 2> /dev/null`
46681  # bat and cmd files are not always considered executable in cygwin causing which
46682  # to not find them
46683  if test "x$new_path" = x \
46684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46686    new_path=`$CYGPATH -u "$path"`
46687  fi
46688  if test "x$new_path" = x; then
46689    # Oops. Which didn't find the executable.
46690    # The splitting of arguments from the executable at a space might have been incorrect,
46691    # since paths with space are more likely in Windows. Give it another try with the whole
46692    # argument.
46693    path="$complete"
46694    arguments="EOL"
46695    new_path=`$CYGPATH -u "$path"`
46696    new_path=`$WHICH "$new_path" 2> /dev/null`
46697    # bat and cmd files are not always considered executable in cygwin causing which
46698    # to not find them
46699    if test "x$new_path" = x \
46700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46702      new_path=`$CYGPATH -u "$path"`
46703    fi
46704    if test "x$new_path" = x; then
46705      # It's still not found. Now this is an unrecoverable error.
46706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46707$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46708      has_space=`$ECHO "$complete" | $GREP " "`
46709      if test "x$has_space" != x; then
46710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46712      fi
46713      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46714    fi
46715  fi
46716
46717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46720  # "foo.exe" is OK but "foo" is an error.
46721  #
46722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46723  # It is also a way to make sure we got the proper file name for the real test later on.
46724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46725  if test "x$test_shortpath" = x; then
46726    # Short path failed, file does not exist as specified.
46727    # Try adding .exe or .cmd
46728    if test -f "${new_path}.exe"; then
46729      input_to_shortpath="${new_path}.exe"
46730    elif test -f "${new_path}.cmd"; then
46731      input_to_shortpath="${new_path}.cmd"
46732    else
46733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46734$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46737      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46738    fi
46739  else
46740    input_to_shortpath="$new_path"
46741  fi
46742
46743  # Call helper function which possibly converts this using DOS-style short mode.
46744  # If so, the updated path is stored in $new_path.
46745  new_path="$input_to_shortpath"
46746
46747  input_path="$input_to_shortpath"
46748  # Check if we need to convert this using DOS-style short mode. If the path
46749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46750  # take no chances and rewrite it.
46751  # Note: m4 eats our [], so we need to use [ and ] instead.
46752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46753  if test "x$has_forbidden_chars" != x; then
46754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46758      # Going to short mode and back again did indeed matter. Since short mode is
46759      # case insensitive, let's make it lowercase to improve readability.
46760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46761      # Now convert it back to Unix-style (cygpath)
46762      input_path=`$CYGPATH -u "$shortmode_path"`
46763      new_path="$input_path"
46764    fi
46765  fi
46766
46767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46768  if test "x$test_cygdrive_prefix" = x; then
46769    # As a simple fix, exclude /usr/bin since it's not a real path.
46770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46772      # a path prefixed by /cygdrive for fixpath to work.
46773      new_path="$CYGWIN_ROOT_PATH$input_path"
46774    fi
46775  fi
46776
46777  # remove trailing .exe if any
46778  new_path="${new_path/%.exe/}"
46779
46780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46781
46782  # First separate the path from the arguments. This will split at the first
46783  # space.
46784  complete="$BUILD_STRIP"
46785  path="${complete%% *}"
46786  tmp="$complete EOL"
46787  arguments="${tmp#* }"
46788
46789  # Input might be given as Windows format, start by converting to
46790  # unix format.
46791  new_path="$path"
46792
46793  windows_path="$new_path"
46794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46795    unix_path=`$CYGPATH -u "$windows_path"`
46796    new_path="$unix_path"
46797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46799    new_path="$unix_path"
46800  fi
46801
46802
46803  # Now try to locate executable using which
46804  new_path=`$WHICH "$new_path" 2> /dev/null`
46805
46806  if test "x$new_path" = x; then
46807    # Oops. Which didn't find the executable.
46808    # The splitting of arguments from the executable at a space might have been incorrect,
46809    # since paths with space are more likely in Windows. Give it another try with the whole
46810    # argument.
46811    path="$complete"
46812    arguments="EOL"
46813    new_path="$path"
46814
46815  windows_path="$new_path"
46816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46817    unix_path=`$CYGPATH -u "$windows_path"`
46818    new_path="$unix_path"
46819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46821    new_path="$unix_path"
46822  fi
46823
46824
46825    new_path=`$WHICH "$new_path" 2> /dev/null`
46826    # bat and cmd files are not always considered executable in MSYS causing which
46827    # to not find them
46828    if test "x$new_path" = x \
46829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46831      new_path="$path"
46832
46833  windows_path="$new_path"
46834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46835    unix_path=`$CYGPATH -u "$windows_path"`
46836    new_path="$unix_path"
46837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46839    new_path="$unix_path"
46840  fi
46841
46842    fi
46843
46844    if test "x$new_path" = x; then
46845      # It's still not found. Now this is an unrecoverable error.
46846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46847$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46848      has_space=`$ECHO "$complete" | $GREP " "`
46849      if test "x$has_space" != x; then
46850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46852      fi
46853      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46854    fi
46855  fi
46856
46857  # Now new_path has a complete unix path to the binary
46858  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46859    # Keep paths in /bin as-is, but remove trailing .exe if any
46860    new_path="${new_path/%.exe/}"
46861    # Do not save /bin paths to all_fixpath_prefixes!
46862  else
46863    # Not in mixed or Windows style, start by that.
46864    new_path=`cmd //c echo $new_path`
46865
46866  input_path="$new_path"
46867  # Check if we need to convert this using DOS-style short mode. If the path
46868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46869  # take no chances and rewrite it.
46870  # Note: m4 eats our [], so we need to use [ and ] instead.
46871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46872  if test "x$has_forbidden_chars" != x; then
46873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46875  fi
46876
46877    # Output is in $new_path
46878
46879  windows_path="$new_path"
46880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46881    unix_path=`$CYGPATH -u "$windows_path"`
46882    new_path="$unix_path"
46883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46885    new_path="$unix_path"
46886  fi
46887
46888    # remove trailing .exe if any
46889    new_path="${new_path/%.exe/}"
46890
46891    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46892    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46893  fi
46894
46895    else
46896      # We're on a unix platform. Hooray! :)
46897      # First separate the path from the arguments. This will split at the first
46898      # space.
46899      complete="$BUILD_STRIP"
46900      path="${complete%% *}"
46901      tmp="$complete EOL"
46902      arguments="${tmp#* }"
46903
46904      # Cannot rely on the command "which" here since it doesn't always work.
46905      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46906      if test -z "$is_absolute_path"; then
46907        # Path to executable is not absolute. Find it.
46908        IFS_save="$IFS"
46909        IFS=:
46910        for p in $PATH; do
46911          if test -f "$p/$path" && test -x "$p/$path"; then
46912            new_path="$p/$path"
46913            break
46914          fi
46915        done
46916        IFS="$IFS_save"
46917      else
46918        # This is an absolute path, we can use it without further modifications.
46919        new_path="$path"
46920      fi
46921
46922      if test "x$new_path" = x; then
46923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46924$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46925        has_space=`$ECHO "$complete" | $GREP " "`
46926        if test "x$has_space" != x; then
46927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46929        fi
46930        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46931      fi
46932    fi
46933
46934    # Now join together the path and the arguments once again
46935    if test "x$arguments" != xEOL; then
46936      new_complete="$new_path ${arguments% *}"
46937    else
46938      new_complete="$new_path"
46939    fi
46940
46941    if test "x$complete" != "x$new_complete"; then
46942      BUILD_STRIP="$new_complete"
46943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46944$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46945    fi
46946  fi
46947
46948    # Assume the C compiler is the assembler
46949    BUILD_AS="$BUILD_CC -c"
46950    # Just like for the target compiler, use the compiler as linker
46951    BUILD_LD="$BUILD_CC"
46952    BUILD_LDCXX="$BUILD_CXX"
46953
46954    PATH="$OLDPATH"
46955
46956
46957  COMPILER=$BUILD_CC
46958  COMPILER_NAME=BuildC
46959
46960  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46961    # cc -V output typically looks like
46962    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46963    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46964    # Check that this is likely to be the Solaris Studio cc.
46965    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46966    if test $? -ne 0; then
46967      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46968      { $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
46969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46971$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46973$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46975    fi
46976    # Remove usage instructions (if present), and
46977    # collapse compiler output into a single line
46978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46979        $SED -e 's/ *[Uu]sage:.*//'`
46980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46981        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46982  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46983    # xlc -qversion output typically looks like
46984    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46985    #     Version: 11.01.0000.0015
46986    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46987    # Check that this is likely to be the IBM XL C compiler.
46988    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46989    if test $? -ne 0; then
46990      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46991      { $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
46992$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46993      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46994$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46996$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46997      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46998    fi
46999    # Collapse compiler output into a single line
47000    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47001    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47002        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47003  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47004    # There is no specific version flag, but all output starts with a version string.
47005    # First line typically looks something like:
47006    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47007    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47008    # Check that this is likely to be Microsoft CL.EXE.
47009    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47010    if test $? -ne 0; then
47011      { $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
47012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47014$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47015      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47016    fi
47017    # Collapse compiler output into a single line
47018    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47019    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47020        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47021  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47022    # gcc --version output typically looks like
47023    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47024    #     Copyright (C) 2013 Free Software Foundation, Inc.
47025    #     This is free software; see the source for copying conditions.  There is NO
47026    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47027    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47028    # Check that this is likely to be GCC.
47029    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47030    if test $? -ne 0; then
47031      { $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
47032$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47034$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47035      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47036    fi
47037    # Remove Copyright and legalese from version string, and
47038    # collapse into a single line
47039    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47040        $SED -e 's/ *Copyright .*//'`
47041    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47042        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47043  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47044    # clang --version output typically looks like
47045    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47046    #    clang version 3.3 (tags/RELEASE_33/final)
47047    # or
47048    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47049    #    Target: x86_64-pc-linux-gnu
47050    #    Thread model: posix
47051    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47052    # Check that this is likely to be clang
47053    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47054    if test $? -ne 0; then
47055      { $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
47056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47058$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47059      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47060    fi
47061    # Collapse compiler output into a single line
47062    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47063    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47064        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47065  else
47066      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47067  fi
47068  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47069  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47070  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47071  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47072
47073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47074$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47075
47076
47077  COMPILER=$BUILD_CXX
47078  COMPILER_NAME=BuildC++
47079
47080  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47081    # cc -V output typically looks like
47082    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47083    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47084    # Check that this is likely to be the Solaris Studio cc.
47085    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47086    if test $? -ne 0; then
47087      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47088      { $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
47089$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47090      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47091$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47093$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47094      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47095    fi
47096    # Remove usage instructions (if present), and
47097    # collapse compiler output into a single line
47098    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47099        $SED -e 's/ *[Uu]sage:.*//'`
47100    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47101        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47102  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47103    # xlc -qversion output typically looks like
47104    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47105    #     Version: 11.01.0000.0015
47106    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47107    # Check that this is likely to be the IBM XL C compiler.
47108    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47109    if test $? -ne 0; then
47110      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47111      { $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
47112$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47114$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47116$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47117      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47118    fi
47119    # Collapse compiler output into a single line
47120    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47122        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47123  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47124    # There is no specific version flag, but all output starts with a version string.
47125    # First line typically looks something like:
47126    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47127    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47128    # Check that this is likely to be Microsoft CL.EXE.
47129    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47130    if test $? -ne 0; then
47131      { $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
47132$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47133      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47134$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47135      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47136    fi
47137    # Collapse compiler output into a single line
47138    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47139    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47140        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47141  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47142    # gcc --version output typically looks like
47143    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47144    #     Copyright (C) 2013 Free Software Foundation, Inc.
47145    #     This is free software; see the source for copying conditions.  There is NO
47146    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47147    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47148    # Check that this is likely to be GCC.
47149    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47150    if test $? -ne 0; then
47151      { $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
47152$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47153      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47154$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47155      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47156    fi
47157    # Remove Copyright and legalese from version string, and
47158    # collapse into a single line
47159    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160        $SED -e 's/ *Copyright .*//'`
47161    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47162        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47163  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47164    # clang --version output typically looks like
47165    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47166    #    clang version 3.3 (tags/RELEASE_33/final)
47167    # or
47168    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47169    #    Target: x86_64-pc-linux-gnu
47170    #    Thread model: posix
47171    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47172    # Check that this is likely to be clang
47173    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47174    if test $? -ne 0; then
47175      { $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
47176$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47177      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47178$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47179      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47180    fi
47181    # Collapse compiler output into a single line
47182    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47183    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47184        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47185  else
47186      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47187  fi
47188  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47189  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47190  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47191  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47192
47193  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47194$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47195
47196
47197  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47198    { $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
47199$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47201$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47202  fi
47203
47204  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47205  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47206    { $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
47207$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;}
47208  fi
47209
47210  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47211    { $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
47212$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47213  fi
47214
47215  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47216
47217  else
47218    # If we are not cross compiling, use the normal target compilers for
47219    # building the build platform executables.
47220    BUILD_CC="$CC"
47221    BUILD_CXX="$CXX"
47222    BUILD_LD="$LD"
47223    BUILD_LDCXX="$LDCXX"
47224    BUILD_NM="$NM"
47225    BUILD_AS="$AS"
47226    BUILD_OBJCOPY="$OBJCOPY"
47227    BUILD_STRIP="$STRIP"
47228    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47229    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47230    BUILD_AR="$AR"
47231
47232
47233  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47235$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47237$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47238  fi
47239
47240  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47241  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47242    { $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
47243$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;}
47244  fi
47245
47246  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47247    { $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
47248$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47249  fi
47250
47251  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47252
47253  fi
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47267    # For hotspot, we need these in Windows mixed path,
47268    # so rewrite them all. Need added .exe suffix.
47269    HOTSPOT_CXX="$CXX.exe"
47270    HOTSPOT_LD="$LD.exe"
47271    HOTSPOT_MT="$MT.exe"
47272    HOTSPOT_RC="$RC.exe"
47273
47274  unix_path="$HOTSPOT_CXX"
47275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47276    windows_path=`$CYGPATH -m "$unix_path"`
47277    HOTSPOT_CXX="$windows_path"
47278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47279    windows_path=`cmd //c echo $unix_path`
47280    HOTSPOT_CXX="$windows_path"
47281  fi
47282
47283
47284  unix_path="$HOTSPOT_LD"
47285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47286    windows_path=`$CYGPATH -m "$unix_path"`
47287    HOTSPOT_LD="$windows_path"
47288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47289    windows_path=`cmd //c echo $unix_path`
47290    HOTSPOT_LD="$windows_path"
47291  fi
47292
47293
47294  unix_path="$HOTSPOT_MT"
47295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47296    windows_path=`$CYGPATH -m "$unix_path"`
47297    HOTSPOT_MT="$windows_path"
47298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47299    windows_path=`cmd //c echo $unix_path`
47300    HOTSPOT_MT="$windows_path"
47301  fi
47302
47303
47304  unix_path="$HOTSPOT_RC"
47305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47306    windows_path=`$CYGPATH -m "$unix_path"`
47307    HOTSPOT_RC="$windows_path"
47308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47309    windows_path=`cmd //c echo $unix_path`
47310    HOTSPOT_RC="$windows_path"
47311  fi
47312
47313
47314
47315  else
47316    HOTSPOT_CXX="$CXX"
47317    HOTSPOT_LD="$LD"
47318  fi
47319
47320
47321
47322  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47323    USE_CLANG=true
47324  fi
47325
47326
47327
47328
47329
47330  # The package path is used only on macosx?
47331  # FIXME: clean this up, and/or move it elsewhere.
47332  PACKAGE_PATH=/opt/local
47333
47334
47335  # Check for extra potential brokenness.
47336  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47337    # On Windows, double-check that we got the right compiler.
47338    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47339    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47340    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47341      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47342        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
47343      fi
47344    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47345      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47346        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47347      fi
47348    fi
47349  fi
47350
47351  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47352    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47353    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47354    # This is later checked when setting flags.
47355
47356    # "-Og" suppported for GCC 4.8 and later
47357    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405    # Execute function body
47406
47407
47408
47409
47410
47411
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    # Execute function body
47455
47456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47457$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47458  supports=yes
47459
47460  saved_cflags="$CFLAGS"
47461  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47462  ac_ext=c
47463ac_cpp='$CPP $CPPFLAGS'
47464ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47465ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47466ac_compiler_gnu=$ac_cv_c_compiler_gnu
47467
47468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47469/* end confdefs.h.  */
47470int i;
47471_ACEOF
47472if ac_fn_c_try_compile "$LINENO"; then :
47473
47474else
47475  supports=no
47476fi
47477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47478  ac_ext=cpp
47479ac_cpp='$CXXCPP $CPPFLAGS'
47480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47483
47484  CFLAGS="$saved_cflags"
47485
47486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47487$as_echo "$supports" >&6; }
47488  if test "x$supports" = "xyes" ; then
47489    :
47490    C_COMP_SUPPORTS="yes"
47491  else
47492    :
47493    C_COMP_SUPPORTS="no"
47494  fi
47495
47496
47497
47498
47499
47500
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    # Execute function body
47555
47556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47557$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47558  supports=yes
47559
47560  saved_cxxflags="$CXXFLAGS"
47561  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47562  ac_ext=cpp
47563ac_cpp='$CXXCPP $CPPFLAGS'
47564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47567
47568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47569/* end confdefs.h.  */
47570int i;
47571_ACEOF
47572if ac_fn_cxx_try_compile "$LINENO"; then :
47573
47574else
47575  supports=no
47576fi
47577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47578  ac_ext=cpp
47579ac_cpp='$CXXCPP $CPPFLAGS'
47580ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47581ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47582ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47583
47584  CXXFLAGS="$saved_cxxflags"
47585
47586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47587$as_echo "$supports" >&6; }
47588  if test "x$supports" = "xyes" ; then
47589    :
47590    CXX_COMP_SUPPORTS="yes"
47591  else
47592    :
47593    CXX_COMP_SUPPORTS="no"
47594  fi
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47609$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47610  supports=no
47611  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47612
47613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47614$as_echo "$supports" >&6; }
47615  if test "x$supports" = "xyes" ; then
47616    :
47617    HAS_CFLAG_OPTIMIZE_DEBUG=true
47618  else
47619    :
47620    HAS_CFLAG_OPTIMIZE_DEBUG=false
47621  fi
47622
47623
47624
47625
47626
47627
47628
47629    # "-z relro" supported in GNU binutils 2.17 and later
47630    LINKER_RELRO_FLAG="-Wl,-z,relro"
47631
47632
47633
47634
47635
47636
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    # Execute function body
47679
47680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47681$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47682  supports=yes
47683
47684  saved_ldflags="$LDFLAGS"
47685  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47686  ac_ext=c
47687ac_cpp='$CPP $CPPFLAGS'
47688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47690ac_compiler_gnu=$ac_cv_c_compiler_gnu
47691
47692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47693/* end confdefs.h.  */
47694
47695int
47696main ()
47697{
47698
47699  ;
47700  return 0;
47701}
47702_ACEOF
47703if ac_fn_c_try_link "$LINENO"; then :
47704
47705else
47706  supports=no
47707fi
47708rm -f core conftest.err conftest.$ac_objext \
47709    conftest$ac_exeext conftest.$ac_ext
47710  ac_ext=cpp
47711ac_cpp='$CXXCPP $CPPFLAGS'
47712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47715
47716  LDFLAGS="$saved_ldflags"
47717
47718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47719$as_echo "$supports" >&6; }
47720  if test "x$supports" = "xyes" ; then
47721    :
47722    HAS_LINKER_RELRO=true
47723  else
47724    :
47725    HAS_LINKER_RELRO=false
47726  fi
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740    # "-z now" supported in GNU binutils 2.11 and later
47741    LINKER_NOW_FLAG="-Wl,-z,now"
47742
47743
47744
47745
47746
47747
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    # Execute function body
47790
47791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47792$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47793  supports=yes
47794
47795  saved_ldflags="$LDFLAGS"
47796  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47797  ac_ext=c
47798ac_cpp='$CPP $CPPFLAGS'
47799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47801ac_compiler_gnu=$ac_cv_c_compiler_gnu
47802
47803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47804/* end confdefs.h.  */
47805
47806int
47807main ()
47808{
47809
47810  ;
47811  return 0;
47812}
47813_ACEOF
47814if ac_fn_c_try_link "$LINENO"; then :
47815
47816else
47817  supports=no
47818fi
47819rm -f core conftest.err conftest.$ac_objext \
47820    conftest$ac_exeext conftest.$ac_ext
47821  ac_ext=cpp
47822ac_cpp='$CXXCPP $CPPFLAGS'
47823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47826
47827  LDFLAGS="$saved_ldflags"
47828
47829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47830$as_echo "$supports" >&6; }
47831  if test "x$supports" = "xyes" ; then
47832    :
47833    HAS_LINKER_NOW=true
47834  else
47835    :
47836    HAS_LINKER_NOW=false
47837  fi
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850  fi
47851
47852  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47853  # in executable.'
47854  USING_BROKEN_SUSE_LD=no
47855  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47857$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47858    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47859    $ECHO "int main() { }" > main.c
47860    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47862$as_echo "no" >&6; }
47863      USING_BROKEN_SUSE_LD=no
47864    else
47865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47866$as_echo "yes" >&6; }
47867      USING_BROKEN_SUSE_LD=yes
47868    fi
47869    $RM version-script.map main.c a.out
47870  fi
47871
47872
47873  # Setup hotspot lecagy names for toolchains
47874  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47875  if test "x$TOOLCHAIN_TYPE" = xclang; then
47876    HOTSPOT_TOOLCHAIN_TYPE=gcc
47877  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47878    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47879  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47880    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47881  fi
47882
47883
47884
47885# Setup the JTReg Regression Test Harness.
47886
47887
47888# Check whether --with-jtreg was given.
47889if test "${with_jtreg+set}" = set; then :
47890  withval=$with_jtreg;
47891else
47892  with_jtreg=no
47893fi
47894
47895
47896  if test "x$with_jtreg" = xno; then
47897    # jtreg disabled
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47899$as_echo_n "checking for jtreg... " >&6; }
47900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901$as_echo "no" >&6; }
47902  else
47903    if test "x$with_jtreg" != xyes; then
47904      # with path specified.
47905      JT_HOME="$with_jtreg"
47906    fi
47907
47908    if test "x$JT_HOME" != x; then
47909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47910$as_echo_n "checking for jtreg... " >&6; }
47911
47912      # use JT_HOME enviroment var.
47913
47914  # Only process if variable expands to non-empty
47915
47916  if test "x$JT_HOME" != x; then
47917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47918
47919  # Input might be given as Windows format, start by converting to
47920  # unix format.
47921  path="$JT_HOME"
47922  new_path=`$CYGPATH -u "$path"`
47923
47924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47927  # "foo.exe" is OK but "foo" is an error.
47928  #
47929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47930  # It is also a way to make sure we got the proper file name for the real test later on.
47931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47932  if test "x$test_shortpath" = x; then
47933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47934$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47935    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47936  fi
47937
47938  # Call helper function which possibly converts this using DOS-style short mode.
47939  # If so, the updated path is stored in $new_path.
47940
47941  input_path="$new_path"
47942  # Check if we need to convert this using DOS-style short mode. If the path
47943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47944  # take no chances and rewrite it.
47945  # Note: m4 eats our [], so we need to use [ and ] instead.
47946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47947  if test "x$has_forbidden_chars" != x; then
47948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47952      # Going to short mode and back again did indeed matter. Since short mode is
47953      # case insensitive, let's make it lowercase to improve readability.
47954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47955      # Now convert it back to Unix-style (cygpath)
47956      input_path=`$CYGPATH -u "$shortmode_path"`
47957      new_path="$input_path"
47958    fi
47959  fi
47960
47961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47962  if test "x$test_cygdrive_prefix" = x; then
47963    # As a simple fix, exclude /usr/bin since it's not a real path.
47964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47966      # a path prefixed by /cygdrive for fixpath to work.
47967      new_path="$CYGWIN_ROOT_PATH$input_path"
47968    fi
47969  fi
47970
47971
47972  if test "x$path" != "x$new_path"; then
47973    JT_HOME="$new_path"
47974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47975$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47976  fi
47977
47978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47979
47980  path="$JT_HOME"
47981  has_colon=`$ECHO $path | $GREP ^.:`
47982  new_path="$path"
47983  if test "x$has_colon" = x; then
47984    # Not in mixed or Windows style, start by that.
47985    new_path=`cmd //c echo $path`
47986  fi
47987
47988
47989  input_path="$new_path"
47990  # Check if we need to convert this using DOS-style short mode. If the path
47991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47992  # take no chances and rewrite it.
47993  # Note: m4 eats our [], so we need to use [ and ] instead.
47994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47995  if test "x$has_forbidden_chars" != x; then
47996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47998  fi
47999
48000
48001  windows_path="$new_path"
48002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48003    unix_path=`$CYGPATH -u "$windows_path"`
48004    new_path="$unix_path"
48005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48007    new_path="$unix_path"
48008  fi
48009
48010  if test "x$path" != "x$new_path"; then
48011    JT_HOME="$new_path"
48012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48013$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48014  fi
48015
48016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48018
48019    else
48020      # We're on a unix platform. Hooray! :)
48021      path="$JT_HOME"
48022      has_space=`$ECHO "$path" | $GREP " "`
48023      if test "x$has_space" != x; then
48024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48025$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48027      fi
48028
48029      # Use eval to expand a potential ~
48030      eval path="$path"
48031      if test ! -f "$path" && test ! -d "$path"; then
48032        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48033      fi
48034
48035      if test -d "$path"; then
48036        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48037      else
48038        dir="`$DIRNAME "$path"`"
48039        base="`$BASENAME "$path"`"
48040        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48041      fi
48042    fi
48043  fi
48044
48045
48046      # jtreg win32 script works for everybody
48047      JTREGEXE="$JT_HOME/bin/jtreg"
48048
48049      if test ! -f "$JTREGEXE"; then
48050        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48051      fi
48052
48053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48054$as_echo "$JTREGEXE" >&6; }
48055    else
48056      # try to find jtreg on path
48057
48058
48059
48060  # Publish this variable in the help.
48061
48062
48063  if [ -z "${JTREGEXE+x}" ]; then
48064    # The variable is not set by user, try to locate tool using the code snippet
48065    for ac_prog in jtreg
48066do
48067  # Extract the first word of "$ac_prog", so it can be a program name with args.
48068set dummy $ac_prog; ac_word=$2
48069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48070$as_echo_n "checking for $ac_word... " >&6; }
48071if ${ac_cv_path_JTREGEXE+:} false; then :
48072  $as_echo_n "(cached) " >&6
48073else
48074  case $JTREGEXE in
48075  [\\/]* | ?:[\\/]*)
48076  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48077  ;;
48078  *)
48079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48080for as_dir in $PATH
48081do
48082  IFS=$as_save_IFS
48083  test -z "$as_dir" && as_dir=.
48084    for ac_exec_ext in '' $ac_executable_extensions; do
48085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48086    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48088    break 2
48089  fi
48090done
48091  done
48092IFS=$as_save_IFS
48093
48094  ;;
48095esac
48096fi
48097JTREGEXE=$ac_cv_path_JTREGEXE
48098if test -n "$JTREGEXE"; then
48099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48100$as_echo "$JTREGEXE" >&6; }
48101else
48102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48103$as_echo "no" >&6; }
48104fi
48105
48106
48107  test -n "$JTREGEXE" && break
48108done
48109
48110  else
48111    # The variable is set, but is it from the command line or the environment?
48112
48113    # Try to remove the string !JTREGEXE! from our list.
48114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48116      # If it failed, the variable was not from the command line. Ignore it,
48117      # but warn the user (except for BASH, which is always set by the calling BASH).
48118      if test "xJTREGEXE" != xBASH; then
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48120$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48121      fi
48122      # Try to locate tool using the code snippet
48123      for ac_prog in jtreg
48124do
48125  # Extract the first word of "$ac_prog", so it can be a program name with args.
48126set dummy $ac_prog; ac_word=$2
48127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48128$as_echo_n "checking for $ac_word... " >&6; }
48129if ${ac_cv_path_JTREGEXE+:} false; then :
48130  $as_echo_n "(cached) " >&6
48131else
48132  case $JTREGEXE in
48133  [\\/]* | ?:[\\/]*)
48134  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48135  ;;
48136  *)
48137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48138for as_dir in $PATH
48139do
48140  IFS=$as_save_IFS
48141  test -z "$as_dir" && as_dir=.
48142    for ac_exec_ext in '' $ac_executable_extensions; do
48143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48144    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48146    break 2
48147  fi
48148done
48149  done
48150IFS=$as_save_IFS
48151
48152  ;;
48153esac
48154fi
48155JTREGEXE=$ac_cv_path_JTREGEXE
48156if test -n "$JTREGEXE"; then
48157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48158$as_echo "$JTREGEXE" >&6; }
48159else
48160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48161$as_echo "no" >&6; }
48162fi
48163
48164
48165  test -n "$JTREGEXE" && break
48166done
48167
48168    else
48169      # If it succeeded, then it was overridden by the user. We will use it
48170      # for the tool.
48171
48172      # First remove it from the list of overridden variables, so we can test
48173      # for unknown variables in the end.
48174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48175
48176      # Check if we try to supply an empty value
48177      if test "x$JTREGEXE" = x; then
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48179$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48181$as_echo_n "checking for JTREGEXE... " >&6; }
48182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48183$as_echo "disabled" >&6; }
48184      else
48185        # Check if the provided tool contains a complete path.
48186        tool_specified="$JTREGEXE"
48187        tool_basename="${tool_specified##*/}"
48188        if test "x$tool_basename" = "x$tool_specified"; then
48189          # A command without a complete path is provided, search $PATH.
48190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48191$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48192          # Extract the first word of "$tool_basename", so it can be a program name with args.
48193set dummy $tool_basename; ac_word=$2
48194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48195$as_echo_n "checking for $ac_word... " >&6; }
48196if ${ac_cv_path_JTREGEXE+:} false; then :
48197  $as_echo_n "(cached) " >&6
48198else
48199  case $JTREGEXE in
48200  [\\/]* | ?:[\\/]*)
48201  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48202  ;;
48203  *)
48204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48205for as_dir in $PATH
48206do
48207  IFS=$as_save_IFS
48208  test -z "$as_dir" && as_dir=.
48209    for ac_exec_ext in '' $ac_executable_extensions; do
48210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48211    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48213    break 2
48214  fi
48215done
48216  done
48217IFS=$as_save_IFS
48218
48219  ;;
48220esac
48221fi
48222JTREGEXE=$ac_cv_path_JTREGEXE
48223if test -n "$JTREGEXE"; then
48224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48225$as_echo "$JTREGEXE" >&6; }
48226else
48227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48228$as_echo "no" >&6; }
48229fi
48230
48231
48232          if test "x$JTREGEXE" = x; then
48233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48234          fi
48235        else
48236          # Otherwise we believe it is a complete path. Use it as it is.
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48238$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48240$as_echo_n "checking for JTREGEXE... " >&6; }
48241          if test ! -x "$tool_specified"; then
48242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48243$as_echo "not found" >&6; }
48244            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48245          fi
48246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48247$as_echo "$tool_specified" >&6; }
48248        fi
48249      fi
48250    fi
48251
48252  fi
48253
48254
48255
48256  if test "x$JTREGEXE" = x; then
48257    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48258  fi
48259
48260
48261      JT_HOME="`$DIRNAME $JTREGEXE`"
48262    fi
48263  fi
48264
48265
48266
48267
48268
48269
48270  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48271  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48272  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48273  #                              commands produced by the link step (currently AIX only)
48274  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48275    COMPILER_TARGET_BITS_FLAG="-q"
48276    COMPILER_COMMAND_FILE_FLAG="-f"
48277    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48278  else
48279    COMPILER_TARGET_BITS_FLAG="-m"
48280    COMPILER_COMMAND_FILE_FLAG="@"
48281    COMPILER_BINDCMD_FILE_FLAG=""
48282
48283    # The solstudio linker does not support @-files.
48284    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48285      COMPILER_COMMAND_FILE_FLAG=
48286    fi
48287
48288    # Check if @file is supported by gcc
48289    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48291$as_echo_n "checking if @file is supported by gcc... " >&6; }
48292      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48293      $ECHO "" "--version" > command.file
48294      if $CXX @command.file 2>&5 >&5; then
48295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48296$as_echo "yes" >&6; }
48297        COMPILER_COMMAND_FILE_FLAG="@"
48298      else
48299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48300$as_echo "no" >&6; }
48301        COMPILER_COMMAND_FILE_FLAG=
48302      fi
48303      $RM command.file
48304    fi
48305  fi
48306
48307
48308
48309
48310  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48311  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48312    ARFLAGS="-r"
48313  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48314    ARFLAGS="-X64"
48315  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48316    # lib.exe is used as AR to create static libraries.
48317    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48318  else
48319    ARFLAGS=""
48320  fi
48321
48322
48323  ## Setup strip.
48324  # FIXME: should this really be per platform, or should it be per toolchain type?
48325  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48326  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48327  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48328    STRIPFLAGS="-g"
48329  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48330    STRIPFLAGS="-x"
48331  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48332    STRIPFLAGS="-S"
48333  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48334    STRIPFLAGS="-X32_64"
48335  fi
48336
48337
48338
48339  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48340    CC_OUT_OPTION=-Fo
48341    EXE_OUT_OPTION=-out:
48342    LD_OUT_OPTION=-out:
48343    AR_OUT_OPTION=-out:
48344  else
48345    # The option used to specify the target .o,.a or .so file.
48346    # When compiling, how to specify the to be created object file.
48347    CC_OUT_OPTION='-o$(SPACE)'
48348    # When linking, how to specify the to be created executable.
48349    EXE_OUT_OPTION='-o$(SPACE)'
48350    # When linking, how to specify the to be created dynamically linkable library.
48351    LD_OUT_OPTION='-o$(SPACE)'
48352    # When archiving, how to specify the to be create static archive for object files.
48353    AR_OUT_OPTION='rcs$(SPACE)'
48354  fi
48355
48356
48357
48358
48359
48360  # On Windows, we need to set RC flags.
48361  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48362    RC_FLAGS="-nologo -l0x409"
48363    JVM_RCFLAGS="-nologo"
48364    if test "x$DEBUG_LEVEL" = xrelease; then
48365      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48366      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48367    fi
48368
48369    # The version variables used to create RC_FLAGS may be overridden
48370    # in a custom configure script, or possibly the command line.
48371    # Let those variables be expanded at make time in spec.gmk.
48372    # The \$ are escaped to the shell, and the $(...) variables
48373    # are evaluated by make.
48374    RC_FLAGS="$RC_FLAGS \
48375        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48376        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48377        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48378        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48379        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48380        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48381        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48382
48383    JVM_RCFLAGS="$JVM_RCFLAGS \
48384        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48385        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48386        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48387        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48388        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48389        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48390        -D\"HS_FNAME=jvm.dll\" \
48391        -D\"HS_INTERNAL_NAME=jvm\""
48392  fi
48393
48394
48395
48396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48397    # silence copyright notice and other headers.
48398    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48399  fi
48400
48401
48402# Now we can test some aspects on the target using configure macros.
48403
48404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48405$as_echo_n "checking for ANSI C header files... " >&6; }
48406if ${ac_cv_header_stdc+:} false; then :
48407  $as_echo_n "(cached) " >&6
48408else
48409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410/* end confdefs.h.  */
48411#include <stdlib.h>
48412#include <stdarg.h>
48413#include <string.h>
48414#include <float.h>
48415
48416int
48417main ()
48418{
48419
48420  ;
48421  return 0;
48422}
48423_ACEOF
48424if ac_fn_cxx_try_compile "$LINENO"; then :
48425  ac_cv_header_stdc=yes
48426else
48427  ac_cv_header_stdc=no
48428fi
48429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48430
48431if test $ac_cv_header_stdc = yes; then
48432  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48434/* end confdefs.h.  */
48435#include <string.h>
48436
48437_ACEOF
48438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48439  $EGREP "memchr" >/dev/null 2>&1; then :
48440
48441else
48442  ac_cv_header_stdc=no
48443fi
48444rm -f conftest*
48445
48446fi
48447
48448if test $ac_cv_header_stdc = yes; then
48449  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48451/* end confdefs.h.  */
48452#include <stdlib.h>
48453
48454_ACEOF
48455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48456  $EGREP "free" >/dev/null 2>&1; then :
48457
48458else
48459  ac_cv_header_stdc=no
48460fi
48461rm -f conftest*
48462
48463fi
48464
48465if test $ac_cv_header_stdc = yes; then
48466  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48467  if test "$cross_compiling" = yes; then :
48468  :
48469else
48470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48471/* end confdefs.h.  */
48472#include <ctype.h>
48473#include <stdlib.h>
48474#if ((' ' & 0x0FF) == 0x020)
48475# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48476# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48477#else
48478# define ISLOWER(c) \
48479		   (('a' <= (c) && (c) <= 'i') \
48480		     || ('j' <= (c) && (c) <= 'r') \
48481		     || ('s' <= (c) && (c) <= 'z'))
48482# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48483#endif
48484
48485#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48486int
48487main ()
48488{
48489  int i;
48490  for (i = 0; i < 256; i++)
48491    if (XOR (islower (i), ISLOWER (i))
48492	|| toupper (i) != TOUPPER (i))
48493      return 2;
48494  return 0;
48495}
48496_ACEOF
48497if ac_fn_cxx_try_run "$LINENO"; then :
48498
48499else
48500  ac_cv_header_stdc=no
48501fi
48502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48503  conftest.$ac_objext conftest.beam conftest.$ac_ext
48504fi
48505
48506fi
48507fi
48508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48509$as_echo "$ac_cv_header_stdc" >&6; }
48510if test $ac_cv_header_stdc = yes; then
48511
48512$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48513
48514fi
48515
48516# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48517for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48518		  inttypes.h stdint.h unistd.h
48519do :
48520  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48521ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48522"
48523if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48524  cat >>confdefs.h <<_ACEOF
48525#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48526_ACEOF
48527
48528fi
48529
48530done
48531
48532
48533
48534  ###############################################################################
48535  #
48536  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48537  # (The JVM can use 32 or 64 bit Java pointers but that decision
48538  # is made at runtime.)
48539  #
48540
48541  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48542    # Always specify -m flag on Solaris
48543    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48544
48545  # When we add flags to the "official" CFLAGS etc, we need to
48546  # keep track of these additions in ADDED_CFLAGS etc. These
48547  # will later be checked to make sure only controlled additions
48548  # have been made to CFLAGS etc.
48549  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552
48553  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48554  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48555  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48556
48557  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48558  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48559  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48560
48561  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48562  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48563  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48564
48565  elif test "x$COMPILE_TYPE" = xreduced; then
48566    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48567      # Specify -m if running reduced on unix platforms
48568
48569  # When we add flags to the "official" CFLAGS etc, we need to
48570  # keep track of these additions in ADDED_CFLAGS etc. These
48571  # will later be checked to make sure only controlled additions
48572  # have been made to CFLAGS etc.
48573  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48574  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48575  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48576
48577  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48578  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48579  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48580
48581  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48582  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48583  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48584
48585  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48586  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48587  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48588
48589    fi
48590  fi
48591  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48592    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48593    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48594    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595  fi
48596
48597  # Make compilation sanity check
48598  for ac_header in stdio.h
48599do :
48600  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48601if test "x$ac_cv_header_stdio_h" = xyes; then :
48602  cat >>confdefs.h <<_ACEOF
48603#define HAVE_STDIO_H 1
48604_ACEOF
48605
48606else
48607
48608    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48609$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48610    if test "x$COMPILE_TYPE" = xreduced; then
48611
48612  # Print a helpful message on how to acquire the necessary build dependency.
48613  # reduced is the help tag: freetype, cups, alsa etc
48614  MISSING_DEPENDENCY=reduced
48615
48616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48617    cygwin_help $MISSING_DEPENDENCY
48618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48619    msys_help $MISSING_DEPENDENCY
48620  else
48621    PKGHANDLER_COMMAND=
48622
48623    case $PKGHANDLER in
48624      apt-get)
48625        apt_help     $MISSING_DEPENDENCY ;;
48626      yum)
48627        yum_help     $MISSING_DEPENDENCY ;;
48628      port)
48629        port_help    $MISSING_DEPENDENCY ;;
48630      pkgutil)
48631        pkgutil_help $MISSING_DEPENDENCY ;;
48632      pkgadd)
48633        pkgadd_help  $MISSING_DEPENDENCY ;;
48634    esac
48635
48636    if test "x$PKGHANDLER_COMMAND" != x; then
48637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48638    fi
48639  fi
48640
48641      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48642$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48643    elif test "x$COMPILE_TYPE" = xcross; then
48644      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48645$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48646    fi
48647    as_fn_error $? "Cannot continue." "$LINENO" 5
48648
48649fi
48650
48651done
48652
48653
48654  # The cast to long int works around a bug in the HP C Compiler
48655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48657# This bug is HP SR number 8606223364.
48658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48659$as_echo_n "checking size of int *... " >&6; }
48660if ${ac_cv_sizeof_int_p+:} false; then :
48661  $as_echo_n "(cached) " >&6
48662else
48663  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48664
48665else
48666  if test "$ac_cv_type_int_p" = yes; then
48667     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48669as_fn_error 77 "cannot compute sizeof (int *)
48670See \`config.log' for more details" "$LINENO" 5; }
48671   else
48672     ac_cv_sizeof_int_p=0
48673   fi
48674fi
48675
48676fi
48677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48678$as_echo "$ac_cv_sizeof_int_p" >&6; }
48679
48680
48681
48682cat >>confdefs.h <<_ACEOF
48683#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48684_ACEOF
48685
48686
48687
48688  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48689  if test "x$ac_cv_sizeof_int_p" = x; then
48690    # The test failed, lets stick to the assumed value.
48691    { $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
48692$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48693  else
48694    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48695
48696    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48697      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48698      # Let's try to implicitely set the compilers target architecture and retry the test
48699      { $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
48700$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;}
48701      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48702$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48703
48704  # When we add flags to the "official" CFLAGS etc, we need to
48705  # keep track of these additions in ADDED_CFLAGS etc. These
48706  # will later be checked to make sure only controlled additions
48707  # have been made to CFLAGS etc.
48708  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48709  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48710  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48711
48712  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48713  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48714  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48715
48716  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48717  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48718  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48719
48720  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48721  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48722  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48723
48724
48725      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48726      unset ac_cv_sizeof_int_p
48727      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48728      cat >>confdefs.h <<_ACEOF
48729#undef SIZEOF_INT_P
48730_ACEOF
48731
48732      # The cast to long int works around a bug in the HP C Compiler
48733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48735# This bug is HP SR number 8606223364.
48736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48737$as_echo_n "checking size of int *... " >&6; }
48738if ${ac_cv_sizeof_int_p+:} false; then :
48739  $as_echo_n "(cached) " >&6
48740else
48741  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48742
48743else
48744  if test "$ac_cv_type_int_p" = yes; then
48745     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48747as_fn_error 77 "cannot compute sizeof (int *)
48748See \`config.log' for more details" "$LINENO" 5; }
48749   else
48750     ac_cv_sizeof_int_p=0
48751   fi
48752fi
48753
48754fi
48755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48756$as_echo "$ac_cv_sizeof_int_p" >&6; }
48757
48758
48759
48760cat >>confdefs.h <<_ACEOF
48761#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48762_ACEOF
48763
48764
48765
48766      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48767
48768      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48769        { $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
48770$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;}
48771        if test "x$COMPILE_TYPE" = xreduced; then
48772
48773  # Print a helpful message on how to acquire the necessary build dependency.
48774  # reduced is the help tag: freetype, cups, alsa etc
48775  MISSING_DEPENDENCY=reduced
48776
48777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48778    cygwin_help $MISSING_DEPENDENCY
48779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48780    msys_help $MISSING_DEPENDENCY
48781  else
48782    PKGHANDLER_COMMAND=
48783
48784    case $PKGHANDLER in
48785      apt-get)
48786        apt_help     $MISSING_DEPENDENCY ;;
48787      yum)
48788        yum_help     $MISSING_DEPENDENCY ;;
48789      port)
48790        port_help    $MISSING_DEPENDENCY ;;
48791      pkgutil)
48792        pkgutil_help $MISSING_DEPENDENCY ;;
48793      pkgadd)
48794        pkgadd_help  $MISSING_DEPENDENCY ;;
48795    esac
48796
48797    if test "x$PKGHANDLER_COMMAND" != x; then
48798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48799    fi
48800  fi
48801
48802          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48803$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48804        elif test "x$COMPILE_TYPE" = xcross; then
48805          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48806$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48807        fi
48808        as_fn_error $? "Cannot continue." "$LINENO" 5
48809      fi
48810    fi
48811  fi
48812
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48814$as_echo_n "checking for target address size... " >&6; }
48815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48816$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48817
48818
48819  ###############################################################################
48820  #
48821  # Is the target little of big endian?
48822  #
48823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48824$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48825if ${ac_cv_c_bigendian+:} false; then :
48826  $as_echo_n "(cached) " >&6
48827else
48828  ac_cv_c_bigendian=unknown
48829    # See if we're dealing with a universal compiler.
48830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48831/* end confdefs.h.  */
48832#ifndef __APPLE_CC__
48833	       not a universal capable compiler
48834	     #endif
48835	     typedef int dummy;
48836
48837_ACEOF
48838if ac_fn_cxx_try_compile "$LINENO"; then :
48839
48840	# Check for potential -arch flags.  It is not universal unless
48841	# there are at least two -arch flags with different values.
48842	ac_arch=
48843	ac_prev=
48844	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48845	 if test -n "$ac_prev"; then
48846	   case $ac_word in
48847	     i?86 | x86_64 | ppc | ppc64)
48848	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48849		 ac_arch=$ac_word
48850	       else
48851		 ac_cv_c_bigendian=universal
48852		 break
48853	       fi
48854	       ;;
48855	   esac
48856	   ac_prev=
48857	 elif test "x$ac_word" = "x-arch"; then
48858	   ac_prev=arch
48859	 fi
48860       done
48861fi
48862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48863    if test $ac_cv_c_bigendian = unknown; then
48864      # See if sys/param.h defines the BYTE_ORDER macro.
48865      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48866/* end confdefs.h.  */
48867#include <sys/types.h>
48868	     #include <sys/param.h>
48869
48870int
48871main ()
48872{
48873#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48874		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48875		     && LITTLE_ENDIAN)
48876	      bogus endian macros
48877	     #endif
48878
48879  ;
48880  return 0;
48881}
48882_ACEOF
48883if ac_fn_cxx_try_compile "$LINENO"; then :
48884  # It does; now see whether it defined to BIG_ENDIAN or not.
48885	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48886/* end confdefs.h.  */
48887#include <sys/types.h>
48888		#include <sys/param.h>
48889
48890int
48891main ()
48892{
48893#if BYTE_ORDER != BIG_ENDIAN
48894		 not big endian
48895		#endif
48896
48897  ;
48898  return 0;
48899}
48900_ACEOF
48901if ac_fn_cxx_try_compile "$LINENO"; then :
48902  ac_cv_c_bigendian=yes
48903else
48904  ac_cv_c_bigendian=no
48905fi
48906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48907fi
48908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48909    fi
48910    if test $ac_cv_c_bigendian = unknown; then
48911      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48912      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48913/* end confdefs.h.  */
48914#include <limits.h>
48915
48916int
48917main ()
48918{
48919#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48920	      bogus endian macros
48921	     #endif
48922
48923  ;
48924  return 0;
48925}
48926_ACEOF
48927if ac_fn_cxx_try_compile "$LINENO"; then :
48928  # It does; now see whether it defined to _BIG_ENDIAN or not.
48929	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48930/* end confdefs.h.  */
48931#include <limits.h>
48932
48933int
48934main ()
48935{
48936#ifndef _BIG_ENDIAN
48937		 not big endian
48938		#endif
48939
48940  ;
48941  return 0;
48942}
48943_ACEOF
48944if ac_fn_cxx_try_compile "$LINENO"; then :
48945  ac_cv_c_bigendian=yes
48946else
48947  ac_cv_c_bigendian=no
48948fi
48949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48950fi
48951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48952    fi
48953    if test $ac_cv_c_bigendian = unknown; then
48954      # Compile a test program.
48955      if test "$cross_compiling" = yes; then :
48956  # Try to guess by grepping values from an object file.
48957	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48958/* end confdefs.h.  */
48959short int ascii_mm[] =
48960		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48961		short int ascii_ii[] =
48962		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48963		int use_ascii (int i) {
48964		  return ascii_mm[i] + ascii_ii[i];
48965		}
48966		short int ebcdic_ii[] =
48967		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48968		short int ebcdic_mm[] =
48969		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48970		int use_ebcdic (int i) {
48971		  return ebcdic_mm[i] + ebcdic_ii[i];
48972		}
48973		extern int foo;
48974
48975int
48976main ()
48977{
48978return use_ascii (foo) == use_ebcdic (foo);
48979  ;
48980  return 0;
48981}
48982_ACEOF
48983if ac_fn_cxx_try_compile "$LINENO"; then :
48984  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48985	      ac_cv_c_bigendian=yes
48986	    fi
48987	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48988	      if test "$ac_cv_c_bigendian" = unknown; then
48989		ac_cv_c_bigendian=no
48990	      else
48991		# finding both strings is unlikely to happen, but who knows?
48992		ac_cv_c_bigendian=unknown
48993	      fi
48994	    fi
48995fi
48996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48997else
48998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48999/* end confdefs.h.  */
49000$ac_includes_default
49001int
49002main ()
49003{
49004
49005	     /* Are we little or big endian?  From Harbison&Steele.  */
49006	     union
49007	     {
49008	       long int l;
49009	       char c[sizeof (long int)];
49010	     } u;
49011	     u.l = 1;
49012	     return u.c[sizeof (long int) - 1] == 1;
49013
49014  ;
49015  return 0;
49016}
49017_ACEOF
49018if ac_fn_cxx_try_run "$LINENO"; then :
49019  ac_cv_c_bigendian=no
49020else
49021  ac_cv_c_bigendian=yes
49022fi
49023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49024  conftest.$ac_objext conftest.beam conftest.$ac_ext
49025fi
49026
49027    fi
49028fi
49029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49030$as_echo "$ac_cv_c_bigendian" >&6; }
49031 case $ac_cv_c_bigendian in #(
49032   yes)
49033     ENDIAN="big";; #(
49034   no)
49035     ENDIAN="little" ;; #(
49036   universal)
49037     ENDIAN="universal_endianness"
49038     ;; #(
49039   *)
49040     ENDIAN="unknown" ;;
49041 esac
49042
49043
49044  if test "x$ENDIAN" = xuniversal_endianness; then
49045    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49046  fi
49047  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49048    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
49049  fi
49050
49051
49052# Configure flags for the tools
49053
49054  ###############################################################################
49055  #
49056  # How to compile shared libraries.
49057  #
49058
49059  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49060    PICFLAG="-fPIC"
49061    C_FLAG_REORDER=''
49062    CXX_FLAG_REORDER=''
49063
49064    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49065      # Linking is different on MacOSX
49066      if test "x$STATIC_BUILD" = xtrue; then
49067        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49068      else
49069        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49070        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49071      fi
49072      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49073      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49074      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49075      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49076    else
49077      # Default works for linux, might work on other platforms as well.
49078      SHARED_LIBRARY_FLAGS='-shared'
49079      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49080      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49081      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49082      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49083    fi
49084  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087
49088    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49089      # Linking is different on MacOSX
49090      PICFLAG=''
49091      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49092      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49093      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49094      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49095      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49096
49097      if test "x$STATIC_BUILD" = xfalse; then
49098        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49099      fi
49100    else
49101      # Default works for linux, might work on other platforms as well.
49102      PICFLAG='-fPIC'
49103      SHARED_LIBRARY_FLAGS='-shared'
49104      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49105      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49106      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49107      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49108    fi
49109  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49110    PICFLAG="-KPIC"
49111    C_FLAG_REORDER='-xF'
49112    CXX_FLAG_REORDER='-xF'
49113    SHARED_LIBRARY_FLAGS="-G"
49114    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49115    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49116    SET_SHARED_LIBRARY_NAME='-h $1'
49117    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49118  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49119    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49120    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49121    # will have to patch this single instruction with a call to some out-of-order code which
49122    # does the load from the TOC. This is of course slow. But in that case we also would have
49123    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49124    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49125    # can be patched directly by the linker and does not require a jump to out-of-order code.
49126    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49127    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49128    # loads for accessing a global variable). But there are rumors that this may be seen as a
49129    # 'performance feature' because of improved code locality of the symbols used in a
49130    # compilation unit.
49131    PICFLAG="-qpic"
49132    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49133    C_FLAG_REORDER=''
49134    CXX_FLAG_REORDER=''
49135    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49136    SET_EXECUTABLE_ORIGIN=""
49137    SET_SHARED_LIBRARY_ORIGIN=''
49138    SET_SHARED_LIBRARY_NAME=''
49139    SET_SHARED_LIBRARY_MAPFILE=''
49140  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49141    PICFLAG=""
49142    C_FLAG_REORDER=''
49143    CXX_FLAG_REORDER=''
49144    SHARED_LIBRARY_FLAGS="-dll"
49145    SET_EXECUTABLE_ORIGIN=''
49146    SET_SHARED_LIBRARY_ORIGIN=''
49147    SET_SHARED_LIBRARY_NAME=''
49148    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49149  fi
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159  # The (cross) compiler is now configured, we can now test capabilities
49160  # of the target platform.
49161
49162
49163
49164  ###############################################################################
49165  #
49166  # Setup the opt flags for different compilers
49167  # and different operating systems.
49168  #
49169
49170  # FIXME: this was indirectly the old default, but just inherited.
49171  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49172  #   C_FLAG_DEPS="-MMD -MF"
49173  # fi
49174
49175  # Generate make dependency files
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    C_FLAG_DEPS="-MMD -MF"
49178  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49179    C_FLAG_DEPS="-MMD -MF"
49180  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49181    C_FLAG_DEPS="-xMMD -xMF"
49182  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49183    C_FLAG_DEPS="-qmakedep=gcc -MF"
49184  fi
49185  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49186
49187
49188
49189  # Debug symbols
49190  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49191    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49192      # reduce from default "-g2" option to save space
49193      CFLAGS_DEBUG_SYMBOLS="-g1"
49194      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49195    else
49196      CFLAGS_DEBUG_SYMBOLS="-g"
49197      CXXFLAGS_DEBUG_SYMBOLS="-g"
49198    fi
49199  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49200    CFLAGS_DEBUG_SYMBOLS="-g"
49201    CXXFLAGS_DEBUG_SYMBOLS="-g"
49202  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49203    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49204    # -g0 enables debug symbols without disabling inlining.
49205    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49206  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49207    CFLAGS_DEBUG_SYMBOLS="-g"
49208    CXXFLAGS_DEBUG_SYMBOLS="-g"
49209  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49210    CFLAGS_DEBUG_SYMBOLS="-Zi"
49211    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49212  fi
49213
49214
49215
49216  # Debug symbols for JVM_CFLAGS
49217  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49218    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49219    if test "x$DEBUG_LEVEL" = xslowdebug; then
49220      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49221    else
49222      # -g0 does not disable inlining, which -g does.
49223      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49224    fi
49225  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49226    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49227  else
49228    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49229  fi
49230
49231
49232  # bounds, memory and behavior checking options
49233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49234    case $DEBUG_LEVEL in
49235    release )
49236      # no adjustment
49237      ;;
49238    fastdebug )
49239      # no adjustment
49240      ;;
49241    slowdebug )
49242      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49243      # get's added conditionally on whether we produce debug symbols or not.
49244      # This is most likely not really correct.
49245
49246      # Add runtime stack smashing and undefined behavior checks.
49247      # Not all versions of gcc support -fstack-protector
49248      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291    # Execute function body
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340    # Execute function body
49341
49342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49343$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49344  supports=yes
49345
49346  saved_cflags="$CFLAGS"
49347  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49348  ac_ext=c
49349ac_cpp='$CPP $CPPFLAGS'
49350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49352ac_compiler_gnu=$ac_cv_c_compiler_gnu
49353
49354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49355/* end confdefs.h.  */
49356int i;
49357_ACEOF
49358if ac_fn_c_try_compile "$LINENO"; then :
49359
49360else
49361  supports=no
49362fi
49363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49364  ac_ext=cpp
49365ac_cpp='$CXXCPP $CPPFLAGS'
49366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49369
49370  CFLAGS="$saved_cflags"
49371
49372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49373$as_echo "$supports" >&6; }
49374  if test "x$supports" = "xyes" ; then
49375    :
49376    C_COMP_SUPPORTS="yes"
49377  else
49378    :
49379    C_COMP_SUPPORTS="no"
49380  fi
49381
49382
49383
49384
49385
49386
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    # Execute function body
49441
49442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49443$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49444  supports=yes
49445
49446  saved_cxxflags="$CXXFLAGS"
49447  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49448  ac_ext=cpp
49449ac_cpp='$CXXCPP $CPPFLAGS'
49450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49453
49454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49455/* end confdefs.h.  */
49456int i;
49457_ACEOF
49458if ac_fn_cxx_try_compile "$LINENO"; then :
49459
49460else
49461  supports=no
49462fi
49463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49464  ac_ext=cpp
49465ac_cpp='$CXXCPP $CPPFLAGS'
49466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49469
49470  CXXFLAGS="$saved_cxxflags"
49471
49472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49473$as_echo "$supports" >&6; }
49474  if test "x$supports" = "xyes" ; then
49475    :
49476    CXX_COMP_SUPPORTS="yes"
49477  else
49478    :
49479    CXX_COMP_SUPPORTS="no"
49480  fi
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49495$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49496  supports=no
49497  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49498
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49500$as_echo "$supports" >&6; }
49501  if test "x$supports" = "xyes" ; then
49502    :
49503
49504  else
49505    :
49506    STACK_PROTECTOR_CFLAG=""
49507  fi
49508
49509
49510
49511
49512
49513
49514
49515      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49516      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49517      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49518        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49519      fi
49520      ;;
49521    esac
49522  fi
49523
49524  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49525    if test "x$DEBUG_LEVEL" != xrelease; then
49526      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49527        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49528      fi
49529    fi
49530  fi
49531
49532  # Optimization levels
49533  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49534    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49535
49536    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49537      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49538      C_O_FLAG_HIGHEST_JVM="-xO4"
49539      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49540      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49541      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49542      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49543      C_O_FLAG_DEBUG_JVM=""
49544      C_O_FLAG_NONE="-xregs=no%frameptr"
49545      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49546      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49547      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49548      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49549      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49550      CXX_O_FLAG_DEBUG_JVM=""
49551      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49552      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49553        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49554        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49555      fi
49556    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49557      C_O_FLAG_HIGHEST_JVM="-xO4"
49558      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49559      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49560      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49561      C_O_FLAG_DEBUG=""
49562      C_O_FLAG_DEBUG_JVM=""
49563      C_O_FLAG_NONE=""
49564      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49565      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49566      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49567      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49568      CXX_O_FLAG_DEBUG=""
49569      CXX_O_FLAG_DEBUG_JVM=""
49570      CXX_O_FLAG_NONE=""
49571    fi
49572  else
49573    # The remaining toolchains share opt flags between CC and CXX;
49574    # setup for C and duplicate afterwards.
49575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49576      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49577        # On MacOSX we optimize for size, something
49578        # we should do for all platforms?
49579        C_O_FLAG_HIGHEST_JVM="-Os"
49580        C_O_FLAG_HIGHEST="-Os"
49581        C_O_FLAG_HI="-Os"
49582        C_O_FLAG_NORM="-Os"
49583        C_O_FLAG_SIZE="-Os"
49584      else
49585        C_O_FLAG_HIGHEST_JVM="-O3"
49586        C_O_FLAG_HIGHEST="-O3"
49587        C_O_FLAG_HI="-O3"
49588        C_O_FLAG_NORM="-O2"
49589        C_O_FLAG_SIZE="-Os"
49590      fi
49591      C_O_FLAG_DEBUG="-O0"
49592      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49593        C_O_FLAG_DEBUG_JVM=""
49594      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49595        C_O_FLAG_DEBUG_JVM="-O0"
49596      fi
49597      C_O_FLAG_NONE="-O0"
49598    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49599      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49600        # On MacOSX we optimize for size, something
49601        # we should do for all platforms?
49602        C_O_FLAG_HIGHEST_JVM="-Os"
49603        C_O_FLAG_HIGHEST="-Os"
49604        C_O_FLAG_HI="-Os"
49605        C_O_FLAG_NORM="-Os"
49606        C_O_FLAG_SIZE="-Os"
49607      else
49608        C_O_FLAG_HIGHEST_JVM="-O3"
49609        C_O_FLAG_HIGHEST="-O3"
49610        C_O_FLAG_HI="-O3"
49611        C_O_FLAG_NORM="-O2"
49612        C_O_FLAG_SIZE="-Os"
49613      fi
49614      C_O_FLAG_DEBUG="-O0"
49615      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49616        C_O_FLAG_DEBUG_JVM=""
49617      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49618        C_O_FLAG_DEBUG_JVM="-O0"
49619      fi
49620      C_O_FLAG_NONE="-O0"
49621    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49622      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49623      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49624      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49625      C_O_FLAG_NORM="-O2"
49626      C_O_FLAG_DEBUG="-qnoopt"
49627      # FIXME: Value below not verified.
49628      C_O_FLAG_DEBUG_JVM=""
49629      C_O_FLAG_NONE="-qnoopt"
49630    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49631      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49632      C_O_FLAG_HIGHEST="-O2"
49633      C_O_FLAG_HI="-O1"
49634      C_O_FLAG_NORM="-O1"
49635      C_O_FLAG_DEBUG="-Od"
49636      C_O_FLAG_DEBUG_JVM=""
49637      C_O_FLAG_NONE="-Od"
49638      C_O_FLAG_SIZE="-Os"
49639    fi
49640    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49641    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49642    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49643    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49644    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49645    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49646    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49647    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49648  fi
49649
49650  # Adjust optimization flags according to debug level.
49651  case $DEBUG_LEVEL in
49652    release )
49653      # no adjustment
49654      ;;
49655    fastdebug )
49656      # Not quite so much optimization
49657      C_O_FLAG_HI="$C_O_FLAG_NORM"
49658      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49659      ;;
49660    slowdebug )
49661      # Disable optimization
49662      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49663      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49664      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49665      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49666      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49667      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49668      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49669      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49670      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49671      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49672      ;;
49673  esac
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693  # Special extras...
49694  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49695    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49696      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49697      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49698    fi
49699    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49700    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49701  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49702    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49703    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49704  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49705    CXXSTD_CXXFLAG="-std=gnu++98"
49706
49707
49708
49709
49710
49711
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    # Execute function body
49749
49750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49751$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49752  supports=yes
49753
49754  saved_cxxflags="$CXXFLAGS"
49755  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49756  ac_ext=cpp
49757ac_cpp='$CXXCPP $CPPFLAGS'
49758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49761
49762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49763/* end confdefs.h.  */
49764int i;
49765_ACEOF
49766if ac_fn_cxx_try_compile "$LINENO"; then :
49767
49768else
49769  supports=no
49770fi
49771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49772  ac_ext=cpp
49773ac_cpp='$CXXCPP $CPPFLAGS'
49774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49777
49778  CXXFLAGS="$saved_cxxflags"
49779
49780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49781$as_echo "$supports" >&6; }
49782  if test "x$supports" = "xyes" ; then
49783    :
49784
49785  else
49786    :
49787    CXXSTD_CXXFLAG=""
49788  fi
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49802    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49803
49804  fi
49805  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49806    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49807    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49808  fi
49809
49810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49812    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49813  fi
49814
49815  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49816  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49817  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49818
49819  ###############################################################################
49820  #
49821  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49822  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49823  #
49824
49825  # Setup compiler/platform specific flags into
49826  #    CFLAGS_JDK    - C Compiler flags
49827  #    CXXFLAGS_JDK  - C++ Compiler flags
49828  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49829  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49830    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49831    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49832    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49833    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49834      # Force compatibility with i586 on 32 bit intel platforms.
49835      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49836      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49837    fi
49838    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49839        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49840    case $OPENJDK_TARGET_CPU_ARCH in
49841      arm )
49842        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49843        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49844        ;;
49845      ppc )
49846        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49847        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49848        ;;
49849      s390 )
49850        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49851        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49852        ;;
49853      * )
49854        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49855        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49856        ;;
49857    esac
49858
49859
49860
49861
49862
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    # Execute function body
49913
49914  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49915  REFERENCE_VERSION=6
49916
49917  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49918    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49919  fi
49920
49921  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49922    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49923  fi
49924
49925  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49926  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49927
49928  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49929    :
49930
49931  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49932  # runs afoul of the more aggressive versions of these optimisations.
49933  # Notably, value range propagation now assumes that the this pointer of C++
49934  # member functions is non-null.
49935  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49936        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49937        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49938$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49939  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49940  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49941
49942  else
49943    :
49944
49945  fi
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49961    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49962
49963    # Restrict the debug information created by Clang to avoid
49964    # too big object files and speed the build up a little bit
49965    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49966    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49967    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49968      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49969        # Force compatibility with i586 on 32 bit intel platforms.
49970        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49971        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49972      fi
49973      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49974      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49975          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49976      case $OPENJDK_TARGET_CPU_ARCH in
49977        ppc )
49978          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49979          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980          ;;
49981        * )
49982          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49983          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49984          ;;
49985      esac
49986    fi
49987  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49988    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49989    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49990    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49991      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49992    fi
49993
49994    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49995    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49996  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49997    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49998    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49999    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50000  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50001    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50002        -MD -Zc:wchar_t- -W3 -wd4800 \
50003        -DWIN32_LEAN_AND_MEAN \
50004        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50005        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50006        -DWIN32 -DIAL"
50007    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50008      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50009    else
50010      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50011    fi
50012    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50013    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50014    # studio.
50015    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50016      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50017      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50018      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50019    fi
50020  fi
50021
50022  ###############################################################################
50023
50024  # Adjust flags according to debug level.
50025  case $DEBUG_LEVEL in
50026    fastdebug | slowdebug )
50027      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50028      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50029      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50030      ;;
50031    release )
50032      ;;
50033    * )
50034      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50035      ;;
50036  esac
50037
50038  # Set some common defines. These works for all compilers, but assume
50039  # -D is universally accepted.
50040
50041  # Setup endianness
50042  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50043    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50044    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50045    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50046    #   Note: -Dmacro         is the same as    #define macro 1
50047    #         -Dmacro=        is the same as    #define macro
50048    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50049      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50050    else
50051      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50052    fi
50053  else
50054    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50055    # are defined in the system?
50056    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50057      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50058    else
50059      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50060    fi
50061  fi
50062
50063  # Setup target OS define. Use OS target name but in upper case.
50064  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50065  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50066
50067  # Setup target CPU
50068  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50069      $OPENJDK_TARGET_ADD_LP64 \
50070      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50071
50072  # Setup debug/release defines
50073  if test "x$DEBUG_LEVEL" = xrelease; then
50074    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50075    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50076      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50077    fi
50078  else
50079    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50080  fi
50081
50082  # Set some additional per-OS defines.
50083  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50084    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50085    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50086        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50087  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50088    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50089    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50090        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50091  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50092    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50093    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50094    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50095    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50096        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50097        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50098        -fno-omit-frame-pointer"
50099  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50100    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50101    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50102    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50103        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50104        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50105  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50106    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50107  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50108    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50109    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50110  fi
50111
50112  # Set some additional per-CPU defines.
50113  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50114    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50115  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50116    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50117  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50118    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50119      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50120      # fixes `relocation truncated to fit' error for gcc 4.1.
50121      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50122      # Use ppc64 instructions, but schedule for power5
50123      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50124    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50125      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50126    fi
50127  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50128    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50129      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50130      # Little endian machine uses ELFv2 ABI.
50131      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50132      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50133      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50134    fi
50135  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50136    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50137      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50138    fi
50139  fi
50140
50141  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50142    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50143  fi
50144
50145  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50146    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50147      # Solaris does not have _LP64=1 in the old build.
50148      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50149      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50150    fi
50151  fi
50152
50153  # Set JVM_CFLAGS warning handling
50154  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50155    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50156        -Wunused-value -Woverloaded-virtual"
50157
50158    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213    # Execute function body
50214
50215  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50216  REFERENCE_VERSION=4.8
50217
50218  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50219    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50220  fi
50221
50222  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50223    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50224  fi
50225
50226  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50227  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50228
50229  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50230    :
50231
50232            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50233            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50234
50235
50236  else
50237    :
50238
50239  fi
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254    fi
50255    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50256      # Non-zero builds have stricter warnings
50257      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50258    else
50259      if test "x$TOOLCHAIN_TYPE" = xclang; then
50260        # Some versions of llvm do not like -Wundef
50261        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50262      fi
50263    fi
50264  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50265    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50266        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50267  fi
50268
50269  # Additional macosx handling
50270  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50271    # Setting these parameters makes it an error to link to macosx APIs that are
50272    # newer than the given OS version and makes the linked binaries compatible
50273    # even if built on a newer version of the OS.
50274    # The expected format is X.Y.Z
50275    MACOSX_VERSION_MIN=10.7.0
50276
50277
50278    # The macro takes the version with no dots, ex: 1070
50279    # Let the flags variables get resolved in make for easier override on make
50280    # command line.
50281    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50282    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50283  fi
50284
50285  # Setup some hard coded includes
50286  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50287      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50288      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50289      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50290      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50291      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50292      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50293
50294  # The shared libraries are compiled using the picflag.
50295  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50296      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50297  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50298      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50299
50300  # Executable flags
50301  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50302  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50303
50304
50305
50306
50307
50308
50309  # Setup LDFLAGS et al.
50310  #
50311
50312  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50313    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50314    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50315    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50316    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50317      LDFLAGS_SAFESH="-safeseh"
50318      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50319      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50320      # NOTE: Old build added -machine. Probably not needed.
50321      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50322    else
50323      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50324    fi
50325  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50326      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50327      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50328        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50329        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50330    fi
50331  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50332    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50333    # We have previously set HAS_GNU_HASH if this is the case
50334    if test -n "$HAS_GNU_HASH"; then
50335      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50336      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50337      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50338    fi
50339      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50340        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50341    fi
50342    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50343      # And since we now know that the linker is gnu, then add -z defs, to forbid
50344      # undefined symbols in object files.
50345      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50346      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50347      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50348      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50349      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50350      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50351        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50352      fi
50353      case $DEBUG_LEVEL in
50354        release )
50355          # tell linker to optimize libraries.
50356          # Should this be supplied to the OSS linker as well?
50357          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50358          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50359          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50360          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50361            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50362          fi
50363          ;;
50364        slowdebug )
50365          # Hotspot always let the linker optimize
50366          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50367          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50368            # do relocations at load
50369            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50370            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50371            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50372          fi
50373          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50374            # mark relocations read only
50375            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50376            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50377            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50378          fi
50379          ;;
50380        fastdebug )
50381          # Hotspot always let the linker optimize
50382          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50383          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50384            # mark relocations read only
50385            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50386            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50387            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50388          fi
50389          ;;
50390        * )
50391          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50392          ;;
50393        esac
50394    fi
50395  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50396    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50397    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50398    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50399    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50400    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50401    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50402      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50403    fi
50404  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50405    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50406    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50407    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50408  fi
50409
50410  # Customize LDFLAGS for executables
50411
50412  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50413
50414  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50415    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50416      LDFLAGS_STACK_SIZE=1048576
50417    else
50418      LDFLAGS_STACK_SIZE=327680
50419    fi
50420    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50421  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50422    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50423  fi
50424
50425  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50426
50427  # Customize LDFLAGS for libs
50428  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50429
50430  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50431  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50432    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50433        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50434    JDKLIB_LIBS=""
50435  else
50436    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50437        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50438
50439    if test "xTARGET" = "xTARGET"; then
50440    # On some platforms (mac) the linker warns about non existing -L dirs.
50441    # Add server first if available. Linking aginst client does not always produce the same results.
50442      # Only add client/minimal dir if client/minimal is being built.
50443    # Default to server for other variants.
50444      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50445        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50446      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50447        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50448      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50449        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50450    else
50451        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50452    fi
50453    elif test "xTARGET" = "xBUILD"; then
50454      # When building a buildjdk, it's always only the server variant
50455      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50456          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50457    fi
50458
50459    JDKLIB_LIBS="-ljava -ljvm"
50460    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50461      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50462    fi
50463
50464  fi
50465
50466LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50467
50468  # Set JVM_LIBS (per os)
50469  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50470    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50471  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50472    # FIXME: This hard-coded path is not really proper.
50473    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50474      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50475    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50476      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50477    fi
50478    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50479        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50480  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50481    JVM_LIBS="$JVM_LIBS -lm"
50482  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50483    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50484  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50485    JVM_LIBS="$JVM_LIBS -lm"
50486  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50487    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50488        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50489        wsock32.lib winmm.lib version.lib psapi.lib"
50490    fi
50491
50492  # Set JVM_ASFLAGS
50493  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50494    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50495      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50496    fi
50497  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50498    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50499  fi
50500
50501  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517  # Special extras...
50518  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50519    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50520      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50521      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50522    fi
50523    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50524    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50525  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50526    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50527    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50528  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50529    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572    # Execute function body
50573
50574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50575$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50576  supports=yes
50577
50578  saved_cxxflags="$CXXFLAGS"
50579  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50580  ac_ext=cpp
50581ac_cpp='$CXXCPP $CPPFLAGS'
50582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50585
50586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50587/* end confdefs.h.  */
50588int i;
50589_ACEOF
50590if ac_fn_cxx_try_compile "$LINENO"; then :
50591
50592else
50593  supports=no
50594fi
50595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50596  ac_ext=cpp
50597ac_cpp='$CXXCPP $CPPFLAGS'
50598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50601
50602  CXXFLAGS="$saved_cxxflags"
50603
50604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50605$as_echo "$supports" >&6; }
50606  if test "x$supports" = "xyes" ; then
50607    :
50608
50609  else
50610    :
50611    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50612  fi
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50626    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50627
50628  fi
50629  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50630    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50631    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50632  fi
50633
50634  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50635    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50636    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50637  fi
50638
50639  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50640  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50641  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50642
50643  ###############################################################################
50644  #
50645  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50646  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50647  #
50648
50649  # Setup compiler/platform specific flags into
50650  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50651  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50652  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50653  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50654    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50655    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50656    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50657    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50658      # Force compatibility with i586 on 32 bit intel platforms.
50659      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50660      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50661    fi
50662    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50663        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50664    case $OPENJDK_BUILD_CPU_ARCH in
50665      arm )
50666        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50667        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50668        ;;
50669      ppc )
50670        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50671        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50672        ;;
50673      s390 )
50674        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50675        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50676        ;;
50677      * )
50678        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50679        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50680        ;;
50681    esac
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736    # Execute function body
50737
50738  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50739  REFERENCE_VERSION=6
50740
50741  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50742    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50743  fi
50744
50745  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50746    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50747  fi
50748
50749  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50750  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50751
50752  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50753    :
50754
50755  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50756  # runs afoul of the more aggressive versions of these optimisations.
50757  # Notably, value range propagation now assumes that the this pointer of C++
50758  # member functions is non-null.
50759  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50760        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50761        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50762$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50763  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50764  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50765
50766  else
50767    :
50768
50769  fi
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50785    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50786
50787    # Restrict the debug information created by Clang to avoid
50788    # too big object files and speed the build up a little bit
50789    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50790    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50791    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50792      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50793        # Force compatibility with i586 on 32 bit intel platforms.
50794        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50795        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50796      fi
50797      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50798      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50799          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50800      case $OPENJDK_BUILD_CPU_ARCH in
50801        ppc )
50802          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50803          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50804          ;;
50805        * )
50806          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50807          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50808          ;;
50809      esac
50810    fi
50811  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50812    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50813    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50814    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50815      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50816    fi
50817
50818    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50819    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50820  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50821    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50822    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50823    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50824  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50825    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50826        -MD -Zc:wchar_t- -W3 -wd4800 \
50827        -DWIN32_LEAN_AND_MEAN \
50828        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50829        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50830        -DWIN32 -DIAL"
50831    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50832      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50833    else
50834      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50835    fi
50836    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50837    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50838    # studio.
50839    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50840      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50841      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50842      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50843    fi
50844  fi
50845
50846  ###############################################################################
50847
50848  # Adjust flags according to debug level.
50849  case $DEBUG_LEVEL in
50850    fastdebug | slowdebug )
50851      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50852      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50853      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50854      ;;
50855    release )
50856      ;;
50857    * )
50858      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50859      ;;
50860  esac
50861
50862  # Set some common defines. These works for all compilers, but assume
50863  # -D is universally accepted.
50864
50865  # Setup endianness
50866  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50867    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50868    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50869    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50870    #   Note: -Dmacro         is the same as    #define macro 1
50871    #         -Dmacro=        is the same as    #define macro
50872    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50873      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50874    else
50875      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50876    fi
50877  else
50878    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50879    # are defined in the system?
50880    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50881      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50882    else
50883      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50884    fi
50885  fi
50886
50887  # Setup target OS define. Use OS target name but in upper case.
50888  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50889  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50890
50891  # Setup target CPU
50892  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50893      $OPENJDK_BUILD_ADD_LP64 \
50894      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50895
50896  # Setup debug/release defines
50897  if test "x$DEBUG_LEVEL" = xrelease; then
50898    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50899    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50900      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50901    fi
50902  else
50903    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50904  fi
50905
50906  # Set some additional per-OS defines.
50907  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50908    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50909    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50910        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50911  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50914        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50915  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50916    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50920        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50921        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50922        -fno-omit-frame-pointer"
50923  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50924    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50925    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50926    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50927        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50928        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50929  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50930    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50931  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50932    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50933    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50934  fi
50935
50936  # Set some additional per-CPU defines.
50937  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50938    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50939  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50941  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50942    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50943      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50944      # fixes `relocation truncated to fit' error for gcc 4.1.
50945      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50946      # Use ppc64 instructions, but schedule for power5
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50948    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50950    fi
50951  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50952    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50953      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50954      # Little endian machine uses ELFv2 ABI.
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50956      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50957      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50958    fi
50959  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50960    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50961      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50962    fi
50963  fi
50964
50965  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50966    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50967  fi
50968
50969  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50970    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50971      # Solaris does not have _LP64=1 in the old build.
50972      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50973      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50974    fi
50975  fi
50976
50977  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50978  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50979    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50980        -Wunused-value -Woverloaded-virtual"
50981
50982    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037    # Execute function body
51038
51039  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51040  REFERENCE_VERSION=4.8
51041
51042  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51043    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51044  fi
51045
51046  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51047    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51048  fi
51049
51050  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51051  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51052
51053  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51054    :
51055
51056            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51057            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51058
51059
51060  else
51061    :
51062
51063  fi
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078    fi
51079    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51080      # Non-zero builds have stricter warnings
51081      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51082    else
51083      if test "x$TOOLCHAIN_TYPE" = xclang; then
51084        # Some versions of llvm do not like -Wundef
51085        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51086      fi
51087    fi
51088  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51089    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51090        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51091  fi
51092
51093  # Additional macosx handling
51094  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51095    # Setting these parameters makes it an error to link to macosx APIs that are
51096    # newer than the given OS version and makes the linked binaries compatible
51097    # even if built on a newer version of the OS.
51098    # The expected format is X.Y.Z
51099    MACOSX_VERSION_MIN=10.7.0
51100
51101
51102    # The macro takes the version with no dots, ex: 1070
51103    # Let the flags variables get resolved in make for easier override on make
51104    # command line.
51105    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)"
51106    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51107  fi
51108
51109  # Setup some hard coded includes
51110  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51111      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51112      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51113      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51114      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51115      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51116      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51117
51118  # The shared libraries are compiled using the picflag.
51119  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51120      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51121  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51122      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51123
51124  # Executable flags
51125  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51126  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51127
51128
51129
51130
51131
51132
51133  # Setup LDFLAGS et al.
51134  #
51135
51136  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51137    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51138    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51139    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51140    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51141      LDFLAGS_SAFESH="-safeseh"
51142      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51143      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51144      # NOTE: Old build added -machine. Probably not needed.
51145      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51146    else
51147      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51148    fi
51149  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51150      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51151      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51152        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51153        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51154    fi
51155  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51156    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51157    # We have previously set HAS_GNU_HASH if this is the case
51158    if test -n "$HAS_GNU_HASH"; then
51159      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51160      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51161      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51162    fi
51163      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51164        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51165    fi
51166    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51167      # And since we now know that the linker is gnu, then add -z defs, to forbid
51168      # undefined symbols in object files.
51169      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51170      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51171      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51172      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51173      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51174      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51175        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51176      fi
51177      case $DEBUG_LEVEL in
51178        release )
51179          # tell linker to optimize libraries.
51180          # Should this be supplied to the OSS linker as well?
51181          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51182          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51183          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51184          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51185            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51186          fi
51187          ;;
51188        slowdebug )
51189          # Hotspot always let the linker optimize
51190          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51191          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51192            # do relocations at load
51193            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51194            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51195            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51196          fi
51197          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51198            # mark relocations read only
51199            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51200            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51201            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51202          fi
51203          ;;
51204        fastdebug )
51205          # Hotspot always let the linker optimize
51206          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51207          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51208            # mark relocations read only
51209            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51210            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51211            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51212          fi
51213          ;;
51214        * )
51215          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51216          ;;
51217        esac
51218    fi
51219  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51220    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51221    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51222    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51223    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51224    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51225    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51226      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51227    fi
51228  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51229    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51230    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51231    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51232  fi
51233
51234  # Customize LDFLAGS for executables
51235
51236  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51237
51238  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51239    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51240      LDFLAGS_STACK_SIZE=1048576
51241    else
51242      LDFLAGS_STACK_SIZE=327680
51243    fi
51244    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51245  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51246    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51247  fi
51248
51249  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51250
51251  # Customize LDFLAGS for libs
51252  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51253
51254  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51255  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51256    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51257        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51258    OPENJDK_BUILD_JDKLIB_LIBS=""
51259  else
51260    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51261        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51262
51263    if test "xBUILD" = "xTARGET"; then
51264    # On some platforms (mac) the linker warns about non existing -L dirs.
51265    # Add server first if available. Linking aginst client does not always produce the same results.
51266      # Only add client/minimal dir if client/minimal is being built.
51267    # Default to server for other variants.
51268      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51269        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51270      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51271        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51272      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51273        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51274    else
51275        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51276    fi
51277    elif test "xBUILD" = "xBUILD"; then
51278      # When building a buildjdk, it's always only the server variant
51279      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51280          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51281    fi
51282
51283    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51284    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51285      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51286    fi
51287
51288  fi
51289
51290OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51291
51292  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51293  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51294    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51295  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51296    # FIXME: This hard-coded path is not really proper.
51297    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51298      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51299    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51300      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51301    fi
51302    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51303        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51304  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51305    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51306  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51307    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51308  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51309    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51310  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51311    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51312        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51313        wsock32.lib winmm.lib version.lib psapi.lib"
51314    fi
51315
51316  # Set OPENJDK_BUILD_JVM_ASFLAGS
51317  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51318    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51319      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51320    fi
51321  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51322    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51323  fi
51324
51325  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341  # Tests are only ever compiled for TARGET
51342  # Flags for compiling test libraries
51343  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51344  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51345
51346  # Flags for compiling test executables
51347  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51348  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51349
51350
51351
51352
51353
51354
51355  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51356  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51357
51358
51359
51360
51361
51362
51363  # Some Zero and Shark settings.
51364  # ZERO_ARCHFLAG tells the compiler which mode to build for
51365  case "${OPENJDK_TARGET_CPU}" in
51366    s390)
51367      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51368      ;;
51369    *)
51370      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51371  esac
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414    # Execute function body
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463    # Execute function body
51464
51465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51466$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51467  supports=yes
51468
51469  saved_cflags="$CFLAGS"
51470  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51471  ac_ext=c
51472ac_cpp='$CPP $CPPFLAGS'
51473ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51474ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51475ac_compiler_gnu=$ac_cv_c_compiler_gnu
51476
51477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51478/* end confdefs.h.  */
51479int i;
51480_ACEOF
51481if ac_fn_c_try_compile "$LINENO"; then :
51482
51483else
51484  supports=no
51485fi
51486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51487  ac_ext=cpp
51488ac_cpp='$CXXCPP $CPPFLAGS'
51489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51492
51493  CFLAGS="$saved_cflags"
51494
51495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51496$as_echo "$supports" >&6; }
51497  if test "x$supports" = "xyes" ; then
51498    :
51499    C_COMP_SUPPORTS="yes"
51500  else
51501    :
51502    C_COMP_SUPPORTS="no"
51503  fi
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563    # Execute function body
51564
51565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51566$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51567  supports=yes
51568
51569  saved_cxxflags="$CXXFLAGS"
51570  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51571  ac_ext=cpp
51572ac_cpp='$CXXCPP $CPPFLAGS'
51573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51576
51577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51578/* end confdefs.h.  */
51579int i;
51580_ACEOF
51581if ac_fn_cxx_try_compile "$LINENO"; then :
51582
51583else
51584  supports=no
51585fi
51586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51587  ac_ext=cpp
51588ac_cpp='$CXXCPP $CPPFLAGS'
51589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51592
51593  CXXFLAGS="$saved_cxxflags"
51594
51595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51596$as_echo "$supports" >&6; }
51597  if test "x$supports" = "xyes" ; then
51598    :
51599    CXX_COMP_SUPPORTS="yes"
51600  else
51601    :
51602    CXX_COMP_SUPPORTS="no"
51603  fi
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51618$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51619  supports=no
51620  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51621
51622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51623$as_echo "$supports" >&6; }
51624  if test "x$supports" = "xyes" ; then
51625    :
51626
51627  else
51628    :
51629    ZERO_ARCHFLAG=""
51630  fi
51631
51632
51633
51634
51635
51636
51637
51638
51639  # Check that the compiler supports -mX (or -qX on AIX) flags
51640  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688    # Execute function body
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737    # Execute function body
51738
51739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51740$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51741  supports=yes
51742
51743  saved_cflags="$CFLAGS"
51744  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51745  ac_ext=c
51746ac_cpp='$CPP $CPPFLAGS'
51747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51749ac_compiler_gnu=$ac_cv_c_compiler_gnu
51750
51751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51752/* end confdefs.h.  */
51753int i;
51754_ACEOF
51755if ac_fn_c_try_compile "$LINENO"; then :
51756
51757else
51758  supports=no
51759fi
51760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51761  ac_ext=cpp
51762ac_cpp='$CXXCPP $CPPFLAGS'
51763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51766
51767  CFLAGS="$saved_cflags"
51768
51769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51770$as_echo "$supports" >&6; }
51771  if test "x$supports" = "xyes" ; then
51772    :
51773    C_COMP_SUPPORTS="yes"
51774  else
51775    :
51776    C_COMP_SUPPORTS="no"
51777  fi
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837    # Execute function body
51838
51839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51840$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51841  supports=yes
51842
51843  saved_cxxflags="$CXXFLAGS"
51844  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51845  ac_ext=cpp
51846ac_cpp='$CXXCPP $CPPFLAGS'
51847ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51848ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51849ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51850
51851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51852/* end confdefs.h.  */
51853int i;
51854_ACEOF
51855if ac_fn_cxx_try_compile "$LINENO"; then :
51856
51857else
51858  supports=no
51859fi
51860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51861  ac_ext=cpp
51862ac_cpp='$CXXCPP $CPPFLAGS'
51863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51866
51867  CXXFLAGS="$saved_cxxflags"
51868
51869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51870$as_echo "$supports" >&6; }
51871  if test "x$supports" = "xyes" ; then
51872    :
51873    CXX_COMP_SUPPORTS="yes"
51874  else
51875    :
51876    CXX_COMP_SUPPORTS="no"
51877  fi
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51892$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51893  supports=no
51894  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51895
51896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51897$as_echo "$supports" >&6; }
51898  if test "x$supports" = "xyes" ; then
51899    :
51900    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51901  else
51902    :
51903    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51904  fi
51905
51906
51907
51908
51909
51910
51911
51912
51913  # Check whether --enable-warnings-as-errors was given.
51914if test "${enable_warnings_as_errors+set}" = set; then :
51915  enableval=$enable_warnings_as_errors;
51916fi
51917
51918
51919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51920$as_echo_n "checking if native warnings are errors... " >&6; }
51921  if test "x$enable_warnings_as_errors" = "xyes"; then
51922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51923$as_echo "yes (explicitely set)" >&6; }
51924    WARNINGS_AS_ERRORS=true
51925  elif test "x$enable_warnings_as_errors" = "xno"; then
51926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51927$as_echo "no" >&6; }
51928    WARNINGS_AS_ERRORS=false
51929  elif test "x$enable_warnings_as_errors" = "x"; then
51930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51931$as_echo "yes (default)" >&6; }
51932    WARNINGS_AS_ERRORS=true
51933  else
51934    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51935  fi
51936
51937  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51938    # Set legacy hotspot variable
51939    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51940  else
51941    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51942  fi
51943
51944
51945
51946
51947  case "${TOOLCHAIN_TYPE}" in
51948    microsoft)
51949      DISABLE_WARNING_PREFIX="-wd"
51950      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51951      ;;
51952    solstudio)
51953      DISABLE_WARNING_PREFIX="-erroff="
51954      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51955      ;;
51956    gcc)
51957      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005    # Execute function body
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054    # Execute function body
52055
52056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52057$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52058  supports=yes
52059
52060  saved_cflags="$CFLAGS"
52061  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52062  ac_ext=c
52063ac_cpp='$CPP $CPPFLAGS'
52064ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52065ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52066ac_compiler_gnu=$ac_cv_c_compiler_gnu
52067
52068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52069/* end confdefs.h.  */
52070int i;
52071_ACEOF
52072if ac_fn_c_try_compile "$LINENO"; then :
52073
52074else
52075  supports=no
52076fi
52077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52078  ac_ext=cpp
52079ac_cpp='$CXXCPP $CPPFLAGS'
52080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52083
52084  CFLAGS="$saved_cflags"
52085
52086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52087$as_echo "$supports" >&6; }
52088  if test "x$supports" = "xyes" ; then
52089    :
52090    C_COMP_SUPPORTS="yes"
52091  else
52092    :
52093    C_COMP_SUPPORTS="no"
52094  fi
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154    # Execute function body
52155
52156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52157$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52158  supports=yes
52159
52160  saved_cxxflags="$CXXFLAGS"
52161  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52162  ac_ext=cpp
52163ac_cpp='$CXXCPP $CPPFLAGS'
52164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52167
52168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52169/* end confdefs.h.  */
52170int i;
52171_ACEOF
52172if ac_fn_cxx_try_compile "$LINENO"; then :
52173
52174else
52175  supports=no
52176fi
52177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52178  ac_ext=cpp
52179ac_cpp='$CXXCPP $CPPFLAGS'
52180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52183
52184  CXXFLAGS="$saved_cxxflags"
52185
52186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52187$as_echo "$supports" >&6; }
52188  if test "x$supports" = "xyes" ; then
52189    :
52190    CXX_COMP_SUPPORTS="yes"
52191  else
52192    :
52193    CXX_COMP_SUPPORTS="no"
52194  fi
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52209$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52210  supports=no
52211  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52212
52213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52214$as_echo "$supports" >&6; }
52215  if test "x$supports" = "xyes" ; then
52216    :
52217    GCC_CAN_DISABLE_WARNINGS=true
52218  else
52219    :
52220    GCC_CAN_DISABLE_WARNINGS=false
52221
52222  fi
52223
52224
52225
52226
52227
52228
52229      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52230        DISABLE_WARNING_PREFIX="-Wno-"
52231      else
52232        DISABLE_WARNING_PREFIX=
52233      fi
52234      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52235      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52236      # CFLAGS since any target specific flags will likely not work with the
52237      # build compiler
52238      CC_OLD="$CC"
52239      CXX_OLD="$CXX"
52240      CC="$BUILD_CC"
52241      CXX="$BUILD_CXX"
52242      CFLAGS_OLD="$CFLAGS"
52243      CFLAGS=""
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291    # Execute function body
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    # Execute function body
52341
52342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52343$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52344  supports=yes
52345
52346  saved_cflags="$CFLAGS"
52347  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52348  ac_ext=c
52349ac_cpp='$CPP $CPPFLAGS'
52350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52352ac_compiler_gnu=$ac_cv_c_compiler_gnu
52353
52354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52355/* end confdefs.h.  */
52356int i;
52357_ACEOF
52358if ac_fn_c_try_compile "$LINENO"; then :
52359
52360else
52361  supports=no
52362fi
52363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52364  ac_ext=cpp
52365ac_cpp='$CXXCPP $CPPFLAGS'
52366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52369
52370  CFLAGS="$saved_cflags"
52371
52372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52373$as_echo "$supports" >&6; }
52374  if test "x$supports" = "xyes" ; then
52375    :
52376    C_COMP_SUPPORTS="yes"
52377  else
52378    :
52379    C_COMP_SUPPORTS="no"
52380  fi
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440    # Execute function body
52441
52442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52443$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52444  supports=yes
52445
52446  saved_cxxflags="$CXXFLAGS"
52447  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52448  ac_ext=cpp
52449ac_cpp='$CXXCPP $CPPFLAGS'
52450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52453
52454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52455/* end confdefs.h.  */
52456int i;
52457_ACEOF
52458if ac_fn_cxx_try_compile "$LINENO"; then :
52459
52460else
52461  supports=no
52462fi
52463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52464  ac_ext=cpp
52465ac_cpp='$CXXCPP $CPPFLAGS'
52466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52469
52470  CXXFLAGS="$saved_cxxflags"
52471
52472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52473$as_echo "$supports" >&6; }
52474  if test "x$supports" = "xyes" ; then
52475    :
52476    CXX_COMP_SUPPORTS="yes"
52477  else
52478    :
52479    CXX_COMP_SUPPORTS="no"
52480  fi
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52495$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52496  supports=no
52497  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52498
52499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52500$as_echo "$supports" >&6; }
52501  if test "x$supports" = "xyes" ; then
52502    :
52503    BUILD_CC_CAN_DISABLE_WARNINGS=true
52504  else
52505    :
52506    BUILD_CC_CAN_DISABLE_WARNINGS=false
52507
52508  fi
52509
52510
52511
52512
52513
52514
52515      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52516        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52517      else
52518        BUILD_CC_DISABLE_WARNING_PREFIX=
52519      fi
52520      CC="$CC_OLD"
52521      CXX="$CXX_OLD"
52522      CFLAGS="$CFLAGS_OLD"
52523      ;;
52524    clang)
52525      DISABLE_WARNING_PREFIX="-Wno-"
52526      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52527      ;;
52528    xlc)
52529      DISABLE_WARNING_PREFIX="-qsuppress="
52530      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52531      ;;
52532  esac
52533
52534
52535
52536
52537
52538# Setup debug symbols (need objcopy from the toolchain for that)
52539
52540  #
52541  # NATIVE_DEBUG_SYMBOLS
52542  # This must be done after the toolchain is setup, since we're looking at objcopy.
52543  #
52544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52545$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52546
52547# Check whether --with-native-debug-symbols was given.
52548if test "${with_native_debug_symbols+set}" = set; then :
52549  withval=$with_native_debug_symbols;
52550        if test "x$OPENJDK_TARGET_OS" = xaix; then
52551          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52552            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52553          fi
52554        fi
52555
52556else
52557
52558        if test "x$OPENJDK_TARGET_OS" = xaix; then
52559          # AIX doesn't support 'zipped' so use 'internal' as default
52560          with_native_debug_symbols="internal"
52561        else
52562          if test "x$STATIC_BUILD" = xtrue; then
52563            with_native_debug_symbols="none"
52564          else
52565            with_native_debug_symbols="zipped"
52566          fi
52567        fi
52568
52569fi
52570
52571  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52573$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52574
52575  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52576
52577    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52578      if test "x$OBJCOPY" = x; then
52579        # enabling of enable-debug-symbols and can't find objcopy
52580        # this is an error
52581        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52582      fi
52583    fi
52584
52585    COMPILE_WITH_DEBUG_SYMBOLS=true
52586    COPY_DEBUG_SYMBOLS=true
52587    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52588
52589    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52590    DEBUG_BINARIES=false
52591    STRIP_POLICY=min_strip
52592
52593  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52594    COMPILE_WITH_DEBUG_SYMBOLS=false
52595    COPY_DEBUG_SYMBOLS=false
52596    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52597
52598    DEBUG_BINARIES=false
52599    STRIP_POLICY=no_strip
52600  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52601    COMPILE_WITH_DEBUG_SYMBOLS=true
52602    COPY_DEBUG_SYMBOLS=false
52603    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52604
52605    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52606    DEBUG_BINARIES=true
52607    STRIP_POLICY=no_strip
52608    STRIP=""
52609
52610  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52611
52612    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52613      if test "x$OBJCOPY" = x; then
52614        # enabling of enable-debug-symbols and can't find objcopy
52615        # this is an error
52616        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52617      fi
52618    fi
52619
52620    COMPILE_WITH_DEBUG_SYMBOLS=true
52621    COPY_DEBUG_SYMBOLS=true
52622    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52623
52624    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52625    DEBUG_BINARIES=false
52626    STRIP_POLICY=min_strip
52627  else
52628    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52629  fi
52630
52631  # --enable-debug-symbols is deprecated.
52632  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52633
52634  # Check whether --enable-debug-symbols was given.
52635if test "${enable_debug_symbols+set}" = set; then :
52636  enableval=$enable_debug_symbols;
52637fi
52638
52639  if test "x$enable_debug_symbols" != x; then
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52641$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52642
52643    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52645$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52646    fi
52647
52648  fi
52649
52650
52651  # --enable-zip-debug-info is deprecated.
52652  # Please use --with-native-debug-symbols=zipped .
52653
52654  # Check whether --enable-zip-debug-info was given.
52655if test "${enable_zip_debug_info+set}" = set; then :
52656  enableval=$enable_zip_debug_info;
52657fi
52658
52659  if test "x$enable_zip_debug_info" != x; then
52660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52661$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52662
52663    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52664      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52665$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52666    fi
52667
52668  fi
52669
52670
52671
52672
52673
52674
52675  # Legacy values
52676
52677
52678
52679
52680  # Check whether --enable-native-coverage was given.
52681if test "${enable_native_coverage+set}" = set; then :
52682  enableval=$enable_native_coverage;
52683fi
52684
52685  GCOV_ENABLED="false"
52686  if test "x$enable_native_coverage" = "xyes"; then
52687    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52688      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52689$as_echo_n "checking if native coverage is enabled... " >&6; }
52690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52691$as_echo "yes" >&6; }
52692      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52693      GCOV_LDFLAGS="-fprofile-arcs"
52694      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52695      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52696      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52697      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52698      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52699      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52700      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52701      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52702      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52703      GCOV_ENABLED="true"
52704    else
52705      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52706    fi
52707  elif test "x$enable_native_coverage" = "xno"; then
52708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52709$as_echo_n "checking if native coverage is enabled... " >&6; }
52710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52711$as_echo "no" >&6; }
52712  elif test "x$enable_native_coverage" != "x"; then
52713    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52714  fi
52715
52716
52717
52718
52719# Need toolchain to setup dtrace
52720
52721  # Test for dtrace dependencies
52722  # Check whether --enable-dtrace was given.
52723if test "${enable_dtrace+set}" = set; then :
52724  enableval=$enable_dtrace;
52725fi
52726
52727
52728  DTRACE_DEP_MISSING=false
52729
52730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52731$as_echo_n "checking for dtrace tool... " >&6; }
52732  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52734$as_echo "$DTRACE" >&6; }
52735  else
52736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52737$as_echo "not found, cannot build dtrace" >&6; }
52738    DTRACE_DEP_MISSING=true
52739  fi
52740
52741  for ac_header in sys/sdt.h
52742do :
52743  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52744if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52745  cat >>confdefs.h <<_ACEOF
52746#define HAVE_SYS_SDT_H 1
52747_ACEOF
52748 DTRACE_HEADERS_OK=yes
52749else
52750  DTRACE_HEADERS_OK=no
52751fi
52752
52753done
52754
52755  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52756    DTRACE_DEP_MISSING=true
52757  fi
52758
52759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52760$as_echo_n "checking if dtrace should be built... " >&6; }
52761  if test "x$enable_dtrace" = "xyes"; then
52762    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52764$as_echo "no, missing dependencies" >&6; }
52765
52766  # Print a helpful message on how to acquire the necessary build dependency.
52767  # dtrace is the help tag: freetype, cups, alsa etc
52768  MISSING_DEPENDENCY=dtrace
52769
52770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52771    cygwin_help $MISSING_DEPENDENCY
52772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52773    msys_help $MISSING_DEPENDENCY
52774  else
52775    PKGHANDLER_COMMAND=
52776
52777    case $PKGHANDLER in
52778      apt-get)
52779        apt_help     $MISSING_DEPENDENCY ;;
52780      yum)
52781        yum_help     $MISSING_DEPENDENCY ;;
52782      port)
52783        port_help    $MISSING_DEPENDENCY ;;
52784      pkgutil)
52785        pkgutil_help $MISSING_DEPENDENCY ;;
52786      pkgadd)
52787        pkgadd_help  $MISSING_DEPENDENCY ;;
52788    esac
52789
52790    if test "x$PKGHANDLER_COMMAND" != x; then
52791      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52792    fi
52793  fi
52794
52795      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52796    else
52797      INCLUDE_DTRACE=true
52798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52799$as_echo "yes, forced" >&6; }
52800    fi
52801  elif test "x$enable_dtrace" = "xno"; then
52802    INCLUDE_DTRACE=false
52803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52804$as_echo "no, forced" >&6; }
52805  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52806    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52807      INCLUDE_DTRACE=false
52808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52809$as_echo "no, missing dependencies" >&6; }
52810    else
52811      INCLUDE_DTRACE=true
52812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52813$as_echo "yes, dependencies present" >&6; }
52814    fi
52815  else
52816    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52817  fi
52818
52819
52820
52821  # The user can in some cases supply additional jvm features. For the custom
52822  # variant, this defines the entire variant.
52823
52824# Check whether --with-jvm-features was given.
52825if test "${with_jvm_features+set}" = set; then :
52826  withval=$with_jvm_features;
52827fi
52828
52829  if test "x$with_jvm_features" != x; then
52830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52831$as_echo_n "checking additional JVM features... " >&6; }
52832    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52834$as_echo "$JVM_FEATURES" >&6; }
52835  fi
52836
52837  # Verify that dependencies are met for explicitly set features.
52838  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52839    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52840  fi
52841
52842  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52843    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52844  fi
52845
52846  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52847    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52848  fi
52849
52850  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52851    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52852  fi
52853
52854  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52855    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52856  fi
52857
52858  # Turn on additional features based on other parts of configure
52859  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52860    JVM_FEATURES="$JVM_FEATURES dtrace"
52861  else
52862    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52863      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52864    fi
52865  fi
52866
52867  if test "x$STATIC_BUILD" = "xtrue"; then
52868    JVM_FEATURES="$JVM_FEATURES static-build"
52869  else
52870    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52871      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52872    fi
52873  fi
52874
52875  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52876    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52877      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52878    fi
52879  fi
52880
52881  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52882    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52883      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52884    fi
52885  fi
52886
52887  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52888  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52889      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52890      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52891    JVM_FEATURES_jvmci="jvmci"
52892  else
52893    JVM_FEATURES_jvmci=""
52894  fi
52895
52896  # All variants but minimal (and custom) get these features
52897  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52898
52899  # Enable features depending on variant.
52900  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52901  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52902  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52903  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52904  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52905  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52906  JVM_FEATURES_custom="$JVM_FEATURES"
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916  # Used for verification of Makefiles by check-jvm-feature
52917
52918
52919  # We don't support --with-jvm-interpreter anymore, use zero instead.
52920
52921
52922# Check whether --with-jvm-interpreter was given.
52923if test "${with_jvm_interpreter+set}" = set; then :
52924  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52925$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52926fi
52927
52928
52929
52930
52931  # Check whether --enable-hotspot-gtest was given.
52932if test "${enable_hotspot_gtest+set}" = set; then :
52933  enableval=$enable_hotspot_gtest;
52934fi
52935
52936
52937  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52938    GTEST_DIR_EXISTS="true"
52939  else
52940    GTEST_DIR_EXISTS="false"
52941  fi
52942
52943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52944$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52945  if test "x$enable_hotspot_gtest" = "xyes"; then
52946    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52948$as_echo "yes, forced" >&6; }
52949      BUILD_GTEST="true"
52950    else
52951      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52952    fi
52953  elif test "x$enable_hotspot_gtest" = "xno"; then
52954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52955$as_echo "no, forced" >&6; }
52956    BUILD_GTEST="false"
52957  elif test "x$enable_hotspot_gtest" = "x"; then
52958    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52960$as_echo "yes" >&6; }
52961      BUILD_GTEST="true"
52962    else
52963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52964$as_echo "no" >&6; }
52965      BUILD_GTEST="false"
52966    fi
52967  else
52968    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52969  fi
52970
52971
52972
52973
52974###############################################################################
52975#
52976# Check dependencies for external and internal libraries.
52977#
52978###############################################################################
52979
52980# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52981
52982  # When using cygwin or msys, we need a wrapper binary that renames
52983  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52984  # @files and rewrites these too! This wrapper binary is
52985  # called fixpath.
52986  FIXPATH=
52987  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52989$as_echo_n "checking if fixpath can be created... " >&6; }
52990    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52991    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52992    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52993    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52994      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52995      FIXPATH="$FIXPATH_BIN -c"
52996    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52997      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52998      # @ was chosen as separator to minimize risk of other tools messing around with it
52999      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53000          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53001      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53002      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53003    fi
53004    FIXPATH_SRC_W="$FIXPATH_SRC"
53005    FIXPATH_BIN_W="$FIXPATH_BIN"
53006
53007  unix_path="$FIXPATH_SRC_W"
53008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53009    windows_path=`$CYGPATH -m "$unix_path"`
53010    FIXPATH_SRC_W="$windows_path"
53011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53012    windows_path=`cmd //c echo $unix_path`
53013    FIXPATH_SRC_W="$windows_path"
53014  fi
53015
53016
53017  unix_path="$FIXPATH_BIN_W"
53018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53019    windows_path=`$CYGPATH -m "$unix_path"`
53020    FIXPATH_BIN_W="$windows_path"
53021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53022    windows_path=`cmd //c echo $unix_path`
53023    FIXPATH_BIN_W="$windows_path"
53024  fi
53025
53026    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53027    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53028    cd $FIXPATH_DIR
53029    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53030    cd $CURDIR
53031
53032    if test ! -x $FIXPATH_BIN; then
53033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53034$as_echo "no" >&6; }
53035      cat $FIXPATH_DIR/fixpath1.log
53036      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53037    fi
53038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53039$as_echo "yes" >&6; }
53040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53041$as_echo_n "checking if fixpath.exe works... " >&6; }
53042    cd $FIXPATH_DIR
53043    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53044        > $FIXPATH_DIR/fixpath2.log 2>&1
53045    cd $CURDIR
53046    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53048$as_echo "no" >&6; }
53049      cat $FIXPATH_DIR/fixpath2.log
53050      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53051    fi
53052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53053$as_echo "yes" >&6; }
53054
53055    FIXPATH_DETACH_FLAG="--detach"
53056  fi
53057
53058
53059
53060
53061
53062
53063  # Check if X11 is needed
53064  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53065    # No X11 support on windows or macosx
53066    NEEDS_LIB_X11=false
53067  else
53068    # All other instances need X11, even if building headless only, libawt still
53069    # needs X11 headers.
53070    NEEDS_LIB_X11=true
53071  fi
53072
53073  # Check if cups is needed
53074  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53075    # Windows have a separate print system
53076    NEEDS_LIB_CUPS=false
53077  else
53078    NEEDS_LIB_CUPS=true
53079  fi
53080
53081  # A custom hook may have set this already
53082  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53083    NEEDS_LIB_FREETYPE=true
53084  fi
53085
53086  # Check if alsa is needed
53087  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53088    NEEDS_LIB_ALSA=true
53089  else
53090    NEEDS_LIB_ALSA=false
53091  fi
53092
53093  # Check if ffi is needed
53094  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53095    NEEDS_LIB_FFI=true
53096  else
53097    NEEDS_LIB_FFI=false
53098  fi
53099
53100
53101  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53102  # dynamic build is configured on command line.
53103
53104# Check whether --with-stdc++lib was given.
53105if test "${with_stdc__lib+set}" = set; then :
53106  withval=$with_stdc__lib;
53107        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53108                && test "x$with_stdc__lib" != xdefault; then
53109          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53110        fi
53111
53112else
53113  with_stdc__lib=default
53114
53115fi
53116
53117
53118  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53119    # Test if stdc++ can be linked statically.
53120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53121$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53122    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53123    ac_ext=cpp
53124ac_cpp='$CXXCPP $CPPFLAGS'
53125ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53126ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53127ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53128
53129    OLD_LIBS="$LIBS"
53130    LIBS="$STATIC_STDCXX_FLAGS"
53131    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53132/* end confdefs.h.  */
53133
53134int
53135main ()
53136{
53137return 0;
53138  ;
53139  return 0;
53140}
53141_ACEOF
53142if ac_fn_cxx_try_link "$LINENO"; then :
53143  has_static_libstdcxx=yes
53144else
53145  has_static_libstdcxx=no
53146fi
53147rm -f core conftest.err conftest.$ac_objext \
53148    conftest$ac_exeext conftest.$ac_ext
53149    LIBS="$OLD_LIBS"
53150    ac_ext=cpp
53151ac_cpp='$CXXCPP $CPPFLAGS'
53152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53155
53156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53157$as_echo "$has_static_libstdcxx" >&6; }
53158
53159    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53160      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53161    fi
53162
53163    # If dynamic was requested, it's available since it would fail above otherwise.
53164    # If dynamic wasn't requested, go with static unless it isn't available.
53165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53166$as_echo_n "checking how to link with libstdc++... " >&6; }
53167    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53168        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53170$as_echo "dynamic" >&6; }
53171    else
53172      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53173      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53174      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53175      # just use the same setting as for the TARGET toolchain.
53176      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53178$as_echo "static" >&6; }
53179    fi
53180  fi
53181
53182  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53183  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53184    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53185  fi
53186
53187
53188
53189  # Setup Windows runtime dlls
53190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53191
53192
53193# Check whether --with-msvcr-dll was given.
53194if test "${with_msvcr_dll+set}" = set; then :
53195  withval=$with_msvcr_dll;
53196fi
53197
53198
53199  if test "x$with_msvcr_dll" != x; then
53200    # If given explicitely by user, do not probe. If not present, fail directly.
53201
53202  DLL_NAME="$MSVCR_NAME"
53203  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53204  METHOD="--with-msvcr-dll"
53205  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53207$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53208
53209    # Need to check if the found msvcr is correct architecture
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53211$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53212    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53214      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53215      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53217        CORRECT_MSVCR_ARCH="PE32 executable"
53218      else
53219        CORRECT_MSVCR_ARCH="PE32+ executable"
53220      fi
53221    else
53222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53223        CORRECT_MSVCR_ARCH=386
53224      else
53225        CORRECT_MSVCR_ARCH=x86-64
53226      fi
53227    fi
53228    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53230$as_echo "ok" >&6; }
53231      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53232
53233  # Only process if variable expands to non-empty
53234
53235  if test "x$MSVC_DLL" != x; then
53236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53237
53238  # Input might be given as Windows format, start by converting to
53239  # unix format.
53240  path="$MSVC_DLL"
53241  new_path=`$CYGPATH -u "$path"`
53242
53243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53246  # "foo.exe" is OK but "foo" is an error.
53247  #
53248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53249  # It is also a way to make sure we got the proper file name for the real test later on.
53250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53251  if test "x$test_shortpath" = x; then
53252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53254    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53255  fi
53256
53257  # Call helper function which possibly converts this using DOS-style short mode.
53258  # If so, the updated path is stored in $new_path.
53259
53260  input_path="$new_path"
53261  # Check if we need to convert this using DOS-style short mode. If the path
53262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53263  # take no chances and rewrite it.
53264  # Note: m4 eats our [], so we need to use [ and ] instead.
53265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53266  if test "x$has_forbidden_chars" != x; then
53267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53271      # Going to short mode and back again did indeed matter. Since short mode is
53272      # case insensitive, let's make it lowercase to improve readability.
53273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53274      # Now convert it back to Unix-style (cygpath)
53275      input_path=`$CYGPATH -u "$shortmode_path"`
53276      new_path="$input_path"
53277    fi
53278  fi
53279
53280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53281  if test "x$test_cygdrive_prefix" = x; then
53282    # As a simple fix, exclude /usr/bin since it's not a real path.
53283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53285      # a path prefixed by /cygdrive for fixpath to work.
53286      new_path="$CYGWIN_ROOT_PATH$input_path"
53287    fi
53288  fi
53289
53290
53291  if test "x$path" != "x$new_path"; then
53292    MSVC_DLL="$new_path"
53293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53295  fi
53296
53297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53298
53299  path="$MSVC_DLL"
53300  has_colon=`$ECHO $path | $GREP ^.:`
53301  new_path="$path"
53302  if test "x$has_colon" = x; then
53303    # Not in mixed or Windows style, start by that.
53304    new_path=`cmd //c echo $path`
53305  fi
53306
53307
53308  input_path="$new_path"
53309  # Check if we need to convert this using DOS-style short mode. If the path
53310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53311  # take no chances and rewrite it.
53312  # Note: m4 eats our [], so we need to use [ and ] instead.
53313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53314  if test "x$has_forbidden_chars" != x; then
53315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53317  fi
53318
53319
53320  windows_path="$new_path"
53321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53322    unix_path=`$CYGPATH -u "$windows_path"`
53323    new_path="$unix_path"
53324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53326    new_path="$unix_path"
53327  fi
53328
53329  if test "x$path" != "x$new_path"; then
53330    MSVC_DLL="$new_path"
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53333  fi
53334
53335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53337
53338    else
53339      # We're on a unix platform. Hooray! :)
53340      path="$MSVC_DLL"
53341      has_space=`$ECHO "$path" | $GREP " "`
53342      if test "x$has_space" != x; then
53343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53346      fi
53347
53348      # Use eval to expand a potential ~
53349      eval path="$path"
53350      if test ! -f "$path" && test ! -d "$path"; then
53351        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53352      fi
53353
53354      if test -d "$path"; then
53355        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53356      else
53357        dir="`$DIRNAME "$path"`"
53358        base="`$BASENAME "$path"`"
53359        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53360      fi
53361    fi
53362  fi
53363
53364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53365$as_echo_n "checking for $DLL_NAME... " >&6; }
53366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53367$as_echo "$MSVC_DLL" >&6; }
53368    else
53369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53370$as_echo "incorrect, ignoring" >&6; }
53371      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53372$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53373    fi
53374  fi
53375
53376    if test "x$MSVC_DLL" = x; then
53377      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53378    fi
53379    MSVCR_DLL="$MSVC_DLL"
53380  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53381
53382  DLL_NAME="$MSVCR_NAME"
53383  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53384  METHOD="devkit"
53385  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53387$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53388
53389    # Need to check if the found msvcr is correct architecture
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53391$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53392    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53395      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53397        CORRECT_MSVCR_ARCH="PE32 executable"
53398      else
53399        CORRECT_MSVCR_ARCH="PE32+ executable"
53400      fi
53401    else
53402      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53403        CORRECT_MSVCR_ARCH=386
53404      else
53405        CORRECT_MSVCR_ARCH=x86-64
53406      fi
53407    fi
53408    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53410$as_echo "ok" >&6; }
53411      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53412
53413  # Only process if variable expands to non-empty
53414
53415  if test "x$MSVC_DLL" != x; then
53416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53417
53418  # Input might be given as Windows format, start by converting to
53419  # unix format.
53420  path="$MSVC_DLL"
53421  new_path=`$CYGPATH -u "$path"`
53422
53423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53426  # "foo.exe" is OK but "foo" is an error.
53427  #
53428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53429  # It is also a way to make sure we got the proper file name for the real test later on.
53430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53431  if test "x$test_shortpath" = x; then
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53434    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53435  fi
53436
53437  # Call helper function which possibly converts this using DOS-style short mode.
53438  # If so, the updated path is stored in $new_path.
53439
53440  input_path="$new_path"
53441  # Check if we need to convert this using DOS-style short mode. If the path
53442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53443  # take no chances and rewrite it.
53444  # Note: m4 eats our [], so we need to use [ and ] instead.
53445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53446  if test "x$has_forbidden_chars" != x; then
53447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53451      # Going to short mode and back again did indeed matter. Since short mode is
53452      # case insensitive, let's make it lowercase to improve readability.
53453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53454      # Now convert it back to Unix-style (cygpath)
53455      input_path=`$CYGPATH -u "$shortmode_path"`
53456      new_path="$input_path"
53457    fi
53458  fi
53459
53460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53461  if test "x$test_cygdrive_prefix" = x; then
53462    # As a simple fix, exclude /usr/bin since it's not a real path.
53463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53465      # a path prefixed by /cygdrive for fixpath to work.
53466      new_path="$CYGWIN_ROOT_PATH$input_path"
53467    fi
53468  fi
53469
53470
53471  if test "x$path" != "x$new_path"; then
53472    MSVC_DLL="$new_path"
53473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53474$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53475  fi
53476
53477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53478
53479  path="$MSVC_DLL"
53480  has_colon=`$ECHO $path | $GREP ^.:`
53481  new_path="$path"
53482  if test "x$has_colon" = x; then
53483    # Not in mixed or Windows style, start by that.
53484    new_path=`cmd //c echo $path`
53485  fi
53486
53487
53488  input_path="$new_path"
53489  # Check if we need to convert this using DOS-style short mode. If the path
53490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53491  # take no chances and rewrite it.
53492  # Note: m4 eats our [], so we need to use [ and ] instead.
53493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53494  if test "x$has_forbidden_chars" != x; then
53495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53497  fi
53498
53499
53500  windows_path="$new_path"
53501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53502    unix_path=`$CYGPATH -u "$windows_path"`
53503    new_path="$unix_path"
53504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53506    new_path="$unix_path"
53507  fi
53508
53509  if test "x$path" != "x$new_path"; then
53510    MSVC_DLL="$new_path"
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53513  fi
53514
53515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53517
53518    else
53519      # We're on a unix platform. Hooray! :)
53520      path="$MSVC_DLL"
53521      has_space=`$ECHO "$path" | $GREP " "`
53522      if test "x$has_space" != x; then
53523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53524$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53526      fi
53527
53528      # Use eval to expand a potential ~
53529      eval path="$path"
53530      if test ! -f "$path" && test ! -d "$path"; then
53531        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53532      fi
53533
53534      if test -d "$path"; then
53535        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53536      else
53537        dir="`$DIRNAME "$path"`"
53538        base="`$BASENAME "$path"`"
53539        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53540      fi
53541    fi
53542  fi
53543
53544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53545$as_echo_n "checking for $DLL_NAME... " >&6; }
53546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53547$as_echo "$MSVC_DLL" >&6; }
53548    else
53549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53550$as_echo "incorrect, ignoring" >&6; }
53551      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53552$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53553    fi
53554  fi
53555
53556    if test "x$MSVC_DLL" = x; then
53557      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53558    fi
53559    MSVCR_DLL="$MSVC_DLL"
53560  else
53561
53562  DLL_NAME="${MSVCR_NAME}"
53563  MSVC_DLL=
53564
53565  if test "x$MSVC_DLL" = x; then
53566    # Probe: Using well-known location from Visual Studio 10.0
53567    if test "x$VCINSTALLDIR" != x; then
53568      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53569
53570  windows_path="$CYGWIN_VC_INSTALL_DIR"
53571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53572    unix_path=`$CYGPATH -u "$windows_path"`
53573    CYGWIN_VC_INSTALL_DIR="$unix_path"
53574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53576    CYGWIN_VC_INSTALL_DIR="$unix_path"
53577  fi
53578
53579      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53580        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53581      else
53582        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53583      fi
53584      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53585
53586  DLL_NAME="$DLL_NAME"
53587  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53588  METHOD="well-known location in VCINSTALLDIR"
53589  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53590    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53591$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53592
53593    # Need to check if the found msvcr is correct architecture
53594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53595$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53596    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53598      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53599      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53600      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53601        CORRECT_MSVCR_ARCH="PE32 executable"
53602      else
53603        CORRECT_MSVCR_ARCH="PE32+ executable"
53604      fi
53605    else
53606      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53607        CORRECT_MSVCR_ARCH=386
53608      else
53609        CORRECT_MSVCR_ARCH=x86-64
53610      fi
53611    fi
53612    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53614$as_echo "ok" >&6; }
53615      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53616
53617  # Only process if variable expands to non-empty
53618
53619  if test "x$MSVC_DLL" != x; then
53620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53621
53622  # Input might be given as Windows format, start by converting to
53623  # unix format.
53624  path="$MSVC_DLL"
53625  new_path=`$CYGPATH -u "$path"`
53626
53627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53630  # "foo.exe" is OK but "foo" is an error.
53631  #
53632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53633  # It is also a way to make sure we got the proper file name for the real test later on.
53634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53635  if test "x$test_shortpath" = x; then
53636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53637$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53638    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53639  fi
53640
53641  # Call helper function which possibly converts this using DOS-style short mode.
53642  # If so, the updated path is stored in $new_path.
53643
53644  input_path="$new_path"
53645  # Check if we need to convert this using DOS-style short mode. If the path
53646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53647  # take no chances and rewrite it.
53648  # Note: m4 eats our [], so we need to use [ and ] instead.
53649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53650  if test "x$has_forbidden_chars" != x; then
53651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53655      # Going to short mode and back again did indeed matter. Since short mode is
53656      # case insensitive, let's make it lowercase to improve readability.
53657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53658      # Now convert it back to Unix-style (cygpath)
53659      input_path=`$CYGPATH -u "$shortmode_path"`
53660      new_path="$input_path"
53661    fi
53662  fi
53663
53664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53665  if test "x$test_cygdrive_prefix" = x; then
53666    # As a simple fix, exclude /usr/bin since it's not a real path.
53667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53669      # a path prefixed by /cygdrive for fixpath to work.
53670      new_path="$CYGWIN_ROOT_PATH$input_path"
53671    fi
53672  fi
53673
53674
53675  if test "x$path" != "x$new_path"; then
53676    MSVC_DLL="$new_path"
53677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53678$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53679  fi
53680
53681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53682
53683  path="$MSVC_DLL"
53684  has_colon=`$ECHO $path | $GREP ^.:`
53685  new_path="$path"
53686  if test "x$has_colon" = x; then
53687    # Not in mixed or Windows style, start by that.
53688    new_path=`cmd //c echo $path`
53689  fi
53690
53691
53692  input_path="$new_path"
53693  # Check if we need to convert this using DOS-style short mode. If the path
53694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53695  # take no chances and rewrite it.
53696  # Note: m4 eats our [], so we need to use [ and ] instead.
53697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53698  if test "x$has_forbidden_chars" != x; then
53699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53701  fi
53702
53703
53704  windows_path="$new_path"
53705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53706    unix_path=`$CYGPATH -u "$windows_path"`
53707    new_path="$unix_path"
53708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53710    new_path="$unix_path"
53711  fi
53712
53713  if test "x$path" != "x$new_path"; then
53714    MSVC_DLL="$new_path"
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53716$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53717  fi
53718
53719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53721
53722    else
53723      # We're on a unix platform. Hooray! :)
53724      path="$MSVC_DLL"
53725      has_space=`$ECHO "$path" | $GREP " "`
53726      if test "x$has_space" != x; then
53727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53728$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53730      fi
53731
53732      # Use eval to expand a potential ~
53733      eval path="$path"
53734      if test ! -f "$path" && test ! -d "$path"; then
53735        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53736      fi
53737
53738      if test -d "$path"; then
53739        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53740      else
53741        dir="`$DIRNAME "$path"`"
53742        base="`$BASENAME "$path"`"
53743        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53744      fi
53745    fi
53746  fi
53747
53748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53749$as_echo_n "checking for $DLL_NAME... " >&6; }
53750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53751$as_echo "$MSVC_DLL" >&6; }
53752    else
53753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53754$as_echo "incorrect, ignoring" >&6; }
53755      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53756$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53757    fi
53758  fi
53759
53760    fi
53761  fi
53762
53763  if test "x$MSVC_DLL" = x; then
53764    # Probe: Check in the Boot JDK directory.
53765    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53766
53767  DLL_NAME="$DLL_NAME"
53768  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53769  METHOD="well-known location in Boot JDK"
53770  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53772$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53773
53774    # Need to check if the found msvcr is correct architecture
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53776$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53777    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53779      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53780      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53781      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53782        CORRECT_MSVCR_ARCH="PE32 executable"
53783      else
53784        CORRECT_MSVCR_ARCH="PE32+ executable"
53785      fi
53786    else
53787      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53788        CORRECT_MSVCR_ARCH=386
53789      else
53790        CORRECT_MSVCR_ARCH=x86-64
53791      fi
53792    fi
53793    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53795$as_echo "ok" >&6; }
53796      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53797
53798  # Only process if variable expands to non-empty
53799
53800  if test "x$MSVC_DLL" != x; then
53801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53802
53803  # Input might be given as Windows format, start by converting to
53804  # unix format.
53805  path="$MSVC_DLL"
53806  new_path=`$CYGPATH -u "$path"`
53807
53808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53811  # "foo.exe" is OK but "foo" is an error.
53812  #
53813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53814  # It is also a way to make sure we got the proper file name for the real test later on.
53815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53816  if test "x$test_shortpath" = x; then
53817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53819    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53820  fi
53821
53822  # Call helper function which possibly converts this using DOS-style short mode.
53823  # If so, the updated path is stored in $new_path.
53824
53825  input_path="$new_path"
53826  # Check if we need to convert this using DOS-style short mode. If the path
53827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53828  # take no chances and rewrite it.
53829  # Note: m4 eats our [], so we need to use [ and ] instead.
53830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53831  if test "x$has_forbidden_chars" != x; then
53832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53836      # Going to short mode and back again did indeed matter. Since short mode is
53837      # case insensitive, let's make it lowercase to improve readability.
53838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53839      # Now convert it back to Unix-style (cygpath)
53840      input_path=`$CYGPATH -u "$shortmode_path"`
53841      new_path="$input_path"
53842    fi
53843  fi
53844
53845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53846  if test "x$test_cygdrive_prefix" = x; then
53847    # As a simple fix, exclude /usr/bin since it's not a real path.
53848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53850      # a path prefixed by /cygdrive for fixpath to work.
53851      new_path="$CYGWIN_ROOT_PATH$input_path"
53852    fi
53853  fi
53854
53855
53856  if test "x$path" != "x$new_path"; then
53857    MSVC_DLL="$new_path"
53858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53859$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53860  fi
53861
53862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53863
53864  path="$MSVC_DLL"
53865  has_colon=`$ECHO $path | $GREP ^.:`
53866  new_path="$path"
53867  if test "x$has_colon" = x; then
53868    # Not in mixed or Windows style, start by that.
53869    new_path=`cmd //c echo $path`
53870  fi
53871
53872
53873  input_path="$new_path"
53874  # Check if we need to convert this using DOS-style short mode. If the path
53875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53876  # take no chances and rewrite it.
53877  # Note: m4 eats our [], so we need to use [ and ] instead.
53878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53879  if test "x$has_forbidden_chars" != x; then
53880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53882  fi
53883
53884
53885  windows_path="$new_path"
53886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53887    unix_path=`$CYGPATH -u "$windows_path"`
53888    new_path="$unix_path"
53889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53891    new_path="$unix_path"
53892  fi
53893
53894  if test "x$path" != "x$new_path"; then
53895    MSVC_DLL="$new_path"
53896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53897$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53898  fi
53899
53900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53902
53903    else
53904      # We're on a unix platform. Hooray! :)
53905      path="$MSVC_DLL"
53906      has_space=`$ECHO "$path" | $GREP " "`
53907      if test "x$has_space" != x; then
53908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53909$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53911      fi
53912
53913      # Use eval to expand a potential ~
53914      eval path="$path"
53915      if test ! -f "$path" && test ! -d "$path"; then
53916        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53917      fi
53918
53919      if test -d "$path"; then
53920        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53921      else
53922        dir="`$DIRNAME "$path"`"
53923        base="`$BASENAME "$path"`"
53924        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53925      fi
53926    fi
53927  fi
53928
53929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53930$as_echo_n "checking for $DLL_NAME... " >&6; }
53931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53932$as_echo "$MSVC_DLL" >&6; }
53933    else
53934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53935$as_echo "incorrect, ignoring" >&6; }
53936      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53937$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53938    fi
53939  fi
53940
53941  fi
53942
53943  if test "x$MSVC_DLL" = x; then
53944    # Probe: Look in the Windows system32 directory
53945    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53946
53947  windows_path="$CYGWIN_SYSTEMROOT"
53948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53949    unix_path=`$CYGPATH -u "$windows_path"`
53950    CYGWIN_SYSTEMROOT="$unix_path"
53951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53953    CYGWIN_SYSTEMROOT="$unix_path"
53954  fi
53955
53956    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53957
53958  DLL_NAME="$DLL_NAME"
53959  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53960  METHOD="well-known location in SYSTEMROOT"
53961  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53963$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53964
53965    # Need to check if the found msvcr is correct architecture
53966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53967$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53968    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53970      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53971      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53972      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53973        CORRECT_MSVCR_ARCH="PE32 executable"
53974      else
53975        CORRECT_MSVCR_ARCH="PE32+ executable"
53976      fi
53977    else
53978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53979        CORRECT_MSVCR_ARCH=386
53980      else
53981        CORRECT_MSVCR_ARCH=x86-64
53982      fi
53983    fi
53984    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53986$as_echo "ok" >&6; }
53987      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53988
53989  # Only process if variable expands to non-empty
53990
53991  if test "x$MSVC_DLL" != x; then
53992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53993
53994  # Input might be given as Windows format, start by converting to
53995  # unix format.
53996  path="$MSVC_DLL"
53997  new_path=`$CYGPATH -u "$path"`
53998
53999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54002  # "foo.exe" is OK but "foo" is an error.
54003  #
54004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54005  # It is also a way to make sure we got the proper file name for the real test later on.
54006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54007  if test "x$test_shortpath" = x; then
54008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54009$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54010    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54011  fi
54012
54013  # Call helper function which possibly converts this using DOS-style short mode.
54014  # If so, the updated path is stored in $new_path.
54015
54016  input_path="$new_path"
54017  # Check if we need to convert this using DOS-style short mode. If the path
54018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54019  # take no chances and rewrite it.
54020  # Note: m4 eats our [], so we need to use [ and ] instead.
54021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54022  if test "x$has_forbidden_chars" != x; then
54023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54027      # Going to short mode and back again did indeed matter. Since short mode is
54028      # case insensitive, let's make it lowercase to improve readability.
54029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54030      # Now convert it back to Unix-style (cygpath)
54031      input_path=`$CYGPATH -u "$shortmode_path"`
54032      new_path="$input_path"
54033    fi
54034  fi
54035
54036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54037  if test "x$test_cygdrive_prefix" = x; then
54038    # As a simple fix, exclude /usr/bin since it's not a real path.
54039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54041      # a path prefixed by /cygdrive for fixpath to work.
54042      new_path="$CYGWIN_ROOT_PATH$input_path"
54043    fi
54044  fi
54045
54046
54047  if test "x$path" != "x$new_path"; then
54048    MSVC_DLL="$new_path"
54049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54050$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54051  fi
54052
54053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54054
54055  path="$MSVC_DLL"
54056  has_colon=`$ECHO $path | $GREP ^.:`
54057  new_path="$path"
54058  if test "x$has_colon" = x; then
54059    # Not in mixed or Windows style, start by that.
54060    new_path=`cmd //c echo $path`
54061  fi
54062
54063
54064  input_path="$new_path"
54065  # Check if we need to convert this using DOS-style short mode. If the path
54066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54067  # take no chances and rewrite it.
54068  # Note: m4 eats our [], so we need to use [ and ] instead.
54069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54070  if test "x$has_forbidden_chars" != x; then
54071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54073  fi
54074
54075
54076  windows_path="$new_path"
54077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54078    unix_path=`$CYGPATH -u "$windows_path"`
54079    new_path="$unix_path"
54080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54082    new_path="$unix_path"
54083  fi
54084
54085  if test "x$path" != "x$new_path"; then
54086    MSVC_DLL="$new_path"
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54089  fi
54090
54091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54093
54094    else
54095      # We're on a unix platform. Hooray! :)
54096      path="$MSVC_DLL"
54097      has_space=`$ECHO "$path" | $GREP " "`
54098      if test "x$has_space" != x; then
54099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54100$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54101        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54102      fi
54103
54104      # Use eval to expand a potential ~
54105      eval path="$path"
54106      if test ! -f "$path" && test ! -d "$path"; then
54107        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54108      fi
54109
54110      if test -d "$path"; then
54111        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54112      else
54113        dir="`$DIRNAME "$path"`"
54114        base="`$BASENAME "$path"`"
54115        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54116      fi
54117    fi
54118  fi
54119
54120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54121$as_echo_n "checking for $DLL_NAME... " >&6; }
54122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54123$as_echo "$MSVC_DLL" >&6; }
54124    else
54125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54126$as_echo "incorrect, ignoring" >&6; }
54127      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54128$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54129    fi
54130  fi
54131
54132  fi
54133
54134  if test "x$MSVC_DLL" = x; then
54135    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54136    if test "x$VS100COMNTOOLS" != x; then
54137      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54138
54139  windows_path="$CYGWIN_VS_TOOLS_DIR"
54140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54141    unix_path=`$CYGPATH -u "$windows_path"`
54142    CYGWIN_VS_TOOLS_DIR="$unix_path"
54143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54145    CYGWIN_VS_TOOLS_DIR="$unix_path"
54146  fi
54147
54148      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54149        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54150	    | $GREP -i /x64/ | $HEAD --lines 1`
54151      else
54152        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54153	    | $GREP -i /x86/ | $HEAD --lines 1`
54154      fi
54155
54156  DLL_NAME="$DLL_NAME"
54157  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54158  METHOD="search of VS100COMNTOOLS"
54159  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54161$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54162
54163    # Need to check if the found msvcr is correct architecture
54164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54165$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54166    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54168      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54169      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54170      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54171        CORRECT_MSVCR_ARCH="PE32 executable"
54172      else
54173        CORRECT_MSVCR_ARCH="PE32+ executable"
54174      fi
54175    else
54176      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54177        CORRECT_MSVCR_ARCH=386
54178      else
54179        CORRECT_MSVCR_ARCH=x86-64
54180      fi
54181    fi
54182    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54184$as_echo "ok" >&6; }
54185      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54186
54187  # Only process if variable expands to non-empty
54188
54189  if test "x$MSVC_DLL" != x; then
54190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54191
54192  # Input might be given as Windows format, start by converting to
54193  # unix format.
54194  path="$MSVC_DLL"
54195  new_path=`$CYGPATH -u "$path"`
54196
54197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54200  # "foo.exe" is OK but "foo" is an error.
54201  #
54202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54203  # It is also a way to make sure we got the proper file name for the real test later on.
54204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54205  if test "x$test_shortpath" = x; then
54206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54208    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54209  fi
54210
54211  # Call helper function which possibly converts this using DOS-style short mode.
54212  # If so, the updated path is stored in $new_path.
54213
54214  input_path="$new_path"
54215  # Check if we need to convert this using DOS-style short mode. If the path
54216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54217  # take no chances and rewrite it.
54218  # Note: m4 eats our [], so we need to use [ and ] instead.
54219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54220  if test "x$has_forbidden_chars" != x; then
54221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54225      # Going to short mode and back again did indeed matter. Since short mode is
54226      # case insensitive, let's make it lowercase to improve readability.
54227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54228      # Now convert it back to Unix-style (cygpath)
54229      input_path=`$CYGPATH -u "$shortmode_path"`
54230      new_path="$input_path"
54231    fi
54232  fi
54233
54234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54235  if test "x$test_cygdrive_prefix" = x; then
54236    # As a simple fix, exclude /usr/bin since it's not a real path.
54237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54239      # a path prefixed by /cygdrive for fixpath to work.
54240      new_path="$CYGWIN_ROOT_PATH$input_path"
54241    fi
54242  fi
54243
54244
54245  if test "x$path" != "x$new_path"; then
54246    MSVC_DLL="$new_path"
54247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54248$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54249  fi
54250
54251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54252
54253  path="$MSVC_DLL"
54254  has_colon=`$ECHO $path | $GREP ^.:`
54255  new_path="$path"
54256  if test "x$has_colon" = x; then
54257    # Not in mixed or Windows style, start by that.
54258    new_path=`cmd //c echo $path`
54259  fi
54260
54261
54262  input_path="$new_path"
54263  # Check if we need to convert this using DOS-style short mode. If the path
54264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54265  # take no chances and rewrite it.
54266  # Note: m4 eats our [], so we need to use [ and ] instead.
54267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54268  if test "x$has_forbidden_chars" != x; then
54269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54271  fi
54272
54273
54274  windows_path="$new_path"
54275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54276    unix_path=`$CYGPATH -u "$windows_path"`
54277    new_path="$unix_path"
54278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54280    new_path="$unix_path"
54281  fi
54282
54283  if test "x$path" != "x$new_path"; then
54284    MSVC_DLL="$new_path"
54285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54286$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54287  fi
54288
54289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54291
54292    else
54293      # We're on a unix platform. Hooray! :)
54294      path="$MSVC_DLL"
54295      has_space=`$ECHO "$path" | $GREP " "`
54296      if test "x$has_space" != x; then
54297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54298$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54300      fi
54301
54302      # Use eval to expand a potential ~
54303      eval path="$path"
54304      if test ! -f "$path" && test ! -d "$path"; then
54305        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54306      fi
54307
54308      if test -d "$path"; then
54309        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54310      else
54311        dir="`$DIRNAME "$path"`"
54312        base="`$BASENAME "$path"`"
54313        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54314      fi
54315    fi
54316  fi
54317
54318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54319$as_echo_n "checking for $DLL_NAME... " >&6; }
54320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54321$as_echo "$MSVC_DLL" >&6; }
54322    else
54323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54324$as_echo "incorrect, ignoring" >&6; }
54325      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54326$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54327    fi
54328  fi
54329
54330    fi
54331  fi
54332
54333  if test "x$MSVC_DLL" = x; then
54334    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54335    # (This was the original behaviour; kept since it might turn something up)
54336    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54337      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54338        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54339	    | $GREP x64 | $HEAD --lines 1`
54340      else
54341        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54342	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54343        if test "x$POSSIBLE_MSVC_DLL" = x; then
54344          # We're grasping at straws now...
54345          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54346	      | $HEAD --lines 1`
54347        fi
54348      fi
54349
54350
54351  DLL_NAME="$DLL_NAME"
54352  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54353  METHOD="search of VCINSTALLDIR"
54354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54357
54358    # Need to check if the found msvcr is correct architecture
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54366        CORRECT_MSVCR_ARCH="PE32 executable"
54367      else
54368        CORRECT_MSVCR_ARCH="PE32+ executable"
54369      fi
54370    else
54371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54372        CORRECT_MSVCR_ARCH=386
54373      else
54374        CORRECT_MSVCR_ARCH=x86-64
54375      fi
54376    fi
54377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54379$as_echo "ok" >&6; }
54380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54381
54382  # Only process if variable expands to non-empty
54383
54384  if test "x$MSVC_DLL" != x; then
54385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54386
54387  # Input might be given as Windows format, start by converting to
54388  # unix format.
54389  path="$MSVC_DLL"
54390  new_path=`$CYGPATH -u "$path"`
54391
54392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54395  # "foo.exe" is OK but "foo" is an error.
54396  #
54397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54398  # It is also a way to make sure we got the proper file name for the real test later on.
54399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54400  if test "x$test_shortpath" = x; then
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54403    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54404  fi
54405
54406  # Call helper function which possibly converts this using DOS-style short mode.
54407  # If so, the updated path is stored in $new_path.
54408
54409  input_path="$new_path"
54410  # Check if we need to convert this using DOS-style short mode. If the path
54411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54412  # take no chances and rewrite it.
54413  # Note: m4 eats our [], so we need to use [ and ] instead.
54414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54415  if test "x$has_forbidden_chars" != x; then
54416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54420      # Going to short mode and back again did indeed matter. Since short mode is
54421      # case insensitive, let's make it lowercase to improve readability.
54422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54423      # Now convert it back to Unix-style (cygpath)
54424      input_path=`$CYGPATH -u "$shortmode_path"`
54425      new_path="$input_path"
54426    fi
54427  fi
54428
54429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54430  if test "x$test_cygdrive_prefix" = x; then
54431    # As a simple fix, exclude /usr/bin since it's not a real path.
54432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54434      # a path prefixed by /cygdrive for fixpath to work.
54435      new_path="$CYGWIN_ROOT_PATH$input_path"
54436    fi
54437  fi
54438
54439
54440  if test "x$path" != "x$new_path"; then
54441    MSVC_DLL="$new_path"
54442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54444  fi
54445
54446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54447
54448  path="$MSVC_DLL"
54449  has_colon=`$ECHO $path | $GREP ^.:`
54450  new_path="$path"
54451  if test "x$has_colon" = x; then
54452    # Not in mixed or Windows style, start by that.
54453    new_path=`cmd //c echo $path`
54454  fi
54455
54456
54457  input_path="$new_path"
54458  # Check if we need to convert this using DOS-style short mode. If the path
54459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54460  # take no chances and rewrite it.
54461  # Note: m4 eats our [], so we need to use [ and ] instead.
54462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54463  if test "x$has_forbidden_chars" != x; then
54464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54466  fi
54467
54468
54469  windows_path="$new_path"
54470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54471    unix_path=`$CYGPATH -u "$windows_path"`
54472    new_path="$unix_path"
54473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54475    new_path="$unix_path"
54476  fi
54477
54478  if test "x$path" != "x$new_path"; then
54479    MSVC_DLL="$new_path"
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54482  fi
54483
54484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54486
54487    else
54488      # We're on a unix platform. Hooray! :)
54489      path="$MSVC_DLL"
54490      has_space=`$ECHO "$path" | $GREP " "`
54491      if test "x$has_space" != x; then
54492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54493$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54495      fi
54496
54497      # Use eval to expand a potential ~
54498      eval path="$path"
54499      if test ! -f "$path" && test ! -d "$path"; then
54500        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54501      fi
54502
54503      if test -d "$path"; then
54504        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54505      else
54506        dir="`$DIRNAME "$path"`"
54507        base="`$BASENAME "$path"`"
54508        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54509      fi
54510    fi
54511  fi
54512
54513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54514$as_echo_n "checking for $DLL_NAME... " >&6; }
54515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54516$as_echo "$MSVC_DLL" >&6; }
54517    else
54518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54519$as_echo "incorrect, ignoring" >&6; }
54520      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54521$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54522    fi
54523  fi
54524
54525    fi
54526  fi
54527
54528  if test "x$MSVC_DLL" = x; then
54529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54530$as_echo_n "checking for $DLL_NAME... " >&6; }
54531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54532$as_echo "no" >&6; }
54533    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54534  fi
54535
54536    MSVCR_DLL="$MSVC_DLL"
54537  fi
54538
54539
54540
54541# Check whether --with-msvcp-dll was given.
54542if test "${with_msvcp_dll+set}" = set; then :
54543  withval=$with_msvcp_dll;
54544fi
54545
54546
54547  if test "x$MSVCP_NAME" != "x"; then
54548    if test "x$with_msvcp_dll" != x; then
54549      # If given explicitely by user, do not probe. If not present, fail directly.
54550
54551  DLL_NAME="$MSVCP_NAME"
54552  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54553  METHOD="--with-msvcp-dll"
54554  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54555    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54556$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54557
54558    # Need to check if the found msvcr is correct architecture
54559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54560$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54561    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54564      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54565      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54566        CORRECT_MSVCR_ARCH="PE32 executable"
54567      else
54568        CORRECT_MSVCR_ARCH="PE32+ executable"
54569      fi
54570    else
54571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54572        CORRECT_MSVCR_ARCH=386
54573      else
54574        CORRECT_MSVCR_ARCH=x86-64
54575      fi
54576    fi
54577    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54579$as_echo "ok" >&6; }
54580      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54581
54582  # Only process if variable expands to non-empty
54583
54584  if test "x$MSVC_DLL" != x; then
54585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54586
54587  # Input might be given as Windows format, start by converting to
54588  # unix format.
54589  path="$MSVC_DLL"
54590  new_path=`$CYGPATH -u "$path"`
54591
54592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54595  # "foo.exe" is OK but "foo" is an error.
54596  #
54597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54598  # It is also a way to make sure we got the proper file name for the real test later on.
54599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54600  if test "x$test_shortpath" = x; then
54601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54602$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54603    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54604  fi
54605
54606  # Call helper function which possibly converts this using DOS-style short mode.
54607  # If so, the updated path is stored in $new_path.
54608
54609  input_path="$new_path"
54610  # Check if we need to convert this using DOS-style short mode. If the path
54611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54612  # take no chances and rewrite it.
54613  # Note: m4 eats our [], so we need to use [ and ] instead.
54614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54615  if test "x$has_forbidden_chars" != x; then
54616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54620      # Going to short mode and back again did indeed matter. Since short mode is
54621      # case insensitive, let's make it lowercase to improve readability.
54622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54623      # Now convert it back to Unix-style (cygpath)
54624      input_path=`$CYGPATH -u "$shortmode_path"`
54625      new_path="$input_path"
54626    fi
54627  fi
54628
54629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54630  if test "x$test_cygdrive_prefix" = x; then
54631    # As a simple fix, exclude /usr/bin since it's not a real path.
54632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54634      # a path prefixed by /cygdrive for fixpath to work.
54635      new_path="$CYGWIN_ROOT_PATH$input_path"
54636    fi
54637  fi
54638
54639
54640  if test "x$path" != "x$new_path"; then
54641    MSVC_DLL="$new_path"
54642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54643$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54644  fi
54645
54646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54647
54648  path="$MSVC_DLL"
54649  has_colon=`$ECHO $path | $GREP ^.:`
54650  new_path="$path"
54651  if test "x$has_colon" = x; then
54652    # Not in mixed or Windows style, start by that.
54653    new_path=`cmd //c echo $path`
54654  fi
54655
54656
54657  input_path="$new_path"
54658  # Check if we need to convert this using DOS-style short mode. If the path
54659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54660  # take no chances and rewrite it.
54661  # Note: m4 eats our [], so we need to use [ and ] instead.
54662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54663  if test "x$has_forbidden_chars" != x; then
54664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54666  fi
54667
54668
54669  windows_path="$new_path"
54670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54671    unix_path=`$CYGPATH -u "$windows_path"`
54672    new_path="$unix_path"
54673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54675    new_path="$unix_path"
54676  fi
54677
54678  if test "x$path" != "x$new_path"; then
54679    MSVC_DLL="$new_path"
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54681$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54682  fi
54683
54684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54686
54687    else
54688      # We're on a unix platform. Hooray! :)
54689      path="$MSVC_DLL"
54690      has_space=`$ECHO "$path" | $GREP " "`
54691      if test "x$has_space" != x; then
54692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54693$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54695      fi
54696
54697      # Use eval to expand a potential ~
54698      eval path="$path"
54699      if test ! -f "$path" && test ! -d "$path"; then
54700        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54701      fi
54702
54703      if test -d "$path"; then
54704        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54705      else
54706        dir="`$DIRNAME "$path"`"
54707        base="`$BASENAME "$path"`"
54708        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54709      fi
54710    fi
54711  fi
54712
54713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54714$as_echo_n "checking for $DLL_NAME... " >&6; }
54715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54716$as_echo "$MSVC_DLL" >&6; }
54717    else
54718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54719$as_echo "incorrect, ignoring" >&6; }
54720      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54721$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54722    fi
54723  fi
54724
54725      if test "x$MSVC_DLL" = x; then
54726        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54727      fi
54728      MSVCP_DLL="$MSVC_DLL"
54729    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54730
54731  DLL_NAME="$MSVCP_NAME"
54732  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54733  METHOD="devkit"
54734  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54736$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54737
54738    # Need to check if the found msvcr is correct architecture
54739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54740$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54741    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54744      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54746        CORRECT_MSVCR_ARCH="PE32 executable"
54747      else
54748        CORRECT_MSVCR_ARCH="PE32+ executable"
54749      fi
54750    else
54751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54752        CORRECT_MSVCR_ARCH=386
54753      else
54754        CORRECT_MSVCR_ARCH=x86-64
54755      fi
54756    fi
54757    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54759$as_echo "ok" >&6; }
54760      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54761
54762  # Only process if variable expands to non-empty
54763
54764  if test "x$MSVC_DLL" != x; then
54765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54766
54767  # Input might be given as Windows format, start by converting to
54768  # unix format.
54769  path="$MSVC_DLL"
54770  new_path=`$CYGPATH -u "$path"`
54771
54772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54775  # "foo.exe" is OK but "foo" is an error.
54776  #
54777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54778  # It is also a way to make sure we got the proper file name for the real test later on.
54779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54780  if test "x$test_shortpath" = x; then
54781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54783    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54784  fi
54785
54786  # Call helper function which possibly converts this using DOS-style short mode.
54787  # If so, the updated path is stored in $new_path.
54788
54789  input_path="$new_path"
54790  # Check if we need to convert this using DOS-style short mode. If the path
54791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54792  # take no chances and rewrite it.
54793  # Note: m4 eats our [], so we need to use [ and ] instead.
54794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54795  if test "x$has_forbidden_chars" != x; then
54796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54800      # Going to short mode and back again did indeed matter. Since short mode is
54801      # case insensitive, let's make it lowercase to improve readability.
54802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54803      # Now convert it back to Unix-style (cygpath)
54804      input_path=`$CYGPATH -u "$shortmode_path"`
54805      new_path="$input_path"
54806    fi
54807  fi
54808
54809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54810  if test "x$test_cygdrive_prefix" = x; then
54811    # As a simple fix, exclude /usr/bin since it's not a real path.
54812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54814      # a path prefixed by /cygdrive for fixpath to work.
54815      new_path="$CYGWIN_ROOT_PATH$input_path"
54816    fi
54817  fi
54818
54819
54820  if test "x$path" != "x$new_path"; then
54821    MSVC_DLL="$new_path"
54822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54823$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54824  fi
54825
54826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54827
54828  path="$MSVC_DLL"
54829  has_colon=`$ECHO $path | $GREP ^.:`
54830  new_path="$path"
54831  if test "x$has_colon" = x; then
54832    # Not in mixed or Windows style, start by that.
54833    new_path=`cmd //c echo $path`
54834  fi
54835
54836
54837  input_path="$new_path"
54838  # Check if we need to convert this using DOS-style short mode. If the path
54839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54840  # take no chances and rewrite it.
54841  # Note: m4 eats our [], so we need to use [ and ] instead.
54842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54843  if test "x$has_forbidden_chars" != x; then
54844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54846  fi
54847
54848
54849  windows_path="$new_path"
54850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54851    unix_path=`$CYGPATH -u "$windows_path"`
54852    new_path="$unix_path"
54853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54855    new_path="$unix_path"
54856  fi
54857
54858  if test "x$path" != "x$new_path"; then
54859    MSVC_DLL="$new_path"
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54862  fi
54863
54864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54866
54867    else
54868      # We're on a unix platform. Hooray! :)
54869      path="$MSVC_DLL"
54870      has_space=`$ECHO "$path" | $GREP " "`
54871      if test "x$has_space" != x; then
54872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54873$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54875      fi
54876
54877      # Use eval to expand a potential ~
54878      eval path="$path"
54879      if test ! -f "$path" && test ! -d "$path"; then
54880        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54881      fi
54882
54883      if test -d "$path"; then
54884        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54885      else
54886        dir="`$DIRNAME "$path"`"
54887        base="`$BASENAME "$path"`"
54888        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54889      fi
54890    fi
54891  fi
54892
54893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54894$as_echo_n "checking for $DLL_NAME... " >&6; }
54895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54896$as_echo "$MSVC_DLL" >&6; }
54897    else
54898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54899$as_echo "incorrect, ignoring" >&6; }
54900      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54901$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54902    fi
54903  fi
54904
54905      if test "x$MSVC_DLL" = x; then
54906        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54907      fi
54908      MSVCP_DLL="$MSVC_DLL"
54909    else
54910
54911  DLL_NAME="${MSVCP_NAME}"
54912  MSVC_DLL=
54913
54914  if test "x$MSVC_DLL" = x; then
54915    # Probe: Using well-known location from Visual Studio 10.0
54916    if test "x$VCINSTALLDIR" != x; then
54917      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54918
54919  windows_path="$CYGWIN_VC_INSTALL_DIR"
54920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54921    unix_path=`$CYGPATH -u "$windows_path"`
54922    CYGWIN_VC_INSTALL_DIR="$unix_path"
54923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54925    CYGWIN_VC_INSTALL_DIR="$unix_path"
54926  fi
54927
54928      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54929        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54930      else
54931        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54932      fi
54933      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54934
54935  DLL_NAME="$DLL_NAME"
54936  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54937  METHOD="well-known location in VCINSTALLDIR"
54938  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54939    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54940$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54941
54942    # Need to check if the found msvcr is correct architecture
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54944$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54945    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54947      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54948      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54949      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54950        CORRECT_MSVCR_ARCH="PE32 executable"
54951      else
54952        CORRECT_MSVCR_ARCH="PE32+ executable"
54953      fi
54954    else
54955      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54956        CORRECT_MSVCR_ARCH=386
54957      else
54958        CORRECT_MSVCR_ARCH=x86-64
54959      fi
54960    fi
54961    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54963$as_echo "ok" >&6; }
54964      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54965
54966  # Only process if variable expands to non-empty
54967
54968  if test "x$MSVC_DLL" != x; then
54969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54970
54971  # Input might be given as Windows format, start by converting to
54972  # unix format.
54973  path="$MSVC_DLL"
54974  new_path=`$CYGPATH -u "$path"`
54975
54976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54979  # "foo.exe" is OK but "foo" is an error.
54980  #
54981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54982  # It is also a way to make sure we got the proper file name for the real test later on.
54983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54984  if test "x$test_shortpath" = x; then
54985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54986$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54987    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54988  fi
54989
54990  # Call helper function which possibly converts this using DOS-style short mode.
54991  # If so, the updated path is stored in $new_path.
54992
54993  input_path="$new_path"
54994  # Check if we need to convert this using DOS-style short mode. If the path
54995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54996  # take no chances and rewrite it.
54997  # Note: m4 eats our [], so we need to use [ and ] instead.
54998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54999  if test "x$has_forbidden_chars" != x; then
55000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55004      # Going to short mode and back again did indeed matter. Since short mode is
55005      # case insensitive, let's make it lowercase to improve readability.
55006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55007      # Now convert it back to Unix-style (cygpath)
55008      input_path=`$CYGPATH -u "$shortmode_path"`
55009      new_path="$input_path"
55010    fi
55011  fi
55012
55013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55014  if test "x$test_cygdrive_prefix" = x; then
55015    # As a simple fix, exclude /usr/bin since it's not a real path.
55016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55018      # a path prefixed by /cygdrive for fixpath to work.
55019      new_path="$CYGWIN_ROOT_PATH$input_path"
55020    fi
55021  fi
55022
55023
55024  if test "x$path" != "x$new_path"; then
55025    MSVC_DLL="$new_path"
55026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55027$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55028  fi
55029
55030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55031
55032  path="$MSVC_DLL"
55033  has_colon=`$ECHO $path | $GREP ^.:`
55034  new_path="$path"
55035  if test "x$has_colon" = x; then
55036    # Not in mixed or Windows style, start by that.
55037    new_path=`cmd //c echo $path`
55038  fi
55039
55040
55041  input_path="$new_path"
55042  # Check if we need to convert this using DOS-style short mode. If the path
55043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55044  # take no chances and rewrite it.
55045  # Note: m4 eats our [], so we need to use [ and ] instead.
55046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55047  if test "x$has_forbidden_chars" != x; then
55048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55050  fi
55051
55052
55053  windows_path="$new_path"
55054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55055    unix_path=`$CYGPATH -u "$windows_path"`
55056    new_path="$unix_path"
55057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55059    new_path="$unix_path"
55060  fi
55061
55062  if test "x$path" != "x$new_path"; then
55063    MSVC_DLL="$new_path"
55064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55065$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55066  fi
55067
55068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55070
55071    else
55072      # We're on a unix platform. Hooray! :)
55073      path="$MSVC_DLL"
55074      has_space=`$ECHO "$path" | $GREP " "`
55075      if test "x$has_space" != x; then
55076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55077$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55079      fi
55080
55081      # Use eval to expand a potential ~
55082      eval path="$path"
55083      if test ! -f "$path" && test ! -d "$path"; then
55084        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55085      fi
55086
55087      if test -d "$path"; then
55088        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55089      else
55090        dir="`$DIRNAME "$path"`"
55091        base="`$BASENAME "$path"`"
55092        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55093      fi
55094    fi
55095  fi
55096
55097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55098$as_echo_n "checking for $DLL_NAME... " >&6; }
55099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55100$as_echo "$MSVC_DLL" >&6; }
55101    else
55102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55103$as_echo "incorrect, ignoring" >&6; }
55104      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55105$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55106    fi
55107  fi
55108
55109    fi
55110  fi
55111
55112  if test "x$MSVC_DLL" = x; then
55113    # Probe: Check in the Boot JDK directory.
55114    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55115
55116  DLL_NAME="$DLL_NAME"
55117  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55118  METHOD="well-known location in Boot JDK"
55119  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55120    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55121$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55122
55123    # Need to check if the found msvcr is correct architecture
55124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55125$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55126    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55128      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55129      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55130      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55131        CORRECT_MSVCR_ARCH="PE32 executable"
55132      else
55133        CORRECT_MSVCR_ARCH="PE32+ executable"
55134      fi
55135    else
55136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55137        CORRECT_MSVCR_ARCH=386
55138      else
55139        CORRECT_MSVCR_ARCH=x86-64
55140      fi
55141    fi
55142    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55144$as_echo "ok" >&6; }
55145      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55146
55147  # Only process if variable expands to non-empty
55148
55149  if test "x$MSVC_DLL" != x; then
55150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55151
55152  # Input might be given as Windows format, start by converting to
55153  # unix format.
55154  path="$MSVC_DLL"
55155  new_path=`$CYGPATH -u "$path"`
55156
55157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55160  # "foo.exe" is OK but "foo" is an error.
55161  #
55162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55163  # It is also a way to make sure we got the proper file name for the real test later on.
55164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55165  if test "x$test_shortpath" = x; then
55166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55167$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55168    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55169  fi
55170
55171  # Call helper function which possibly converts this using DOS-style short mode.
55172  # If so, the updated path is stored in $new_path.
55173
55174  input_path="$new_path"
55175  # Check if we need to convert this using DOS-style short mode. If the path
55176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55177  # take no chances and rewrite it.
55178  # Note: m4 eats our [], so we need to use [ and ] instead.
55179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55180  if test "x$has_forbidden_chars" != x; then
55181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55185      # Going to short mode and back again did indeed matter. Since short mode is
55186      # case insensitive, let's make it lowercase to improve readability.
55187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55188      # Now convert it back to Unix-style (cygpath)
55189      input_path=`$CYGPATH -u "$shortmode_path"`
55190      new_path="$input_path"
55191    fi
55192  fi
55193
55194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55195  if test "x$test_cygdrive_prefix" = x; then
55196    # As a simple fix, exclude /usr/bin since it's not a real path.
55197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55199      # a path prefixed by /cygdrive for fixpath to work.
55200      new_path="$CYGWIN_ROOT_PATH$input_path"
55201    fi
55202  fi
55203
55204
55205  if test "x$path" != "x$new_path"; then
55206    MSVC_DLL="$new_path"
55207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55208$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55209  fi
55210
55211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55212
55213  path="$MSVC_DLL"
55214  has_colon=`$ECHO $path | $GREP ^.:`
55215  new_path="$path"
55216  if test "x$has_colon" = x; then
55217    # Not in mixed or Windows style, start by that.
55218    new_path=`cmd //c echo $path`
55219  fi
55220
55221
55222  input_path="$new_path"
55223  # Check if we need to convert this using DOS-style short mode. If the path
55224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55225  # take no chances and rewrite it.
55226  # Note: m4 eats our [], so we need to use [ and ] instead.
55227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55228  if test "x$has_forbidden_chars" != x; then
55229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55231  fi
55232
55233
55234  windows_path="$new_path"
55235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55236    unix_path=`$CYGPATH -u "$windows_path"`
55237    new_path="$unix_path"
55238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55240    new_path="$unix_path"
55241  fi
55242
55243  if test "x$path" != "x$new_path"; then
55244    MSVC_DLL="$new_path"
55245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55247  fi
55248
55249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55251
55252    else
55253      # We're on a unix platform. Hooray! :)
55254      path="$MSVC_DLL"
55255      has_space=`$ECHO "$path" | $GREP " "`
55256      if test "x$has_space" != x; then
55257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55258$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55260      fi
55261
55262      # Use eval to expand a potential ~
55263      eval path="$path"
55264      if test ! -f "$path" && test ! -d "$path"; then
55265        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55266      fi
55267
55268      if test -d "$path"; then
55269        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55270      else
55271        dir="`$DIRNAME "$path"`"
55272        base="`$BASENAME "$path"`"
55273        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55274      fi
55275    fi
55276  fi
55277
55278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55279$as_echo_n "checking for $DLL_NAME... " >&6; }
55280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55281$as_echo "$MSVC_DLL" >&6; }
55282    else
55283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55284$as_echo "incorrect, ignoring" >&6; }
55285      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55286$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55287    fi
55288  fi
55289
55290  fi
55291
55292  if test "x$MSVC_DLL" = x; then
55293    # Probe: Look in the Windows system32 directory
55294    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55295
55296  windows_path="$CYGWIN_SYSTEMROOT"
55297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55298    unix_path=`$CYGPATH -u "$windows_path"`
55299    CYGWIN_SYSTEMROOT="$unix_path"
55300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55302    CYGWIN_SYSTEMROOT="$unix_path"
55303  fi
55304
55305    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55306
55307  DLL_NAME="$DLL_NAME"
55308  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55309  METHOD="well-known location in SYSTEMROOT"
55310  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55311    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55312$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55313
55314    # Need to check if the found msvcr is correct architecture
55315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55316$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55317    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55319      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55320      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55321      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55322        CORRECT_MSVCR_ARCH="PE32 executable"
55323      else
55324        CORRECT_MSVCR_ARCH="PE32+ executable"
55325      fi
55326    else
55327      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55328        CORRECT_MSVCR_ARCH=386
55329      else
55330        CORRECT_MSVCR_ARCH=x86-64
55331      fi
55332    fi
55333    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55335$as_echo "ok" >&6; }
55336      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55337
55338  # Only process if variable expands to non-empty
55339
55340  if test "x$MSVC_DLL" != x; then
55341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55342
55343  # Input might be given as Windows format, start by converting to
55344  # unix format.
55345  path="$MSVC_DLL"
55346  new_path=`$CYGPATH -u "$path"`
55347
55348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55351  # "foo.exe" is OK but "foo" is an error.
55352  #
55353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55354  # It is also a way to make sure we got the proper file name for the real test later on.
55355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55356  if test "x$test_shortpath" = x; then
55357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55358$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55359    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55360  fi
55361
55362  # Call helper function which possibly converts this using DOS-style short mode.
55363  # If so, the updated path is stored in $new_path.
55364
55365  input_path="$new_path"
55366  # Check if we need to convert this using DOS-style short mode. If the path
55367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55368  # take no chances and rewrite it.
55369  # Note: m4 eats our [], so we need to use [ and ] instead.
55370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55371  if test "x$has_forbidden_chars" != x; then
55372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55376      # Going to short mode and back again did indeed matter. Since short mode is
55377      # case insensitive, let's make it lowercase to improve readability.
55378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55379      # Now convert it back to Unix-style (cygpath)
55380      input_path=`$CYGPATH -u "$shortmode_path"`
55381      new_path="$input_path"
55382    fi
55383  fi
55384
55385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55386  if test "x$test_cygdrive_prefix" = x; then
55387    # As a simple fix, exclude /usr/bin since it's not a real path.
55388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55390      # a path prefixed by /cygdrive for fixpath to work.
55391      new_path="$CYGWIN_ROOT_PATH$input_path"
55392    fi
55393  fi
55394
55395
55396  if test "x$path" != "x$new_path"; then
55397    MSVC_DLL="$new_path"
55398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55399$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55400  fi
55401
55402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55403
55404  path="$MSVC_DLL"
55405  has_colon=`$ECHO $path | $GREP ^.:`
55406  new_path="$path"
55407  if test "x$has_colon" = x; then
55408    # Not in mixed or Windows style, start by that.
55409    new_path=`cmd //c echo $path`
55410  fi
55411
55412
55413  input_path="$new_path"
55414  # Check if we need to convert this using DOS-style short mode. If the path
55415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55416  # take no chances and rewrite it.
55417  # Note: m4 eats our [], so we need to use [ and ] instead.
55418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55419  if test "x$has_forbidden_chars" != x; then
55420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55422  fi
55423
55424
55425  windows_path="$new_path"
55426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55427    unix_path=`$CYGPATH -u "$windows_path"`
55428    new_path="$unix_path"
55429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55431    new_path="$unix_path"
55432  fi
55433
55434  if test "x$path" != "x$new_path"; then
55435    MSVC_DLL="$new_path"
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55437$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55438  fi
55439
55440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55442
55443    else
55444      # We're on a unix platform. Hooray! :)
55445      path="$MSVC_DLL"
55446      has_space=`$ECHO "$path" | $GREP " "`
55447      if test "x$has_space" != x; then
55448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55449$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55451      fi
55452
55453      # Use eval to expand a potential ~
55454      eval path="$path"
55455      if test ! -f "$path" && test ! -d "$path"; then
55456        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55457      fi
55458
55459      if test -d "$path"; then
55460        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55461      else
55462        dir="`$DIRNAME "$path"`"
55463        base="`$BASENAME "$path"`"
55464        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55465      fi
55466    fi
55467  fi
55468
55469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55470$as_echo_n "checking for $DLL_NAME... " >&6; }
55471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55472$as_echo "$MSVC_DLL" >&6; }
55473    else
55474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55475$as_echo "incorrect, ignoring" >&6; }
55476      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55477$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55478    fi
55479  fi
55480
55481  fi
55482
55483  if test "x$MSVC_DLL" = x; then
55484    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55485    if test "x$VS100COMNTOOLS" != x; then
55486      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55487
55488  windows_path="$CYGWIN_VS_TOOLS_DIR"
55489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55490    unix_path=`$CYGPATH -u "$windows_path"`
55491    CYGWIN_VS_TOOLS_DIR="$unix_path"
55492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55494    CYGWIN_VS_TOOLS_DIR="$unix_path"
55495  fi
55496
55497      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55498        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55499	    | $GREP -i /x64/ | $HEAD --lines 1`
55500      else
55501        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55502	    | $GREP -i /x86/ | $HEAD --lines 1`
55503      fi
55504
55505  DLL_NAME="$DLL_NAME"
55506  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55507  METHOD="search of VS100COMNTOOLS"
55508  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55510$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55511
55512    # Need to check if the found msvcr is correct architecture
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55514$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55515    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55517      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55518      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55520        CORRECT_MSVCR_ARCH="PE32 executable"
55521      else
55522        CORRECT_MSVCR_ARCH="PE32+ executable"
55523      fi
55524    else
55525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55526        CORRECT_MSVCR_ARCH=386
55527      else
55528        CORRECT_MSVCR_ARCH=x86-64
55529      fi
55530    fi
55531    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55533$as_echo "ok" >&6; }
55534      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55535
55536  # Only process if variable expands to non-empty
55537
55538  if test "x$MSVC_DLL" != x; then
55539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55540
55541  # Input might be given as Windows format, start by converting to
55542  # unix format.
55543  path="$MSVC_DLL"
55544  new_path=`$CYGPATH -u "$path"`
55545
55546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55549  # "foo.exe" is OK but "foo" is an error.
55550  #
55551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55552  # It is also a way to make sure we got the proper file name for the real test later on.
55553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55554  if test "x$test_shortpath" = x; then
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55556$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55557    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55558  fi
55559
55560  # Call helper function which possibly converts this using DOS-style short mode.
55561  # If so, the updated path is stored in $new_path.
55562
55563  input_path="$new_path"
55564  # Check if we need to convert this using DOS-style short mode. If the path
55565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55566  # take no chances and rewrite it.
55567  # Note: m4 eats our [], so we need to use [ and ] instead.
55568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55569  if test "x$has_forbidden_chars" != x; then
55570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55574      # Going to short mode and back again did indeed matter. Since short mode is
55575      # case insensitive, let's make it lowercase to improve readability.
55576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55577      # Now convert it back to Unix-style (cygpath)
55578      input_path=`$CYGPATH -u "$shortmode_path"`
55579      new_path="$input_path"
55580    fi
55581  fi
55582
55583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55584  if test "x$test_cygdrive_prefix" = x; then
55585    # As a simple fix, exclude /usr/bin since it's not a real path.
55586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55588      # a path prefixed by /cygdrive for fixpath to work.
55589      new_path="$CYGWIN_ROOT_PATH$input_path"
55590    fi
55591  fi
55592
55593
55594  if test "x$path" != "x$new_path"; then
55595    MSVC_DLL="$new_path"
55596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55598  fi
55599
55600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55601
55602  path="$MSVC_DLL"
55603  has_colon=`$ECHO $path | $GREP ^.:`
55604  new_path="$path"
55605  if test "x$has_colon" = x; then
55606    # Not in mixed or Windows style, start by that.
55607    new_path=`cmd //c echo $path`
55608  fi
55609
55610
55611  input_path="$new_path"
55612  # Check if we need to convert this using DOS-style short mode. If the path
55613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55614  # take no chances and rewrite it.
55615  # Note: m4 eats our [], so we need to use [ and ] instead.
55616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55617  if test "x$has_forbidden_chars" != x; then
55618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55620  fi
55621
55622
55623  windows_path="$new_path"
55624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55625    unix_path=`$CYGPATH -u "$windows_path"`
55626    new_path="$unix_path"
55627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55629    new_path="$unix_path"
55630  fi
55631
55632  if test "x$path" != "x$new_path"; then
55633    MSVC_DLL="$new_path"
55634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55635$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55636  fi
55637
55638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55640
55641    else
55642      # We're on a unix platform. Hooray! :)
55643      path="$MSVC_DLL"
55644      has_space=`$ECHO "$path" | $GREP " "`
55645      if test "x$has_space" != x; then
55646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55647$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55649      fi
55650
55651      # Use eval to expand a potential ~
55652      eval path="$path"
55653      if test ! -f "$path" && test ! -d "$path"; then
55654        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55655      fi
55656
55657      if test -d "$path"; then
55658        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55659      else
55660        dir="`$DIRNAME "$path"`"
55661        base="`$BASENAME "$path"`"
55662        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55663      fi
55664    fi
55665  fi
55666
55667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55668$as_echo_n "checking for $DLL_NAME... " >&6; }
55669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55670$as_echo "$MSVC_DLL" >&6; }
55671    else
55672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55673$as_echo "incorrect, ignoring" >&6; }
55674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55676    fi
55677  fi
55678
55679    fi
55680  fi
55681
55682  if test "x$MSVC_DLL" = x; then
55683    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55684    # (This was the original behaviour; kept since it might turn something up)
55685    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55686      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55687        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55688	    | $GREP x64 | $HEAD --lines 1`
55689      else
55690        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55691	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55692        if test "x$POSSIBLE_MSVC_DLL" = x; then
55693          # We're grasping at straws now...
55694          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55695	      | $HEAD --lines 1`
55696        fi
55697      fi
55698
55699
55700  DLL_NAME="$DLL_NAME"
55701  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55702  METHOD="search of VCINSTALLDIR"
55703  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55705$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55706
55707    # Need to check if the found msvcr is correct architecture
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55709$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55710    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55712      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55713      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55715        CORRECT_MSVCR_ARCH="PE32 executable"
55716      else
55717        CORRECT_MSVCR_ARCH="PE32+ executable"
55718      fi
55719    else
55720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55721        CORRECT_MSVCR_ARCH=386
55722      else
55723        CORRECT_MSVCR_ARCH=x86-64
55724      fi
55725    fi
55726    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55728$as_echo "ok" >&6; }
55729      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55730
55731  # Only process if variable expands to non-empty
55732
55733  if test "x$MSVC_DLL" != x; then
55734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55735
55736  # Input might be given as Windows format, start by converting to
55737  # unix format.
55738  path="$MSVC_DLL"
55739  new_path=`$CYGPATH -u "$path"`
55740
55741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55744  # "foo.exe" is OK but "foo" is an error.
55745  #
55746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55747  # It is also a way to make sure we got the proper file name for the real test later on.
55748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55749  if test "x$test_shortpath" = x; then
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55751$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55752    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55753  fi
55754
55755  # Call helper function which possibly converts this using DOS-style short mode.
55756  # If so, the updated path is stored in $new_path.
55757
55758  input_path="$new_path"
55759  # Check if we need to convert this using DOS-style short mode. If the path
55760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55761  # take no chances and rewrite it.
55762  # Note: m4 eats our [], so we need to use [ and ] instead.
55763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55764  if test "x$has_forbidden_chars" != x; then
55765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55769      # Going to short mode and back again did indeed matter. Since short mode is
55770      # case insensitive, let's make it lowercase to improve readability.
55771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55772      # Now convert it back to Unix-style (cygpath)
55773      input_path=`$CYGPATH -u "$shortmode_path"`
55774      new_path="$input_path"
55775    fi
55776  fi
55777
55778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55779  if test "x$test_cygdrive_prefix" = x; then
55780    # As a simple fix, exclude /usr/bin since it's not a real path.
55781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55783      # a path prefixed by /cygdrive for fixpath to work.
55784      new_path="$CYGWIN_ROOT_PATH$input_path"
55785    fi
55786  fi
55787
55788
55789  if test "x$path" != "x$new_path"; then
55790    MSVC_DLL="$new_path"
55791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55792$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55793  fi
55794
55795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55796
55797  path="$MSVC_DLL"
55798  has_colon=`$ECHO $path | $GREP ^.:`
55799  new_path="$path"
55800  if test "x$has_colon" = x; then
55801    # Not in mixed or Windows style, start by that.
55802    new_path=`cmd //c echo $path`
55803  fi
55804
55805
55806  input_path="$new_path"
55807  # Check if we need to convert this using DOS-style short mode. If the path
55808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55809  # take no chances and rewrite it.
55810  # Note: m4 eats our [], so we need to use [ and ] instead.
55811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55812  if test "x$has_forbidden_chars" != x; then
55813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55815  fi
55816
55817
55818  windows_path="$new_path"
55819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55820    unix_path=`$CYGPATH -u "$windows_path"`
55821    new_path="$unix_path"
55822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55824    new_path="$unix_path"
55825  fi
55826
55827  if test "x$path" != "x$new_path"; then
55828    MSVC_DLL="$new_path"
55829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55830$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55831  fi
55832
55833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55835
55836    else
55837      # We're on a unix platform. Hooray! :)
55838      path="$MSVC_DLL"
55839      has_space=`$ECHO "$path" | $GREP " "`
55840      if test "x$has_space" != x; then
55841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55842$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55844      fi
55845
55846      # Use eval to expand a potential ~
55847      eval path="$path"
55848      if test ! -f "$path" && test ! -d "$path"; then
55849        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55850      fi
55851
55852      if test -d "$path"; then
55853        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55854      else
55855        dir="`$DIRNAME "$path"`"
55856        base="`$BASENAME "$path"`"
55857        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55858      fi
55859    fi
55860  fi
55861
55862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55863$as_echo_n "checking for $DLL_NAME... " >&6; }
55864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55865$as_echo "$MSVC_DLL" >&6; }
55866    else
55867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55868$as_echo "incorrect, ignoring" >&6; }
55869      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55870$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55871    fi
55872  fi
55873
55874    fi
55875  fi
55876
55877  if test "x$MSVC_DLL" = x; then
55878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55879$as_echo_n "checking for $DLL_NAME... " >&6; }
55880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55881$as_echo "no" >&6; }
55882    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55883  fi
55884
55885      MSVCP_DLL="$MSVC_DLL"
55886    fi
55887
55888  fi
55889
55890  fi
55891
55892
55893  if test "x$NEEDS_LIB_X11" = xfalse; then
55894    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55896$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55897    fi
55898    X_CFLAGS=
55899    X_LIBS=
55900  else
55901
55902    if test "x${with_x}" = xno; then
55903      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55904    fi
55905
55906    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55907      # The user has specified a X11 base directory. Use it for includes and
55908      # libraries, unless explicitely overridden.
55909      if test "x$x_includes" = xNONE; then
55910        x_includes="${with_x}/include"
55911      fi
55912      if test "x$x_libraries" = xNONE; then
55913        x_libraries="${with_x}/lib"
55914      fi
55915    else
55916      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55917      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55918      # --x-libraries for the sysroot, if that seems to be correct.
55919      if test "x$SYSROOT" != "x"; then
55920        if test "x$x_includes" = xNONE; then
55921          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55922            x_includes="$SYSROOT/usr/X11R6/include"
55923          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55924            x_includes="$SYSROOT/usr/include"
55925          fi
55926        fi
55927        if test "x$x_libraries" = xNONE; then
55928          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55929            x_libraries="$SYSROOT/usr/X11R6/lib"
55930          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55931            x_libraries="$SYSROOT/usr/lib64"
55932          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55933            x_libraries="$SYSROOT/usr/lib"
55934          fi
55935        fi
55936      fi
55937    fi
55938
55939    # Now let autoconf do it's magic
55940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55941$as_echo_n "checking for X... " >&6; }
55942
55943
55944# Check whether --with-x was given.
55945if test "${with_x+set}" = set; then :
55946  withval=$with_x;
55947fi
55948
55949# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55950if test "x$with_x" = xno; then
55951  # The user explicitly disabled X.
55952  have_x=disabled
55953else
55954  case $x_includes,$x_libraries in #(
55955    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55956    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55957  $as_echo_n "(cached) " >&6
55958else
55959  # One or both of the vars are not set, and there is no cached value.
55960ac_x_includes=no ac_x_libraries=no
55961rm -f -r conftest.dir
55962if mkdir conftest.dir; then
55963  cd conftest.dir
55964  cat >Imakefile <<'_ACEOF'
55965incroot:
55966	@echo incroot='${INCROOT}'
55967usrlibdir:
55968	@echo usrlibdir='${USRLIBDIR}'
55969libdir:
55970	@echo libdir='${LIBDIR}'
55971_ACEOF
55972  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55973    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55974    for ac_var in incroot usrlibdir libdir; do
55975      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55976    done
55977    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55978    for ac_extension in a so sl dylib la dll; do
55979      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55980	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55981	ac_im_usrlibdir=$ac_im_libdir; break
55982      fi
55983    done
55984    # Screen out bogus values from the imake configuration.  They are
55985    # bogus both because they are the default anyway, and because
55986    # using them would break gcc on systems where it needs fixed includes.
55987    case $ac_im_incroot in
55988	/usr/include) ac_x_includes= ;;
55989	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55990    esac
55991    case $ac_im_usrlibdir in
55992	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55993	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55994    esac
55995  fi
55996  cd ..
55997  rm -f -r conftest.dir
55998fi
55999
56000# Standard set of common directories for X headers.
56001# Check X11 before X11Rn because it is often a symlink to the current release.
56002ac_x_header_dirs='
56003/usr/X11/include
56004/usr/X11R7/include
56005/usr/X11R6/include
56006/usr/X11R5/include
56007/usr/X11R4/include
56008
56009/usr/include/X11
56010/usr/include/X11R7
56011/usr/include/X11R6
56012/usr/include/X11R5
56013/usr/include/X11R4
56014
56015/usr/local/X11/include
56016/usr/local/X11R7/include
56017/usr/local/X11R6/include
56018/usr/local/X11R5/include
56019/usr/local/X11R4/include
56020
56021/usr/local/include/X11
56022/usr/local/include/X11R7
56023/usr/local/include/X11R6
56024/usr/local/include/X11R5
56025/usr/local/include/X11R4
56026
56027/usr/X386/include
56028/usr/x386/include
56029/usr/XFree86/include/X11
56030
56031/usr/include
56032/usr/local/include
56033/usr/unsupported/include
56034/usr/athena/include
56035/usr/local/x11r5/include
56036/usr/lpp/Xamples/include
56037
56038/usr/openwin/include
56039/usr/openwin/share/include'
56040
56041if test "$ac_x_includes" = no; then
56042  # Guess where to find include files, by looking for Xlib.h.
56043  # First, try using that file with no special directory specified.
56044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56045/* end confdefs.h.  */
56046#include <X11/Xlib.h>
56047_ACEOF
56048if ac_fn_cxx_try_cpp "$LINENO"; then :
56049  # We can compile using X headers with no special include directory.
56050ac_x_includes=
56051else
56052  for ac_dir in $ac_x_header_dirs; do
56053  if test -r "$ac_dir/X11/Xlib.h"; then
56054    ac_x_includes=$ac_dir
56055    break
56056  fi
56057done
56058fi
56059rm -f conftest.err conftest.i conftest.$ac_ext
56060fi # $ac_x_includes = no
56061
56062if test "$ac_x_libraries" = no; then
56063  # Check for the libraries.
56064  # See if we find them without any special options.
56065  # Don't add to $LIBS permanently.
56066  ac_save_LIBS=$LIBS
56067  LIBS="-lX11 $LIBS"
56068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56069/* end confdefs.h.  */
56070#include <X11/Xlib.h>
56071int
56072main ()
56073{
56074XrmInitialize ()
56075  ;
56076  return 0;
56077}
56078_ACEOF
56079if ac_fn_cxx_try_link "$LINENO"; then :
56080  LIBS=$ac_save_LIBS
56081# We can link X programs with no special library path.
56082ac_x_libraries=
56083else
56084  LIBS=$ac_save_LIBS
56085for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56086do
56087  # Don't even attempt the hair of trying to link an X program!
56088  for ac_extension in a so sl dylib la dll; do
56089    if test -r "$ac_dir/libX11.$ac_extension"; then
56090      ac_x_libraries=$ac_dir
56091      break 2
56092    fi
56093  done
56094done
56095fi
56096rm -f core conftest.err conftest.$ac_objext \
56097    conftest$ac_exeext conftest.$ac_ext
56098fi # $ac_x_libraries = no
56099
56100case $ac_x_includes,$ac_x_libraries in #(
56101  no,* | *,no | *\'*)
56102    # Didn't find X, or a directory has "'" in its name.
56103    ac_cv_have_x="have_x=no";; #(
56104  *)
56105    # Record where we found X for the cache.
56106    ac_cv_have_x="have_x=yes\
56107	ac_x_includes='$ac_x_includes'\
56108	ac_x_libraries='$ac_x_libraries'"
56109esac
56110fi
56111;; #(
56112    *) have_x=yes;;
56113  esac
56114  eval "$ac_cv_have_x"
56115fi # $with_x != no
56116
56117if test "$have_x" != yes; then
56118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56119$as_echo "$have_x" >&6; }
56120  no_x=yes
56121else
56122  # If each of the values was on the command line, it overrides each guess.
56123  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56124  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56125  # Update the cache value to reflect the command line values.
56126  ac_cv_have_x="have_x=yes\
56127	ac_x_includes='$x_includes'\
56128	ac_x_libraries='$x_libraries'"
56129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56130$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56131fi
56132
56133    if test "$no_x" = yes; then
56134  # Not all programs may use this symbol, but it does not hurt to define it.
56135
56136$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56137
56138  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56139else
56140  if test -n "$x_includes"; then
56141    X_CFLAGS="$X_CFLAGS -I$x_includes"
56142  fi
56143
56144  # It would also be nice to do this for all -L options, not just this one.
56145  if test -n "$x_libraries"; then
56146    X_LIBS="$X_LIBS -L$x_libraries"
56147    # For Solaris; some versions of Sun CC require a space after -R and
56148    # others require no space.  Words are not sufficient . . . .
56149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56150$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56151    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56152    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56153    ac_cxx_werror_flag=yes
56154    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56155/* end confdefs.h.  */
56156
56157int
56158main ()
56159{
56160
56161  ;
56162  return 0;
56163}
56164_ACEOF
56165if ac_fn_cxx_try_link "$LINENO"; then :
56166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56167$as_echo "no" >&6; }
56168       X_LIBS="$X_LIBS -R$x_libraries"
56169else
56170  LIBS="$ac_xsave_LIBS -R $x_libraries"
56171       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56172/* end confdefs.h.  */
56173
56174int
56175main ()
56176{
56177
56178  ;
56179  return 0;
56180}
56181_ACEOF
56182if ac_fn_cxx_try_link "$LINENO"; then :
56183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56184$as_echo "yes" >&6; }
56185	  X_LIBS="$X_LIBS -R $x_libraries"
56186else
56187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56188$as_echo "neither works" >&6; }
56189fi
56190rm -f core conftest.err conftest.$ac_objext \
56191    conftest$ac_exeext conftest.$ac_ext
56192fi
56193rm -f core conftest.err conftest.$ac_objext \
56194    conftest$ac_exeext conftest.$ac_ext
56195    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56196    LIBS=$ac_xsave_LIBS
56197  fi
56198
56199  # Check for system-dependent libraries X programs must link with.
56200  # Do this before checking for the system-independent R6 libraries
56201  # (-lICE), since we may need -lsocket or whatever for X linking.
56202
56203  if test "$ISC" = yes; then
56204    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56205  else
56206    # Martyn Johnson says this is needed for Ultrix, if the X
56207    # libraries were built with DECnet support.  And Karl Berry says
56208    # the Alpha needs dnet_stub (dnet does not exist).
56209    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56210    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56211/* end confdefs.h.  */
56212
56213/* Override any GCC internal prototype to avoid an error.
56214   Use char because int might match the return type of a GCC
56215   builtin and then its argument prototype would still apply.  */
56216#ifdef __cplusplus
56217extern "C"
56218#endif
56219char XOpenDisplay ();
56220int
56221main ()
56222{
56223return XOpenDisplay ();
56224  ;
56225  return 0;
56226}
56227_ACEOF
56228if ac_fn_cxx_try_link "$LINENO"; then :
56229
56230else
56231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56232$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56233if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56234  $as_echo_n "(cached) " >&6
56235else
56236  ac_check_lib_save_LIBS=$LIBS
56237LIBS="-ldnet  $LIBS"
56238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56239/* end confdefs.h.  */
56240
56241/* Override any GCC internal prototype to avoid an error.
56242   Use char because int might match the return type of a GCC
56243   builtin and then its argument prototype would still apply.  */
56244#ifdef __cplusplus
56245extern "C"
56246#endif
56247char dnet_ntoa ();
56248int
56249main ()
56250{
56251return dnet_ntoa ();
56252  ;
56253  return 0;
56254}
56255_ACEOF
56256if ac_fn_cxx_try_link "$LINENO"; then :
56257  ac_cv_lib_dnet_dnet_ntoa=yes
56258else
56259  ac_cv_lib_dnet_dnet_ntoa=no
56260fi
56261rm -f core conftest.err conftest.$ac_objext \
56262    conftest$ac_exeext conftest.$ac_ext
56263LIBS=$ac_check_lib_save_LIBS
56264fi
56265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56266$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56267if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56268  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56269fi
56270
56271    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56273$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56274if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56275  $as_echo_n "(cached) " >&6
56276else
56277  ac_check_lib_save_LIBS=$LIBS
56278LIBS="-ldnet_stub  $LIBS"
56279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56280/* end confdefs.h.  */
56281
56282/* Override any GCC internal prototype to avoid an error.
56283   Use char because int might match the return type of a GCC
56284   builtin and then its argument prototype would still apply.  */
56285#ifdef __cplusplus
56286extern "C"
56287#endif
56288char dnet_ntoa ();
56289int
56290main ()
56291{
56292return dnet_ntoa ();
56293  ;
56294  return 0;
56295}
56296_ACEOF
56297if ac_fn_cxx_try_link "$LINENO"; then :
56298  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56299else
56300  ac_cv_lib_dnet_stub_dnet_ntoa=no
56301fi
56302rm -f core conftest.err conftest.$ac_objext \
56303    conftest$ac_exeext conftest.$ac_ext
56304LIBS=$ac_check_lib_save_LIBS
56305fi
56306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56307$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56308if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56309  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56310fi
56311
56312    fi
56313fi
56314rm -f core conftest.err conftest.$ac_objext \
56315    conftest$ac_exeext conftest.$ac_ext
56316    LIBS="$ac_xsave_LIBS"
56317
56318    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56319    # to get the SysV transport functions.
56320    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56321    # needs -lnsl.
56322    # The nsl library prevents programs from opening the X display
56323    # on Irix 5.2, according to T.E. Dickey.
56324    # The functions gethostbyname, getservbyname, and inet_addr are
56325    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56326    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56327if test "x$ac_cv_func_gethostbyname" = xyes; then :
56328
56329fi
56330
56331    if test $ac_cv_func_gethostbyname = no; then
56332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56333$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56334if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56335  $as_echo_n "(cached) " >&6
56336else
56337  ac_check_lib_save_LIBS=$LIBS
56338LIBS="-lnsl  $LIBS"
56339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56340/* end confdefs.h.  */
56341
56342/* Override any GCC internal prototype to avoid an error.
56343   Use char because int might match the return type of a GCC
56344   builtin and then its argument prototype would still apply.  */
56345#ifdef __cplusplus
56346extern "C"
56347#endif
56348char gethostbyname ();
56349int
56350main ()
56351{
56352return gethostbyname ();
56353  ;
56354  return 0;
56355}
56356_ACEOF
56357if ac_fn_cxx_try_link "$LINENO"; then :
56358  ac_cv_lib_nsl_gethostbyname=yes
56359else
56360  ac_cv_lib_nsl_gethostbyname=no
56361fi
56362rm -f core conftest.err conftest.$ac_objext \
56363    conftest$ac_exeext conftest.$ac_ext
56364LIBS=$ac_check_lib_save_LIBS
56365fi
56366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56367$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56368if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56369  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56370fi
56371
56372      if test $ac_cv_lib_nsl_gethostbyname = no; then
56373	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56374$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56375if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56376  $as_echo_n "(cached) " >&6
56377else
56378  ac_check_lib_save_LIBS=$LIBS
56379LIBS="-lbsd  $LIBS"
56380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56381/* end confdefs.h.  */
56382
56383/* Override any GCC internal prototype to avoid an error.
56384   Use char because int might match the return type of a GCC
56385   builtin and then its argument prototype would still apply.  */
56386#ifdef __cplusplus
56387extern "C"
56388#endif
56389char gethostbyname ();
56390int
56391main ()
56392{
56393return gethostbyname ();
56394  ;
56395  return 0;
56396}
56397_ACEOF
56398if ac_fn_cxx_try_link "$LINENO"; then :
56399  ac_cv_lib_bsd_gethostbyname=yes
56400else
56401  ac_cv_lib_bsd_gethostbyname=no
56402fi
56403rm -f core conftest.err conftest.$ac_objext \
56404    conftest$ac_exeext conftest.$ac_ext
56405LIBS=$ac_check_lib_save_LIBS
56406fi
56407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56408$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56409if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56410  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56411fi
56412
56413      fi
56414    fi
56415
56416    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56417    # socket/setsockopt and other routines are undefined under SCO ODT
56418    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56419    # on later versions), says Simon Leinen: it contains gethostby*
56420    # variants that don't use the name server (or something).  -lsocket
56421    # must be given before -lnsl if both are needed.  We assume that
56422    # if connect needs -lnsl, so does gethostbyname.
56423    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56424if test "x$ac_cv_func_connect" = xyes; then :
56425
56426fi
56427
56428    if test $ac_cv_func_connect = no; then
56429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56430$as_echo_n "checking for connect in -lsocket... " >&6; }
56431if ${ac_cv_lib_socket_connect+:} false; then :
56432  $as_echo_n "(cached) " >&6
56433else
56434  ac_check_lib_save_LIBS=$LIBS
56435LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56437/* end confdefs.h.  */
56438
56439/* Override any GCC internal prototype to avoid an error.
56440   Use char because int might match the return type of a GCC
56441   builtin and then its argument prototype would still apply.  */
56442#ifdef __cplusplus
56443extern "C"
56444#endif
56445char connect ();
56446int
56447main ()
56448{
56449return connect ();
56450  ;
56451  return 0;
56452}
56453_ACEOF
56454if ac_fn_cxx_try_link "$LINENO"; then :
56455  ac_cv_lib_socket_connect=yes
56456else
56457  ac_cv_lib_socket_connect=no
56458fi
56459rm -f core conftest.err conftest.$ac_objext \
56460    conftest$ac_exeext conftest.$ac_ext
56461LIBS=$ac_check_lib_save_LIBS
56462fi
56463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56464$as_echo "$ac_cv_lib_socket_connect" >&6; }
56465if test "x$ac_cv_lib_socket_connect" = xyes; then :
56466  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56467fi
56468
56469    fi
56470
56471    # Guillermo Gomez says -lposix is necessary on A/UX.
56472    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56473if test "x$ac_cv_func_remove" = xyes; then :
56474
56475fi
56476
56477    if test $ac_cv_func_remove = no; then
56478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56479$as_echo_n "checking for remove in -lposix... " >&6; }
56480if ${ac_cv_lib_posix_remove+:} false; then :
56481  $as_echo_n "(cached) " >&6
56482else
56483  ac_check_lib_save_LIBS=$LIBS
56484LIBS="-lposix  $LIBS"
56485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56486/* end confdefs.h.  */
56487
56488/* Override any GCC internal prototype to avoid an error.
56489   Use char because int might match the return type of a GCC
56490   builtin and then its argument prototype would still apply.  */
56491#ifdef __cplusplus
56492extern "C"
56493#endif
56494char remove ();
56495int
56496main ()
56497{
56498return remove ();
56499  ;
56500  return 0;
56501}
56502_ACEOF
56503if ac_fn_cxx_try_link "$LINENO"; then :
56504  ac_cv_lib_posix_remove=yes
56505else
56506  ac_cv_lib_posix_remove=no
56507fi
56508rm -f core conftest.err conftest.$ac_objext \
56509    conftest$ac_exeext conftest.$ac_ext
56510LIBS=$ac_check_lib_save_LIBS
56511fi
56512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56513$as_echo "$ac_cv_lib_posix_remove" >&6; }
56514if test "x$ac_cv_lib_posix_remove" = xyes; then :
56515  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56516fi
56517
56518    fi
56519
56520    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56521    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56522if test "x$ac_cv_func_shmat" = xyes; then :
56523
56524fi
56525
56526    if test $ac_cv_func_shmat = no; then
56527      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56528$as_echo_n "checking for shmat in -lipc... " >&6; }
56529if ${ac_cv_lib_ipc_shmat+:} false; then :
56530  $as_echo_n "(cached) " >&6
56531else
56532  ac_check_lib_save_LIBS=$LIBS
56533LIBS="-lipc  $LIBS"
56534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56535/* end confdefs.h.  */
56536
56537/* Override any GCC internal prototype to avoid an error.
56538   Use char because int might match the return type of a GCC
56539   builtin and then its argument prototype would still apply.  */
56540#ifdef __cplusplus
56541extern "C"
56542#endif
56543char shmat ();
56544int
56545main ()
56546{
56547return shmat ();
56548  ;
56549  return 0;
56550}
56551_ACEOF
56552if ac_fn_cxx_try_link "$LINENO"; then :
56553  ac_cv_lib_ipc_shmat=yes
56554else
56555  ac_cv_lib_ipc_shmat=no
56556fi
56557rm -f core conftest.err conftest.$ac_objext \
56558    conftest$ac_exeext conftest.$ac_ext
56559LIBS=$ac_check_lib_save_LIBS
56560fi
56561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56562$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56563if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56564  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56565fi
56566
56567    fi
56568  fi
56569
56570  # Check for libraries that X11R6 Xt/Xaw programs need.
56571  ac_save_LDFLAGS=$LDFLAGS
56572  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56573  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56574  # check for ICE first), but we must link in the order -lSM -lICE or
56575  # we get undefined symbols.  So assume we have SM if we have ICE.
56576  # These have to be linked with before -lX11, unlike the other
56577  # libraries we check for below, so use a different variable.
56578  # John Interrante, Karl Berry
56579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56580$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56581if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56582  $as_echo_n "(cached) " >&6
56583else
56584  ac_check_lib_save_LIBS=$LIBS
56585LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56587/* end confdefs.h.  */
56588
56589/* Override any GCC internal prototype to avoid an error.
56590   Use char because int might match the return type of a GCC
56591   builtin and then its argument prototype would still apply.  */
56592#ifdef __cplusplus
56593extern "C"
56594#endif
56595char IceConnectionNumber ();
56596int
56597main ()
56598{
56599return IceConnectionNumber ();
56600  ;
56601  return 0;
56602}
56603_ACEOF
56604if ac_fn_cxx_try_link "$LINENO"; then :
56605  ac_cv_lib_ICE_IceConnectionNumber=yes
56606else
56607  ac_cv_lib_ICE_IceConnectionNumber=no
56608fi
56609rm -f core conftest.err conftest.$ac_objext \
56610    conftest$ac_exeext conftest.$ac_ext
56611LIBS=$ac_check_lib_save_LIBS
56612fi
56613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56614$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56615if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56616  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56617fi
56618
56619  LDFLAGS=$ac_save_LDFLAGS
56620
56621fi
56622
56623
56624    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56625    # this doesn't make sense so we remove it.
56626    if test "x$COMPILE_TYPE" = xcross; then
56627      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56628    fi
56629
56630    if test "x$no_x" = xyes; then
56631
56632  # Print a helpful message on how to acquire the necessary build dependency.
56633  # x11 is the help tag: freetype, cups, alsa etc
56634  MISSING_DEPENDENCY=x11
56635
56636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56637    cygwin_help $MISSING_DEPENDENCY
56638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56639    msys_help $MISSING_DEPENDENCY
56640  else
56641    PKGHANDLER_COMMAND=
56642
56643    case $PKGHANDLER in
56644      apt-get)
56645        apt_help     $MISSING_DEPENDENCY ;;
56646      yum)
56647        yum_help     $MISSING_DEPENDENCY ;;
56648      port)
56649        port_help    $MISSING_DEPENDENCY ;;
56650      pkgutil)
56651        pkgutil_help $MISSING_DEPENDENCY ;;
56652      pkgadd)
56653        pkgadd_help  $MISSING_DEPENDENCY ;;
56654    esac
56655
56656    if test "x$PKGHANDLER_COMMAND" != x; then
56657      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56658    fi
56659  fi
56660
56661      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56662    fi
56663
56664    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56665      OPENWIN_HOME="/usr/openwin"
56666      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56667      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56668          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56669    fi
56670
56671    ac_ext=c
56672ac_cpp='$CPP $CPPFLAGS'
56673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56675ac_compiler_gnu=$ac_cv_c_compiler_gnu
56676
56677    OLD_CFLAGS="$CFLAGS"
56678    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56679
56680    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56681    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56682do :
56683  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56684ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56685          # include <X11/Xlib.h>
56686          # include <X11/Xutil.h>
56687
56688
56689"
56690if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56691  cat >>confdefs.h <<_ACEOF
56692#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56693_ACEOF
56694 X11_HEADERS_OK=yes
56695else
56696  X11_HEADERS_OK=no; break
56697fi
56698
56699done
56700
56701
56702    if test "x$X11_HEADERS_OK" = xno; then
56703
56704  # Print a helpful message on how to acquire the necessary build dependency.
56705  # x11 is the help tag: freetype, cups, alsa etc
56706  MISSING_DEPENDENCY=x11
56707
56708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56709    cygwin_help $MISSING_DEPENDENCY
56710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56711    msys_help $MISSING_DEPENDENCY
56712  else
56713    PKGHANDLER_COMMAND=
56714
56715    case $PKGHANDLER in
56716      apt-get)
56717        apt_help     $MISSING_DEPENDENCY ;;
56718      yum)
56719        yum_help     $MISSING_DEPENDENCY ;;
56720      port)
56721        port_help    $MISSING_DEPENDENCY ;;
56722      pkgutil)
56723        pkgutil_help $MISSING_DEPENDENCY ;;
56724      pkgadd)
56725        pkgadd_help  $MISSING_DEPENDENCY ;;
56726    esac
56727
56728    if test "x$PKGHANDLER_COMMAND" != x; then
56729      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56730    fi
56731  fi
56732
56733      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56734    fi
56735
56736    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56737    # defined in libawt_xawt.
56738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56739$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56740    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56741/* end confdefs.h.  */
56742#include <X11/extensions/Xrender.h>
56743int
56744main ()
56745{
56746XLinearGradient x;
56747  ;
56748  return 0;
56749}
56750_ACEOF
56751if ac_fn_c_try_compile "$LINENO"; then :
56752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56753$as_echo "yes" >&6; }
56754else
56755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56756$as_echo "no" >&6; }
56757         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56758fi
56759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56760
56761    CFLAGS="$OLD_CFLAGS"
56762    ac_ext=cpp
56763ac_cpp='$CXXCPP $CPPFLAGS'
56764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56767
56768  fi # NEEDS_LIB_X11
56769
56770
56771
56772
56773
56774
56775# Check whether --with-cups was given.
56776if test "${with_cups+set}" = set; then :
56777  withval=$with_cups;
56778fi
56779
56780
56781# Check whether --with-cups-include was given.
56782if test "${with_cups_include+set}" = set; then :
56783  withval=$with_cups_include;
56784fi
56785
56786
56787  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56788    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56789        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56790      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56791$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56792    fi
56793    CUPS_CFLAGS=
56794  else
56795    CUPS_FOUND=no
56796
56797    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56798      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56799    fi
56800
56801    if test "x${with_cups}" != x; then
56802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56803$as_echo_n "checking for cups headers... " >&6; }
56804      if test -s "${with_cups}/include/cups/cups.h"; then
56805        CUPS_CFLAGS="-I${with_cups}/include"
56806        CUPS_FOUND=yes
56807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56808$as_echo "$CUPS_FOUND" >&6; }
56809      else
56810        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56811      fi
56812    fi
56813    if test "x${with_cups_include}" != x; then
56814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56815$as_echo_n "checking for cups headers... " >&6; }
56816      if test -s "${with_cups_include}/cups/cups.h"; then
56817        CUPS_CFLAGS="-I${with_cups_include}"
56818        CUPS_FOUND=yes
56819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56820$as_echo "$CUPS_FOUND" >&6; }
56821      else
56822        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56823      fi
56824    fi
56825    if test "x$CUPS_FOUND" = xno; then
56826      # Are the cups headers installed in the default /usr/include location?
56827      for ac_header in cups/cups.h cups/ppd.h
56828do :
56829  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56830ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56831if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56832  cat >>confdefs.h <<_ACEOF
56833#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56834_ACEOF
56835
56836          CUPS_FOUND=yes
56837          CUPS_CFLAGS=
56838          DEFAULT_CUPS=yes
56839
56840fi
56841
56842done
56843
56844    fi
56845    if test "x$CUPS_FOUND" = xno; then
56846
56847  # Print a helpful message on how to acquire the necessary build dependency.
56848  # cups is the help tag: freetype, cups, alsa etc
56849  MISSING_DEPENDENCY=cups
56850
56851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56852    cygwin_help $MISSING_DEPENDENCY
56853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56854    msys_help $MISSING_DEPENDENCY
56855  else
56856    PKGHANDLER_COMMAND=
56857
56858    case $PKGHANDLER in
56859      apt-get)
56860        apt_help     $MISSING_DEPENDENCY ;;
56861      yum)
56862        yum_help     $MISSING_DEPENDENCY ;;
56863      port)
56864        port_help    $MISSING_DEPENDENCY ;;
56865      pkgutil)
56866        pkgutil_help $MISSING_DEPENDENCY ;;
56867      pkgadd)
56868        pkgadd_help  $MISSING_DEPENDENCY ;;
56869    esac
56870
56871    if test "x$PKGHANDLER_COMMAND" != x; then
56872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56873    fi
56874  fi
56875
56876      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56877    fi
56878  fi
56879
56880
56881
56882
56883
56884# Check whether --with-freetype was given.
56885if test "${with_freetype+set}" = set; then :
56886  withval=$with_freetype;
56887fi
56888
56889
56890# Check whether --with-freetype-include was given.
56891if test "${with_freetype_include+set}" = set; then :
56892  withval=$with_freetype_include;
56893fi
56894
56895
56896# Check whether --with-freetype-lib was given.
56897if test "${with_freetype_lib+set}" = set; then :
56898  withval=$with_freetype_lib;
56899fi
56900
56901
56902# Check whether --with-freetype-src was given.
56903if test "${with_freetype_src+set}" = set; then :
56904  withval=$with_freetype_src;
56905fi
56906
56907  # Check whether --enable-freetype-bundling was given.
56908if test "${enable_freetype_bundling+set}" = set; then :
56909  enableval=$enable_freetype_bundling;
56910fi
56911
56912
56913  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56914  FREETYPE_BASE_NAME=freetype
56915  FREETYPE_CFLAGS=
56916  FREETYPE_LIBS=
56917  FREETYPE_BUNDLE_LIB_PATH=
56918
56919  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56920    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56921        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56922        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56923        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56924      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56925$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56926    fi
56927    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56928      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56929$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56930    fi
56931  else
56932    # freetype is needed to build; go get it!
56933
56934    BUNDLE_FREETYPE="$enable_freetype_bundling"
56935
56936    if  test "x$with_freetype_src" != x; then
56937      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56938        # Try to build freetype if --with-freetype-src was given on Windows
56939
56940  FREETYPE_SRC_PATH="$with_freetype_src"
56941  BUILD_FREETYPE=yes
56942
56943  # Check if the freetype sources are acessible..
56944  if ! test -d $FREETYPE_SRC_PATH; then
56945    { $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
56946$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56947    BUILD_FREETYPE=no
56948  fi
56949  # ..and contain a vc2010 project file
56950  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56951  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56952    { $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
56953$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56954    BUILD_FREETYPE=no
56955  fi
56956  # Now check if configure found a version of 'msbuild.exe'
56957  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56958    { $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
56959$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;}
56960    BUILD_FREETYPE=no
56961  fi
56962
56963  # Ready to go..
56964  if test "x$BUILD_FREETYPE" = xyes; then
56965    # msbuild requires trailing slashes for output directories
56966    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56967    freetype_lib_path_unix="$freetype_lib_path"
56968    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56969
56970  unix_path="$vcxproj_path"
56971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56972    windows_path=`$CYGPATH -m "$unix_path"`
56973    vcxproj_path="$windows_path"
56974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56975    windows_path=`cmd //c echo $unix_path`
56976    vcxproj_path="$windows_path"
56977  fi
56978
56979
56980  unix_path="$freetype_lib_path"
56981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56982    windows_path=`$CYGPATH -m "$unix_path"`
56983    freetype_lib_path="$windows_path"
56984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56985    windows_path=`cmd //c echo $unix_path`
56986    freetype_lib_path="$windows_path"
56987  fi
56988
56989
56990  unix_path="$freetype_obj_path"
56991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56992    windows_path=`$CYGPATH -m "$unix_path"`
56993    freetype_obj_path="$windows_path"
56994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56995    windows_path=`cmd //c echo $unix_path`
56996    freetype_obj_path="$windows_path"
56997  fi
56998
56999    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57000      freetype_platform=x64
57001    else
57002      freetype_platform=win32
57003    fi
57004
57005    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57006    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57007    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57008    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57009    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57010$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57011
57012    # First we try to build the freetype.dll
57013    $ECHO -e "@echo off\n"\
57014        "$MSBUILD $vcxproj_path "\
57015        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57016        "/p:Configuration=\"Release Multithreaded\" "\
57017        "/p:Platform=$freetype_platform "\
57018        "/p:ConfigurationType=DynamicLibrary "\
57019        "/p:TargetName=freetype "\
57020        "/p:OutDir=\"$freetype_lib_path\" "\
57021        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57022    cmd /c freetype.bat
57023
57024    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57025      # If that succeeds we also build freetype.lib
57026      $ECHO -e "@echo off\n"\
57027          "$MSBUILD $vcxproj_path "\
57028          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57029          "/p:Configuration=\"Release Multithreaded\" "\
57030          "/p:Platform=$freetype_platform "\
57031          "/p:ConfigurationType=StaticLibrary "\
57032          "/p:TargetName=freetype "\
57033          "/p:OutDir=\"$freetype_lib_path\" "\
57034          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57035      cmd /c freetype.bat
57036
57037      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57038        # Once we build both, lib and dll, set freetype lib and include path appropriately
57039        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57040        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57041        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57042$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57043      else
57044        BUILD_FREETYPE=no
57045      fi
57046    else
57047      BUILD_FREETYPE=no
57048    fi
57049  fi
57050
57051        if test "x$BUILD_FREETYPE" = xyes; then
57052          # Okay, we built it. Check that it works.
57053
57054  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57055  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57056  METHOD="--with-freetype-src"
57057
57058  # Let's start with an optimistic view of the world :-)
57059  FOUND_FREETYPE=yes
57060
57061  # First look for the canonical freetype main include file ft2build.h.
57062  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57063    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57064    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57065    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57066      # Fail.
57067      FOUND_FREETYPE=no
57068    fi
57069  fi
57070
57071  if test "x$FOUND_FREETYPE" = xyes; then
57072    # Include file found, let's continue the sanity check.
57073    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57074$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57075
57076    # Reset to default value
57077    FREETYPE_BASE_NAME=freetype
57078    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57079    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57080      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57081          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57082        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57083        # for the .6 version explicitly.
57084        FREETYPE_BASE_NAME=freetype.6
57085        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57086        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57087$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57088      else
57089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57090$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57091        FOUND_FREETYPE=no
57092      fi
57093    else
57094      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57095        # On Windows, we will need both .lib and .dll file.
57096        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57097          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57098$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57099          FOUND_FREETYPE=no
57100        fi
57101      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57102          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57103        # Found lib in isa dir, use that instead.
57104        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57105        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57106$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57107      fi
57108    fi
57109  fi
57110
57111  if test "x$FOUND_FREETYPE" = xyes; then
57112
57113  # Only process if variable expands to non-empty
57114
57115  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57117
57118  # Input might be given as Windows format, start by converting to
57119  # unix format.
57120  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57121  new_path=`$CYGPATH -u "$path"`
57122
57123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57126  # "foo.exe" is OK but "foo" is an error.
57127  #
57128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57129  # It is also a way to make sure we got the proper file name for the real test later on.
57130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57131  if test "x$test_shortpath" = x; then
57132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57134    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57135  fi
57136
57137  # Call helper function which possibly converts this using DOS-style short mode.
57138  # If so, the updated path is stored in $new_path.
57139
57140  input_path="$new_path"
57141  # Check if we need to convert this using DOS-style short mode. If the path
57142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57143  # take no chances and rewrite it.
57144  # Note: m4 eats our [], so we need to use [ and ] instead.
57145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57146  if test "x$has_forbidden_chars" != x; then
57147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57151      # Going to short mode and back again did indeed matter. Since short mode is
57152      # case insensitive, let's make it lowercase to improve readability.
57153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57154      # Now convert it back to Unix-style (cygpath)
57155      input_path=`$CYGPATH -u "$shortmode_path"`
57156      new_path="$input_path"
57157    fi
57158  fi
57159
57160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57161  if test "x$test_cygdrive_prefix" = x; then
57162    # As a simple fix, exclude /usr/bin since it's not a real path.
57163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57165      # a path prefixed by /cygdrive for fixpath to work.
57166      new_path="$CYGWIN_ROOT_PATH$input_path"
57167    fi
57168  fi
57169
57170
57171  if test "x$path" != "x$new_path"; then
57172    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57174$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57175  fi
57176
57177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57178
57179  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57180  has_colon=`$ECHO $path | $GREP ^.:`
57181  new_path="$path"
57182  if test "x$has_colon" = x; then
57183    # Not in mixed or Windows style, start by that.
57184    new_path=`cmd //c echo $path`
57185  fi
57186
57187
57188  input_path="$new_path"
57189  # Check if we need to convert this using DOS-style short mode. If the path
57190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57191  # take no chances and rewrite it.
57192  # Note: m4 eats our [], so we need to use [ and ] instead.
57193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57194  if test "x$has_forbidden_chars" != x; then
57195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57197  fi
57198
57199
57200  windows_path="$new_path"
57201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57202    unix_path=`$CYGPATH -u "$windows_path"`
57203    new_path="$unix_path"
57204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57206    new_path="$unix_path"
57207  fi
57208
57209  if test "x$path" != "x$new_path"; then
57210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57213  fi
57214
57215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57217
57218    else
57219      # We're on a unix platform. Hooray! :)
57220      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57221      has_space=`$ECHO "$path" | $GREP " "`
57222      if test "x$has_space" != x; then
57223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57226      fi
57227
57228      # Use eval to expand a potential ~
57229      eval path="$path"
57230      if test ! -f "$path" && test ! -d "$path"; then
57231        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57232      fi
57233
57234      if test -d "$path"; then
57235        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57236      else
57237        dir="`$DIRNAME "$path"`"
57238        base="`$BASENAME "$path"`"
57239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57240      fi
57241    fi
57242  fi
57243
57244
57245  # Only process if variable expands to non-empty
57246
57247  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57249
57250  # Input might be given as Windows format, start by converting to
57251  # unix format.
57252  path="$POTENTIAL_FREETYPE_LIB_PATH"
57253  new_path=`$CYGPATH -u "$path"`
57254
57255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57258  # "foo.exe" is OK but "foo" is an error.
57259  #
57260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57261  # It is also a way to make sure we got the proper file name for the real test later on.
57262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57263  if test "x$test_shortpath" = x; then
57264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57266    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57267  fi
57268
57269  # Call helper function which possibly converts this using DOS-style short mode.
57270  # If so, the updated path is stored in $new_path.
57271
57272  input_path="$new_path"
57273  # Check if we need to convert this using DOS-style short mode. If the path
57274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57275  # take no chances and rewrite it.
57276  # Note: m4 eats our [], so we need to use [ and ] instead.
57277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57278  if test "x$has_forbidden_chars" != x; then
57279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57283      # Going to short mode and back again did indeed matter. Since short mode is
57284      # case insensitive, let's make it lowercase to improve readability.
57285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57286      # Now convert it back to Unix-style (cygpath)
57287      input_path=`$CYGPATH -u "$shortmode_path"`
57288      new_path="$input_path"
57289    fi
57290  fi
57291
57292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57293  if test "x$test_cygdrive_prefix" = x; then
57294    # As a simple fix, exclude /usr/bin since it's not a real path.
57295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57297      # a path prefixed by /cygdrive for fixpath to work.
57298      new_path="$CYGWIN_ROOT_PATH$input_path"
57299    fi
57300  fi
57301
57302
57303  if test "x$path" != "x$new_path"; then
57304    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57307  fi
57308
57309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57310
57311  path="$POTENTIAL_FREETYPE_LIB_PATH"
57312  has_colon=`$ECHO $path | $GREP ^.:`
57313  new_path="$path"
57314  if test "x$has_colon" = x; then
57315    # Not in mixed or Windows style, start by that.
57316    new_path=`cmd //c echo $path`
57317  fi
57318
57319
57320  input_path="$new_path"
57321  # Check if we need to convert this using DOS-style short mode. If the path
57322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57323  # take no chances and rewrite it.
57324  # Note: m4 eats our [], so we need to use [ and ] instead.
57325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57326  if test "x$has_forbidden_chars" != x; then
57327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57329  fi
57330
57331
57332  windows_path="$new_path"
57333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57334    unix_path=`$CYGPATH -u "$windows_path"`
57335    new_path="$unix_path"
57336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57338    new_path="$unix_path"
57339  fi
57340
57341  if test "x$path" != "x$new_path"; then
57342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57345  fi
57346
57347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57349
57350    else
57351      # We're on a unix platform. Hooray! :)
57352      path="$POTENTIAL_FREETYPE_LIB_PATH"
57353      has_space=`$ECHO "$path" | $GREP " "`
57354      if test "x$has_space" != x; then
57355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57358      fi
57359
57360      # Use eval to expand a potential ~
57361      eval path="$path"
57362      if test ! -f "$path" && test ! -d "$path"; then
57363        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57364      fi
57365
57366      if test -d "$path"; then
57367        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57368      else
57369        dir="`$DIRNAME "$path"`"
57370        base="`$BASENAME "$path"`"
57371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57372      fi
57373    fi
57374  fi
57375
57376
57377    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57379$as_echo_n "checking for freetype includes... " >&6; }
57380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57381$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57382    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57384$as_echo_n "checking for freetype libraries... " >&6; }
57385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57386$as_echo "$FREETYPE_LIB_PATH" >&6; }
57387  fi
57388
57389          if test "x$FOUND_FREETYPE" != xyes; then
57390            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57391          fi
57392        else
57393          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57394$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57395          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57396        fi
57397      else
57398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57399$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57400      fi
57401    fi
57402
57403    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57404      # User has specified settings
57405
57406      if test "x$BUNDLE_FREETYPE" = x; then
57407        # If not specified, default is to bundle freetype
57408        BUNDLE_FREETYPE=yes
57409      fi
57410
57411      if test "x$with_freetype" != x; then
57412        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57413        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57414      fi
57415
57416      # Allow --with-freetype-lib and --with-freetype-include to override
57417      if test "x$with_freetype_include" != x; then
57418        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57419      fi
57420      if test "x$with_freetype_lib" != x; then
57421        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57422      fi
57423
57424      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57425        # Okay, we got it. Check that it works.
57426
57427  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57428  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57429  METHOD="--with-freetype"
57430
57431  # Let's start with an optimistic view of the world :-)
57432  FOUND_FREETYPE=yes
57433
57434  # First look for the canonical freetype main include file ft2build.h.
57435  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57436    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57437    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57438    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57439      # Fail.
57440      FOUND_FREETYPE=no
57441    fi
57442  fi
57443
57444  if test "x$FOUND_FREETYPE" = xyes; then
57445    # Include file found, let's continue the sanity check.
57446    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57447$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57448
57449    # Reset to default value
57450    FREETYPE_BASE_NAME=freetype
57451    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57452    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57453      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57454          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57455        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57456        # for the .6 version explicitly.
57457        FREETYPE_BASE_NAME=freetype.6
57458        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57459        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57460$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57461      else
57462        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57464        FOUND_FREETYPE=no
57465      fi
57466    else
57467      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57468        # On Windows, we will need both .lib and .dll file.
57469        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57470          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57471$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57472          FOUND_FREETYPE=no
57473        fi
57474      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57475          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57476        # Found lib in isa dir, use that instead.
57477        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57478        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57479$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57480      fi
57481    fi
57482  fi
57483
57484  if test "x$FOUND_FREETYPE" = xyes; then
57485
57486  # Only process if variable expands to non-empty
57487
57488  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57490
57491  # Input might be given as Windows format, start by converting to
57492  # unix format.
57493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57494  new_path=`$CYGPATH -u "$path"`
57495
57496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57499  # "foo.exe" is OK but "foo" is an error.
57500  #
57501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57502  # It is also a way to make sure we got the proper file name for the real test later on.
57503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57504  if test "x$test_shortpath" = x; then
57505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57508  fi
57509
57510  # Call helper function which possibly converts this using DOS-style short mode.
57511  # If so, the updated path is stored in $new_path.
57512
57513  input_path="$new_path"
57514  # Check if we need to convert this using DOS-style short mode. If the path
57515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57516  # take no chances and rewrite it.
57517  # Note: m4 eats our [], so we need to use [ and ] instead.
57518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57519  if test "x$has_forbidden_chars" != x; then
57520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57524      # Going to short mode and back again did indeed matter. Since short mode is
57525      # case insensitive, let's make it lowercase to improve readability.
57526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57527      # Now convert it back to Unix-style (cygpath)
57528      input_path=`$CYGPATH -u "$shortmode_path"`
57529      new_path="$input_path"
57530    fi
57531  fi
57532
57533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57534  if test "x$test_cygdrive_prefix" = x; then
57535    # As a simple fix, exclude /usr/bin since it's not a real path.
57536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57538      # a path prefixed by /cygdrive for fixpath to work.
57539      new_path="$CYGWIN_ROOT_PATH$input_path"
57540    fi
57541  fi
57542
57543
57544  if test "x$path" != "x$new_path"; then
57545    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57548  fi
57549
57550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57551
57552  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57553  has_colon=`$ECHO $path | $GREP ^.:`
57554  new_path="$path"
57555  if test "x$has_colon" = x; then
57556    # Not in mixed or Windows style, start by that.
57557    new_path=`cmd //c echo $path`
57558  fi
57559
57560
57561  input_path="$new_path"
57562  # Check if we need to convert this using DOS-style short mode. If the path
57563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57564  # take no chances and rewrite it.
57565  # Note: m4 eats our [], so we need to use [ and ] instead.
57566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57567  if test "x$has_forbidden_chars" != x; then
57568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57570  fi
57571
57572
57573  windows_path="$new_path"
57574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57575    unix_path=`$CYGPATH -u "$windows_path"`
57576    new_path="$unix_path"
57577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57579    new_path="$unix_path"
57580  fi
57581
57582  if test "x$path" != "x$new_path"; then
57583    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57586  fi
57587
57588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57590
57591    else
57592      # We're on a unix platform. Hooray! :)
57593      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57594      has_space=`$ECHO "$path" | $GREP " "`
57595      if test "x$has_space" != x; then
57596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57599      fi
57600
57601      # Use eval to expand a potential ~
57602      eval path="$path"
57603      if test ! -f "$path" && test ! -d "$path"; then
57604        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57605      fi
57606
57607      if test -d "$path"; then
57608        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57609      else
57610        dir="`$DIRNAME "$path"`"
57611        base="`$BASENAME "$path"`"
57612        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57613      fi
57614    fi
57615  fi
57616
57617
57618  # Only process if variable expands to non-empty
57619
57620  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57622
57623  # Input might be given as Windows format, start by converting to
57624  # unix format.
57625  path="$POTENTIAL_FREETYPE_LIB_PATH"
57626  new_path=`$CYGPATH -u "$path"`
57627
57628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57631  # "foo.exe" is OK but "foo" is an error.
57632  #
57633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57634  # It is also a way to make sure we got the proper file name for the real test later on.
57635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57636  if test "x$test_shortpath" = x; then
57637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57638$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57639    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57640  fi
57641
57642  # Call helper function which possibly converts this using DOS-style short mode.
57643  # If so, the updated path is stored in $new_path.
57644
57645  input_path="$new_path"
57646  # Check if we need to convert this using DOS-style short mode. If the path
57647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57648  # take no chances and rewrite it.
57649  # Note: m4 eats our [], so we need to use [ and ] instead.
57650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57651  if test "x$has_forbidden_chars" != x; then
57652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57656      # Going to short mode and back again did indeed matter. Since short mode is
57657      # case insensitive, let's make it lowercase to improve readability.
57658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57659      # Now convert it back to Unix-style (cygpath)
57660      input_path=`$CYGPATH -u "$shortmode_path"`
57661      new_path="$input_path"
57662    fi
57663  fi
57664
57665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57666  if test "x$test_cygdrive_prefix" = x; then
57667    # As a simple fix, exclude /usr/bin since it's not a real path.
57668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57670      # a path prefixed by /cygdrive for fixpath to work.
57671      new_path="$CYGWIN_ROOT_PATH$input_path"
57672    fi
57673  fi
57674
57675
57676  if test "x$path" != "x$new_path"; then
57677    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57680  fi
57681
57682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57683
57684  path="$POTENTIAL_FREETYPE_LIB_PATH"
57685  has_colon=`$ECHO $path | $GREP ^.:`
57686  new_path="$path"
57687  if test "x$has_colon" = x; then
57688    # Not in mixed or Windows style, start by that.
57689    new_path=`cmd //c echo $path`
57690  fi
57691
57692
57693  input_path="$new_path"
57694  # Check if we need to convert this using DOS-style short mode. If the path
57695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57696  # take no chances and rewrite it.
57697  # Note: m4 eats our [], so we need to use [ and ] instead.
57698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57699  if test "x$has_forbidden_chars" != x; then
57700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57702  fi
57703
57704
57705  windows_path="$new_path"
57706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57707    unix_path=`$CYGPATH -u "$windows_path"`
57708    new_path="$unix_path"
57709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57711    new_path="$unix_path"
57712  fi
57713
57714  if test "x$path" != "x$new_path"; then
57715    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57718  fi
57719
57720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57722
57723    else
57724      # We're on a unix platform. Hooray! :)
57725      path="$POTENTIAL_FREETYPE_LIB_PATH"
57726      has_space=`$ECHO "$path" | $GREP " "`
57727      if test "x$has_space" != x; then
57728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57730        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57731      fi
57732
57733      # Use eval to expand a potential ~
57734      eval path="$path"
57735      if test ! -f "$path" && test ! -d "$path"; then
57736        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57737      fi
57738
57739      if test -d "$path"; then
57740        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57741      else
57742        dir="`$DIRNAME "$path"`"
57743        base="`$BASENAME "$path"`"
57744        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57745      fi
57746    fi
57747  fi
57748
57749
57750    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57752$as_echo_n "checking for freetype includes... " >&6; }
57753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57754$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57755    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57757$as_echo_n "checking for freetype libraries... " >&6; }
57758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57759$as_echo "$FREETYPE_LIB_PATH" >&6; }
57760  fi
57761
57762        if test "x$FOUND_FREETYPE" != xyes; then
57763          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57764        fi
57765      else
57766        # User specified only one of lib or include. This is an error.
57767        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57768          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57769$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57770          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57771        else
57772          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57773$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57774          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57775        fi
57776      fi
57777    else
57778      # User did not specify settings, but we need freetype. Try to locate it.
57779
57780      if test "x$BUNDLE_FREETYPE" = x; then
57781        # If not specified, default is to bundle freetype only on windows
57782        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57783          BUNDLE_FREETYPE=yes
57784        else
57785          BUNDLE_FREETYPE=no
57786        fi
57787      fi
57788
57789      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57790      if test "x$SYSROOT" = x; then
57791        if test "x$FOUND_FREETYPE" != xyes; then
57792          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57793          if test "x$PKG_CONFIG" != x; then
57794
57795pkg_failed=no
57796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57797$as_echo_n "checking for FREETYPE... " >&6; }
57798
57799if test -n "$FREETYPE_CFLAGS"; then
57800    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57801 elif test -n "$PKG_CONFIG"; then
57802    if test -n "$PKG_CONFIG" && \
57803    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57804  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57805  ac_status=$?
57806  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57807  test $ac_status = 0; }; then
57808  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57809else
57810  pkg_failed=yes
57811fi
57812 else
57813    pkg_failed=untried
57814fi
57815if test -n "$FREETYPE_LIBS"; then
57816    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57817 elif test -n "$PKG_CONFIG"; then
57818    if test -n "$PKG_CONFIG" && \
57819    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57820  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57821  ac_status=$?
57822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57823  test $ac_status = 0; }; then
57824  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57825else
57826  pkg_failed=yes
57827fi
57828 else
57829    pkg_failed=untried
57830fi
57831
57832
57833
57834if test $pkg_failed = yes; then
57835
57836if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57837        _pkg_short_errors_supported=yes
57838else
57839        _pkg_short_errors_supported=no
57840fi
57841        if test $_pkg_short_errors_supported = yes; then
57842	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57843        else
57844	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57845        fi
57846	# Put the nasty error message in config.log where it belongs
57847	echo "$FREETYPE_PKG_ERRORS" >&5
57848
57849	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57850$as_echo "no" >&6; }
57851                FOUND_FREETYPE=no
57852elif test $pkg_failed = untried; then
57853	FOUND_FREETYPE=no
57854else
57855	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57856	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57858$as_echo "yes" >&6; }
57859	FOUND_FREETYPE=yes
57860fi
57861            if test "x$FOUND_FREETYPE" = xyes; then
57862              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57863              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57864              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57865              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57866                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57867              fi
57868              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57869              if test "x$BUNDLE_FREETYPE" = xyes; then
57870                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57871$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57872                FOUND_FREETYPE=no
57873              else
57874                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57875$as_echo_n "checking for freetype... " >&6; }
57876                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57877$as_echo "yes (using pkg-config)" >&6; }
57878              fi
57879            fi
57880          fi
57881        fi
57882      fi
57883
57884      if test "x$FOUND_FREETYPE" != xyes; then
57885        # Check in well-known locations
57886        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57887          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57888
57889  windows_path="$FREETYPE_BASE_DIR"
57890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57891    unix_path=`$CYGPATH -u "$windows_path"`
57892    FREETYPE_BASE_DIR="$unix_path"
57893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57895    FREETYPE_BASE_DIR="$unix_path"
57896  fi
57897
57898
57899  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57900  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57901  METHOD="well-known location"
57902
57903  # Let's start with an optimistic view of the world :-)
57904  FOUND_FREETYPE=yes
57905
57906  # First look for the canonical freetype main include file ft2build.h.
57907  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57908    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57909    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57910    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57911      # Fail.
57912      FOUND_FREETYPE=no
57913    fi
57914  fi
57915
57916  if test "x$FOUND_FREETYPE" = xyes; then
57917    # Include file found, let's continue the sanity check.
57918    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57919$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57920
57921    # Reset to default value
57922    FREETYPE_BASE_NAME=freetype
57923    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57924    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57925      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57926          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57927        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57928        # for the .6 version explicitly.
57929        FREETYPE_BASE_NAME=freetype.6
57930        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57931        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57932$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57933      else
57934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57935$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57936        FOUND_FREETYPE=no
57937      fi
57938    else
57939      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57940        # On Windows, we will need both .lib and .dll file.
57941        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57942          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57943$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57944          FOUND_FREETYPE=no
57945        fi
57946      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57947          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57948        # Found lib in isa dir, use that instead.
57949        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57950        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57951$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57952      fi
57953    fi
57954  fi
57955
57956  if test "x$FOUND_FREETYPE" = xyes; then
57957
57958  # Only process if variable expands to non-empty
57959
57960  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57962
57963  # Input might be given as Windows format, start by converting to
57964  # unix format.
57965  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57966  new_path=`$CYGPATH -u "$path"`
57967
57968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57971  # "foo.exe" is OK but "foo" is an error.
57972  #
57973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57974  # It is also a way to make sure we got the proper file name for the real test later on.
57975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57976  if test "x$test_shortpath" = x; then
57977    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57978$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57979    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57980  fi
57981
57982  # Call helper function which possibly converts this using DOS-style short mode.
57983  # If so, the updated path is stored in $new_path.
57984
57985  input_path="$new_path"
57986  # Check if we need to convert this using DOS-style short mode. If the path
57987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57988  # take no chances and rewrite it.
57989  # Note: m4 eats our [], so we need to use [ and ] instead.
57990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57991  if test "x$has_forbidden_chars" != x; then
57992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57996      # Going to short mode and back again did indeed matter. Since short mode is
57997      # case insensitive, let's make it lowercase to improve readability.
57998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57999      # Now convert it back to Unix-style (cygpath)
58000      input_path=`$CYGPATH -u "$shortmode_path"`
58001      new_path="$input_path"
58002    fi
58003  fi
58004
58005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58006  if test "x$test_cygdrive_prefix" = x; then
58007    # As a simple fix, exclude /usr/bin since it's not a real path.
58008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58010      # a path prefixed by /cygdrive for fixpath to work.
58011      new_path="$CYGWIN_ROOT_PATH$input_path"
58012    fi
58013  fi
58014
58015
58016  if test "x$path" != "x$new_path"; then
58017    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58020  fi
58021
58022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58023
58024  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58025  has_colon=`$ECHO $path | $GREP ^.:`
58026  new_path="$path"
58027  if test "x$has_colon" = x; then
58028    # Not in mixed or Windows style, start by that.
58029    new_path=`cmd //c echo $path`
58030  fi
58031
58032
58033  input_path="$new_path"
58034  # Check if we need to convert this using DOS-style short mode. If the path
58035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58036  # take no chances and rewrite it.
58037  # Note: m4 eats our [], so we need to use [ and ] instead.
58038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58039  if test "x$has_forbidden_chars" != x; then
58040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58042  fi
58043
58044
58045  windows_path="$new_path"
58046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58047    unix_path=`$CYGPATH -u "$windows_path"`
58048    new_path="$unix_path"
58049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58051    new_path="$unix_path"
58052  fi
58053
58054  if test "x$path" != "x$new_path"; then
58055    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58058  fi
58059
58060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58062
58063    else
58064      # We're on a unix platform. Hooray! :)
58065      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58066      has_space=`$ECHO "$path" | $GREP " "`
58067      if test "x$has_space" != x; then
58068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58070        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58071      fi
58072
58073      # Use eval to expand a potential ~
58074      eval path="$path"
58075      if test ! -f "$path" && test ! -d "$path"; then
58076        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58077      fi
58078
58079      if test -d "$path"; then
58080        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58081      else
58082        dir="`$DIRNAME "$path"`"
58083        base="`$BASENAME "$path"`"
58084        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58085      fi
58086    fi
58087  fi
58088
58089
58090  # Only process if variable expands to non-empty
58091
58092  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58094
58095  # Input might be given as Windows format, start by converting to
58096  # unix format.
58097  path="$POTENTIAL_FREETYPE_LIB_PATH"
58098  new_path=`$CYGPATH -u "$path"`
58099
58100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58103  # "foo.exe" is OK but "foo" is an error.
58104  #
58105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58106  # It is also a way to make sure we got the proper file name for the real test later on.
58107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58108  if test "x$test_shortpath" = x; then
58109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58111    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58112  fi
58113
58114  # Call helper function which possibly converts this using DOS-style short mode.
58115  # If so, the updated path is stored in $new_path.
58116
58117  input_path="$new_path"
58118  # Check if we need to convert this using DOS-style short mode. If the path
58119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58120  # take no chances and rewrite it.
58121  # Note: m4 eats our [], so we need to use [ and ] instead.
58122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58123  if test "x$has_forbidden_chars" != x; then
58124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58128      # Going to short mode and back again did indeed matter. Since short mode is
58129      # case insensitive, let's make it lowercase to improve readability.
58130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58131      # Now convert it back to Unix-style (cygpath)
58132      input_path=`$CYGPATH -u "$shortmode_path"`
58133      new_path="$input_path"
58134    fi
58135  fi
58136
58137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58138  if test "x$test_cygdrive_prefix" = x; then
58139    # As a simple fix, exclude /usr/bin since it's not a real path.
58140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58142      # a path prefixed by /cygdrive for fixpath to work.
58143      new_path="$CYGWIN_ROOT_PATH$input_path"
58144    fi
58145  fi
58146
58147
58148  if test "x$path" != "x$new_path"; then
58149    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58152  fi
58153
58154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58155
58156  path="$POTENTIAL_FREETYPE_LIB_PATH"
58157  has_colon=`$ECHO $path | $GREP ^.:`
58158  new_path="$path"
58159  if test "x$has_colon" = x; then
58160    # Not in mixed or Windows style, start by that.
58161    new_path=`cmd //c echo $path`
58162  fi
58163
58164
58165  input_path="$new_path"
58166  # Check if we need to convert this using DOS-style short mode. If the path
58167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58168  # take no chances and rewrite it.
58169  # Note: m4 eats our [], so we need to use [ and ] instead.
58170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58171  if test "x$has_forbidden_chars" != x; then
58172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58174  fi
58175
58176
58177  windows_path="$new_path"
58178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58179    unix_path=`$CYGPATH -u "$windows_path"`
58180    new_path="$unix_path"
58181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58183    new_path="$unix_path"
58184  fi
58185
58186  if test "x$path" != "x$new_path"; then
58187    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58190  fi
58191
58192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58194
58195    else
58196      # We're on a unix platform. Hooray! :)
58197      path="$POTENTIAL_FREETYPE_LIB_PATH"
58198      has_space=`$ECHO "$path" | $GREP " "`
58199      if test "x$has_space" != x; then
58200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58203      fi
58204
58205      # Use eval to expand a potential ~
58206      eval path="$path"
58207      if test ! -f "$path" && test ! -d "$path"; then
58208        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58209      fi
58210
58211      if test -d "$path"; then
58212        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58213      else
58214        dir="`$DIRNAME "$path"`"
58215        base="`$BASENAME "$path"`"
58216        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58217      fi
58218    fi
58219  fi
58220
58221
58222    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58224$as_echo_n "checking for freetype includes... " >&6; }
58225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58226$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58227    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58229$as_echo_n "checking for freetype libraries... " >&6; }
58230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58231$as_echo "$FREETYPE_LIB_PATH" >&6; }
58232  fi
58233
58234          if test "x$FOUND_FREETYPE" != xyes; then
58235            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58236
58237  windows_path="$FREETYPE_BASE_DIR"
58238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58239    unix_path=`$CYGPATH -u "$windows_path"`
58240    FREETYPE_BASE_DIR="$unix_path"
58241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58243    FREETYPE_BASE_DIR="$unix_path"
58244  fi
58245
58246
58247  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58248  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58249  METHOD="well-known location"
58250
58251  # Let's start with an optimistic view of the world :-)
58252  FOUND_FREETYPE=yes
58253
58254  # First look for the canonical freetype main include file ft2build.h.
58255  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58256    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58257    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58258    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58259      # Fail.
58260      FOUND_FREETYPE=no
58261    fi
58262  fi
58263
58264  if test "x$FOUND_FREETYPE" = xyes; then
58265    # Include file found, let's continue the sanity check.
58266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58267$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58268
58269    # Reset to default value
58270    FREETYPE_BASE_NAME=freetype
58271    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58272    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58273      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58274          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58275        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58276        # for the .6 version explicitly.
58277        FREETYPE_BASE_NAME=freetype.6
58278        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58279        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58280$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58281      else
58282        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58283$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58284        FOUND_FREETYPE=no
58285      fi
58286    else
58287      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58288        # On Windows, we will need both .lib and .dll file.
58289        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58290          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58292          FOUND_FREETYPE=no
58293        fi
58294      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58295          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58296        # Found lib in isa dir, use that instead.
58297        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58298        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58299$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58300      fi
58301    fi
58302  fi
58303
58304  if test "x$FOUND_FREETYPE" = xyes; then
58305
58306  # Only process if variable expands to non-empty
58307
58308  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58310
58311  # Input might be given as Windows format, start by converting to
58312  # unix format.
58313  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58314  new_path=`$CYGPATH -u "$path"`
58315
58316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58319  # "foo.exe" is OK but "foo" is an error.
58320  #
58321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58322  # It is also a way to make sure we got the proper file name for the real test later on.
58323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58324  if test "x$test_shortpath" = x; then
58325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58327    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58328  fi
58329
58330  # Call helper function which possibly converts this using DOS-style short mode.
58331  # If so, the updated path is stored in $new_path.
58332
58333  input_path="$new_path"
58334  # Check if we need to convert this using DOS-style short mode. If the path
58335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58336  # take no chances and rewrite it.
58337  # Note: m4 eats our [], so we need to use [ and ] instead.
58338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58339  if test "x$has_forbidden_chars" != x; then
58340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58344      # Going to short mode and back again did indeed matter. Since short mode is
58345      # case insensitive, let's make it lowercase to improve readability.
58346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58347      # Now convert it back to Unix-style (cygpath)
58348      input_path=`$CYGPATH -u "$shortmode_path"`
58349      new_path="$input_path"
58350    fi
58351  fi
58352
58353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58354  if test "x$test_cygdrive_prefix" = x; then
58355    # As a simple fix, exclude /usr/bin since it's not a real path.
58356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58358      # a path prefixed by /cygdrive for fixpath to work.
58359      new_path="$CYGWIN_ROOT_PATH$input_path"
58360    fi
58361  fi
58362
58363
58364  if test "x$path" != "x$new_path"; then
58365    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58368  fi
58369
58370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58371
58372  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58373  has_colon=`$ECHO $path | $GREP ^.:`
58374  new_path="$path"
58375  if test "x$has_colon" = x; then
58376    # Not in mixed or Windows style, start by that.
58377    new_path=`cmd //c echo $path`
58378  fi
58379
58380
58381  input_path="$new_path"
58382  # Check if we need to convert this using DOS-style short mode. If the path
58383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58384  # take no chances and rewrite it.
58385  # Note: m4 eats our [], so we need to use [ and ] instead.
58386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58387  if test "x$has_forbidden_chars" != x; then
58388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58390  fi
58391
58392
58393  windows_path="$new_path"
58394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58395    unix_path=`$CYGPATH -u "$windows_path"`
58396    new_path="$unix_path"
58397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58399    new_path="$unix_path"
58400  fi
58401
58402  if test "x$path" != "x$new_path"; then
58403    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58405$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58406  fi
58407
58408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58410
58411    else
58412      # We're on a unix platform. Hooray! :)
58413      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58414      has_space=`$ECHO "$path" | $GREP " "`
58415      if test "x$has_space" != x; then
58416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58417$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58419      fi
58420
58421      # Use eval to expand a potential ~
58422      eval path="$path"
58423      if test ! -f "$path" && test ! -d "$path"; then
58424        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58425      fi
58426
58427      if test -d "$path"; then
58428        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58429      else
58430        dir="`$DIRNAME "$path"`"
58431        base="`$BASENAME "$path"`"
58432        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58433      fi
58434    fi
58435  fi
58436
58437
58438  # Only process if variable expands to non-empty
58439
58440  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58442
58443  # Input might be given as Windows format, start by converting to
58444  # unix format.
58445  path="$POTENTIAL_FREETYPE_LIB_PATH"
58446  new_path=`$CYGPATH -u "$path"`
58447
58448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58451  # "foo.exe" is OK but "foo" is an error.
58452  #
58453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58454  # It is also a way to make sure we got the proper file name for the real test later on.
58455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58456  if test "x$test_shortpath" = x; then
58457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58459    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58460  fi
58461
58462  # Call helper function which possibly converts this using DOS-style short mode.
58463  # If so, the updated path is stored in $new_path.
58464
58465  input_path="$new_path"
58466  # Check if we need to convert this using DOS-style short mode. If the path
58467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58468  # take no chances and rewrite it.
58469  # Note: m4 eats our [], so we need to use [ and ] instead.
58470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58471  if test "x$has_forbidden_chars" != x; then
58472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58476      # Going to short mode and back again did indeed matter. Since short mode is
58477      # case insensitive, let's make it lowercase to improve readability.
58478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58479      # Now convert it back to Unix-style (cygpath)
58480      input_path=`$CYGPATH -u "$shortmode_path"`
58481      new_path="$input_path"
58482    fi
58483  fi
58484
58485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58486  if test "x$test_cygdrive_prefix" = x; then
58487    # As a simple fix, exclude /usr/bin since it's not a real path.
58488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58490      # a path prefixed by /cygdrive for fixpath to work.
58491      new_path="$CYGWIN_ROOT_PATH$input_path"
58492    fi
58493  fi
58494
58495
58496  if test "x$path" != "x$new_path"; then
58497    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58500  fi
58501
58502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58503
58504  path="$POTENTIAL_FREETYPE_LIB_PATH"
58505  has_colon=`$ECHO $path | $GREP ^.:`
58506  new_path="$path"
58507  if test "x$has_colon" = x; then
58508    # Not in mixed or Windows style, start by that.
58509    new_path=`cmd //c echo $path`
58510  fi
58511
58512
58513  input_path="$new_path"
58514  # Check if we need to convert this using DOS-style short mode. If the path
58515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58516  # take no chances and rewrite it.
58517  # Note: m4 eats our [], so we need to use [ and ] instead.
58518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58519  if test "x$has_forbidden_chars" != x; then
58520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58522  fi
58523
58524
58525  windows_path="$new_path"
58526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58527    unix_path=`$CYGPATH -u "$windows_path"`
58528    new_path="$unix_path"
58529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58531    new_path="$unix_path"
58532  fi
58533
58534  if test "x$path" != "x$new_path"; then
58535    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58538  fi
58539
58540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58542
58543    else
58544      # We're on a unix platform. Hooray! :)
58545      path="$POTENTIAL_FREETYPE_LIB_PATH"
58546      has_space=`$ECHO "$path" | $GREP " "`
58547      if test "x$has_space" != x; then
58548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58549$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58551      fi
58552
58553      # Use eval to expand a potential ~
58554      eval path="$path"
58555      if test ! -f "$path" && test ! -d "$path"; then
58556        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58557      fi
58558
58559      if test -d "$path"; then
58560        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58561      else
58562        dir="`$DIRNAME "$path"`"
58563        base="`$BASENAME "$path"`"
58564        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58565      fi
58566    fi
58567  fi
58568
58569
58570    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58572$as_echo_n "checking for freetype includes... " >&6; }
58573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58574$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58575    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58577$as_echo_n "checking for freetype libraries... " >&6; }
58578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58579$as_echo "$FREETYPE_LIB_PATH" >&6; }
58580  fi
58581
58582          fi
58583          if test "x$FOUND_FREETYPE" != xyes; then
58584            FREETYPE_BASE_DIR="$HOME/freetype"
58585
58586  windows_path="$FREETYPE_BASE_DIR"
58587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58588    unix_path=`$CYGPATH -u "$windows_path"`
58589    FREETYPE_BASE_DIR="$unix_path"
58590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58592    FREETYPE_BASE_DIR="$unix_path"
58593  fi
58594
58595            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58596
58597  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58598  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58599  METHOD="well-known location"
58600
58601  # Let's start with an optimistic view of the world :-)
58602  FOUND_FREETYPE=yes
58603
58604  # First look for the canonical freetype main include file ft2build.h.
58605  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58606    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58607    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58608    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58609      # Fail.
58610      FOUND_FREETYPE=no
58611    fi
58612  fi
58613
58614  if test "x$FOUND_FREETYPE" = xyes; then
58615    # Include file found, let's continue the sanity check.
58616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58617$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58618
58619    # Reset to default value
58620    FREETYPE_BASE_NAME=freetype
58621    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58622    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58623      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58624          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58625        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58626        # for the .6 version explicitly.
58627        FREETYPE_BASE_NAME=freetype.6
58628        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58629        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58630$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58631      else
58632        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58633$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58634        FOUND_FREETYPE=no
58635      fi
58636    else
58637      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58638        # On Windows, we will need both .lib and .dll file.
58639        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58640          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58641$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58642          FOUND_FREETYPE=no
58643        fi
58644      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58645          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58646        # Found lib in isa dir, use that instead.
58647        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58648        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58649$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58650      fi
58651    fi
58652  fi
58653
58654  if test "x$FOUND_FREETYPE" = xyes; then
58655
58656  # Only process if variable expands to non-empty
58657
58658  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58660
58661  # Input might be given as Windows format, start by converting to
58662  # unix format.
58663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58664  new_path=`$CYGPATH -u "$path"`
58665
58666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58669  # "foo.exe" is OK but "foo" is an error.
58670  #
58671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58672  # It is also a way to make sure we got the proper file name for the real test later on.
58673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58674  if test "x$test_shortpath" = x; then
58675    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58677    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58678  fi
58679
58680  # Call helper function which possibly converts this using DOS-style short mode.
58681  # If so, the updated path is stored in $new_path.
58682
58683  input_path="$new_path"
58684  # Check if we need to convert this using DOS-style short mode. If the path
58685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58686  # take no chances and rewrite it.
58687  # Note: m4 eats our [], so we need to use [ and ] instead.
58688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58689  if test "x$has_forbidden_chars" != x; then
58690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58694      # Going to short mode and back again did indeed matter. Since short mode is
58695      # case insensitive, let's make it lowercase to improve readability.
58696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58697      # Now convert it back to Unix-style (cygpath)
58698      input_path=`$CYGPATH -u "$shortmode_path"`
58699      new_path="$input_path"
58700    fi
58701  fi
58702
58703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58704  if test "x$test_cygdrive_prefix" = x; then
58705    # As a simple fix, exclude /usr/bin since it's not a real path.
58706    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58708      # a path prefixed by /cygdrive for fixpath to work.
58709      new_path="$CYGWIN_ROOT_PATH$input_path"
58710    fi
58711  fi
58712
58713
58714  if test "x$path" != "x$new_path"; then
58715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58718  fi
58719
58720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58721
58722  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58723  has_colon=`$ECHO $path | $GREP ^.:`
58724  new_path="$path"
58725  if test "x$has_colon" = x; then
58726    # Not in mixed or Windows style, start by that.
58727    new_path=`cmd //c echo $path`
58728  fi
58729
58730
58731  input_path="$new_path"
58732  # Check if we need to convert this using DOS-style short mode. If the path
58733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58734  # take no chances and rewrite it.
58735  # Note: m4 eats our [], so we need to use [ and ] instead.
58736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58737  if test "x$has_forbidden_chars" != x; then
58738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58740  fi
58741
58742
58743  windows_path="$new_path"
58744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58745    unix_path=`$CYGPATH -u "$windows_path"`
58746    new_path="$unix_path"
58747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58749    new_path="$unix_path"
58750  fi
58751
58752  if test "x$path" != "x$new_path"; then
58753    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58755$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58756  fi
58757
58758  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58759  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58760
58761    else
58762      # We're on a unix platform. Hooray! :)
58763      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58764      has_space=`$ECHO "$path" | $GREP " "`
58765      if test "x$has_space" != x; then
58766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58768        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58769      fi
58770
58771      # Use eval to expand a potential ~
58772      eval path="$path"
58773      if test ! -f "$path" && test ! -d "$path"; then
58774        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58775      fi
58776
58777      if test -d "$path"; then
58778        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58779      else
58780        dir="`$DIRNAME "$path"`"
58781        base="`$BASENAME "$path"`"
58782        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58783      fi
58784    fi
58785  fi
58786
58787
58788  # Only process if variable expands to non-empty
58789
58790  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58792
58793  # Input might be given as Windows format, start by converting to
58794  # unix format.
58795  path="$POTENTIAL_FREETYPE_LIB_PATH"
58796  new_path=`$CYGPATH -u "$path"`
58797
58798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58801  # "foo.exe" is OK but "foo" is an error.
58802  #
58803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58804  # It is also a way to make sure we got the proper file name for the real test later on.
58805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58806  if test "x$test_shortpath" = x; then
58807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58809    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58810  fi
58811
58812  # Call helper function which possibly converts this using DOS-style short mode.
58813  # If so, the updated path is stored in $new_path.
58814
58815  input_path="$new_path"
58816  # Check if we need to convert this using DOS-style short mode. If the path
58817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58818  # take no chances and rewrite it.
58819  # Note: m4 eats our [], so we need to use [ and ] instead.
58820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58821  if test "x$has_forbidden_chars" != x; then
58822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58826      # Going to short mode and back again did indeed matter. Since short mode is
58827      # case insensitive, let's make it lowercase to improve readability.
58828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58829      # Now convert it back to Unix-style (cygpath)
58830      input_path=`$CYGPATH -u "$shortmode_path"`
58831      new_path="$input_path"
58832    fi
58833  fi
58834
58835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58836  if test "x$test_cygdrive_prefix" = x; then
58837    # As a simple fix, exclude /usr/bin since it's not a real path.
58838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58840      # a path prefixed by /cygdrive for fixpath to work.
58841      new_path="$CYGWIN_ROOT_PATH$input_path"
58842    fi
58843  fi
58844
58845
58846  if test "x$path" != "x$new_path"; then
58847    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58850  fi
58851
58852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58853
58854  path="$POTENTIAL_FREETYPE_LIB_PATH"
58855  has_colon=`$ECHO $path | $GREP ^.:`
58856  new_path="$path"
58857  if test "x$has_colon" = x; then
58858    # Not in mixed or Windows style, start by that.
58859    new_path=`cmd //c echo $path`
58860  fi
58861
58862
58863  input_path="$new_path"
58864  # Check if we need to convert this using DOS-style short mode. If the path
58865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58866  # take no chances and rewrite it.
58867  # Note: m4 eats our [], so we need to use [ and ] instead.
58868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58869  if test "x$has_forbidden_chars" != x; then
58870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58872  fi
58873
58874
58875  windows_path="$new_path"
58876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58877    unix_path=`$CYGPATH -u "$windows_path"`
58878    new_path="$unix_path"
58879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58881    new_path="$unix_path"
58882  fi
58883
58884  if test "x$path" != "x$new_path"; then
58885    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58888  fi
58889
58890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58892
58893    else
58894      # We're on a unix platform. Hooray! :)
58895      path="$POTENTIAL_FREETYPE_LIB_PATH"
58896      has_space=`$ECHO "$path" | $GREP " "`
58897      if test "x$has_space" != x; then
58898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58901      fi
58902
58903      # Use eval to expand a potential ~
58904      eval path="$path"
58905      if test ! -f "$path" && test ! -d "$path"; then
58906        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58907      fi
58908
58909      if test -d "$path"; then
58910        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58911      else
58912        dir="`$DIRNAME "$path"`"
58913        base="`$BASENAME "$path"`"
58914        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58915      fi
58916    fi
58917  fi
58918
58919
58920    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58922$as_echo_n "checking for freetype includes... " >&6; }
58923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58924$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58925    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58927$as_echo_n "checking for freetype libraries... " >&6; }
58928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58929$as_echo "$FREETYPE_LIB_PATH" >&6; }
58930  fi
58931
58932            else
58933
58934  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58935  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58936  METHOD="well-known location"
58937
58938  # Let's start with an optimistic view of the world :-)
58939  FOUND_FREETYPE=yes
58940
58941  # First look for the canonical freetype main include file ft2build.h.
58942  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58943    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58944    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58945    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58946      # Fail.
58947      FOUND_FREETYPE=no
58948    fi
58949  fi
58950
58951  if test "x$FOUND_FREETYPE" = xyes; then
58952    # Include file found, let's continue the sanity check.
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58954$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58955
58956    # Reset to default value
58957    FREETYPE_BASE_NAME=freetype
58958    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58959    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58960      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58961          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58962        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58963        # for the .6 version explicitly.
58964        FREETYPE_BASE_NAME=freetype.6
58965        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58966        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58967$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58968      else
58969        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58970$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58971        FOUND_FREETYPE=no
58972      fi
58973    else
58974      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58975        # On Windows, we will need both .lib and .dll file.
58976        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58977          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58978$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58979          FOUND_FREETYPE=no
58980        fi
58981      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58982          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58983        # Found lib in isa dir, use that instead.
58984        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58985        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58986$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58987      fi
58988    fi
58989  fi
58990
58991  if test "x$FOUND_FREETYPE" = xyes; then
58992
58993  # Only process if variable expands to non-empty
58994
58995  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58997
58998  # Input might be given as Windows format, start by converting to
58999  # unix format.
59000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59001  new_path=`$CYGPATH -u "$path"`
59002
59003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59006  # "foo.exe" is OK but "foo" is an error.
59007  #
59008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59009  # It is also a way to make sure we got the proper file name for the real test later on.
59010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59011  if test "x$test_shortpath" = x; then
59012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59015  fi
59016
59017  # Call helper function which possibly converts this using DOS-style short mode.
59018  # If so, the updated path is stored in $new_path.
59019
59020  input_path="$new_path"
59021  # Check if we need to convert this using DOS-style short mode. If the path
59022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59023  # take no chances and rewrite it.
59024  # Note: m4 eats our [], so we need to use [ and ] instead.
59025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59026  if test "x$has_forbidden_chars" != x; then
59027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59031      # Going to short mode and back again did indeed matter. Since short mode is
59032      # case insensitive, let's make it lowercase to improve readability.
59033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59034      # Now convert it back to Unix-style (cygpath)
59035      input_path=`$CYGPATH -u "$shortmode_path"`
59036      new_path="$input_path"
59037    fi
59038  fi
59039
59040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59041  if test "x$test_cygdrive_prefix" = x; then
59042    # As a simple fix, exclude /usr/bin since it's not a real path.
59043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59045      # a path prefixed by /cygdrive for fixpath to work.
59046      new_path="$CYGWIN_ROOT_PATH$input_path"
59047    fi
59048  fi
59049
59050
59051  if test "x$path" != "x$new_path"; then
59052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59055  fi
59056
59057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59058
59059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59060  has_colon=`$ECHO $path | $GREP ^.:`
59061  new_path="$path"
59062  if test "x$has_colon" = x; then
59063    # Not in mixed or Windows style, start by that.
59064    new_path=`cmd //c echo $path`
59065  fi
59066
59067
59068  input_path="$new_path"
59069  # Check if we need to convert this using DOS-style short mode. If the path
59070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59071  # take no chances and rewrite it.
59072  # Note: m4 eats our [], so we need to use [ and ] instead.
59073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59074  if test "x$has_forbidden_chars" != x; then
59075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59077  fi
59078
59079
59080  windows_path="$new_path"
59081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59082    unix_path=`$CYGPATH -u "$windows_path"`
59083    new_path="$unix_path"
59084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59086    new_path="$unix_path"
59087  fi
59088
59089  if test "x$path" != "x$new_path"; then
59090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59093  fi
59094
59095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59097
59098    else
59099      # We're on a unix platform. Hooray! :)
59100      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59101      has_space=`$ECHO "$path" | $GREP " "`
59102      if test "x$has_space" != x; then
59103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59106      fi
59107
59108      # Use eval to expand a potential ~
59109      eval path="$path"
59110      if test ! -f "$path" && test ! -d "$path"; then
59111        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59112      fi
59113
59114      if test -d "$path"; then
59115        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59116      else
59117        dir="`$DIRNAME "$path"`"
59118        base="`$BASENAME "$path"`"
59119        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59120      fi
59121    fi
59122  fi
59123
59124
59125  # Only process if variable expands to non-empty
59126
59127  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59128    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59129
59130  # Input might be given as Windows format, start by converting to
59131  # unix format.
59132  path="$POTENTIAL_FREETYPE_LIB_PATH"
59133  new_path=`$CYGPATH -u "$path"`
59134
59135  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59136  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59137  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59138  # "foo.exe" is OK but "foo" is an error.
59139  #
59140  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59141  # It is also a way to make sure we got the proper file name for the real test later on.
59142  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59143  if test "x$test_shortpath" = x; then
59144    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59146    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59147  fi
59148
59149  # Call helper function which possibly converts this using DOS-style short mode.
59150  # If so, the updated path is stored in $new_path.
59151
59152  input_path="$new_path"
59153  # Check if we need to convert this using DOS-style short mode. If the path
59154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59155  # take no chances and rewrite it.
59156  # Note: m4 eats our [], so we need to use [ and ] instead.
59157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59158  if test "x$has_forbidden_chars" != x; then
59159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59163      # Going to short mode and back again did indeed matter. Since short mode is
59164      # case insensitive, let's make it lowercase to improve readability.
59165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59166      # Now convert it back to Unix-style (cygpath)
59167      input_path=`$CYGPATH -u "$shortmode_path"`
59168      new_path="$input_path"
59169    fi
59170  fi
59171
59172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59173  if test "x$test_cygdrive_prefix" = x; then
59174    # As a simple fix, exclude /usr/bin since it's not a real path.
59175    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59177      # a path prefixed by /cygdrive for fixpath to work.
59178      new_path="$CYGWIN_ROOT_PATH$input_path"
59179    fi
59180  fi
59181
59182
59183  if test "x$path" != "x$new_path"; then
59184    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59187  fi
59188
59189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59190
59191  path="$POTENTIAL_FREETYPE_LIB_PATH"
59192  has_colon=`$ECHO $path | $GREP ^.:`
59193  new_path="$path"
59194  if test "x$has_colon" = x; then
59195    # Not in mixed or Windows style, start by that.
59196    new_path=`cmd //c echo $path`
59197  fi
59198
59199
59200  input_path="$new_path"
59201  # Check if we need to convert this using DOS-style short mode. If the path
59202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59203  # take no chances and rewrite it.
59204  # Note: m4 eats our [], so we need to use [ and ] instead.
59205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59206  if test "x$has_forbidden_chars" != x; then
59207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59209  fi
59210
59211
59212  windows_path="$new_path"
59213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59214    unix_path=`$CYGPATH -u "$windows_path"`
59215    new_path="$unix_path"
59216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59218    new_path="$unix_path"
59219  fi
59220
59221  if test "x$path" != "x$new_path"; then
59222    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59224$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59225  fi
59226
59227  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59228  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59229
59230    else
59231      # We're on a unix platform. Hooray! :)
59232      path="$POTENTIAL_FREETYPE_LIB_PATH"
59233      has_space=`$ECHO "$path" | $GREP " "`
59234      if test "x$has_space" != x; then
59235        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59236$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59237        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59238      fi
59239
59240      # Use eval to expand a potential ~
59241      eval path="$path"
59242      if test ! -f "$path" && test ! -d "$path"; then
59243        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59244      fi
59245
59246      if test -d "$path"; then
59247        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59248      else
59249        dir="`$DIRNAME "$path"`"
59250        base="`$BASENAME "$path"`"
59251        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59252      fi
59253    fi
59254  fi
59255
59256
59257    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59259$as_echo_n "checking for freetype includes... " >&6; }
59260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59261$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59262    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59264$as_echo_n "checking for freetype libraries... " >&6; }
59265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59266$as_echo "$FREETYPE_LIB_PATH" >&6; }
59267  fi
59268
59269            fi
59270            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59271                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59272              # Source is available, as a last resort try to build freetype in default location
59273
59274  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59275  BUILD_FREETYPE=yes
59276
59277  # Check if the freetype sources are acessible..
59278  if ! test -d $FREETYPE_SRC_PATH; then
59279    { $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
59280$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59281    BUILD_FREETYPE=no
59282  fi
59283  # ..and contain a vc2010 project file
59284  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59285  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59286    { $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
59287$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59288    BUILD_FREETYPE=no
59289  fi
59290  # Now check if configure found a version of 'msbuild.exe'
59291  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59292    { $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
59293$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;}
59294    BUILD_FREETYPE=no
59295  fi
59296
59297  # Ready to go..
59298  if test "x$BUILD_FREETYPE" = xyes; then
59299    # msbuild requires trailing slashes for output directories
59300    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59301    freetype_lib_path_unix="$freetype_lib_path"
59302    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59303
59304  unix_path="$vcxproj_path"
59305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59306    windows_path=`$CYGPATH -m "$unix_path"`
59307    vcxproj_path="$windows_path"
59308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59309    windows_path=`cmd //c echo $unix_path`
59310    vcxproj_path="$windows_path"
59311  fi
59312
59313
59314  unix_path="$freetype_lib_path"
59315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59316    windows_path=`$CYGPATH -m "$unix_path"`
59317    freetype_lib_path="$windows_path"
59318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59319    windows_path=`cmd //c echo $unix_path`
59320    freetype_lib_path="$windows_path"
59321  fi
59322
59323
59324  unix_path="$freetype_obj_path"
59325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59326    windows_path=`$CYGPATH -m "$unix_path"`
59327    freetype_obj_path="$windows_path"
59328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59329    windows_path=`cmd //c echo $unix_path`
59330    freetype_obj_path="$windows_path"
59331  fi
59332
59333    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59334      freetype_platform=x64
59335    else
59336      freetype_platform=win32
59337    fi
59338
59339    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59340    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59341    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59342    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59343    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59344$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59345
59346    # First we try to build the freetype.dll
59347    $ECHO -e "@echo off\n"\
59348        "$MSBUILD $vcxproj_path "\
59349        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59350        "/p:Configuration=\"Release Multithreaded\" "\
59351        "/p:Platform=$freetype_platform "\
59352        "/p:ConfigurationType=DynamicLibrary "\
59353        "/p:TargetName=freetype "\
59354        "/p:OutDir=\"$freetype_lib_path\" "\
59355        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59356    cmd /c freetype.bat
59357
59358    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59359      # If that succeeds we also build freetype.lib
59360      $ECHO -e "@echo off\n"\
59361          "$MSBUILD $vcxproj_path "\
59362          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59363          "/p:Configuration=\"Release Multithreaded\" "\
59364          "/p:Platform=$freetype_platform "\
59365          "/p:ConfigurationType=StaticLibrary "\
59366          "/p:TargetName=freetype "\
59367          "/p:OutDir=\"$freetype_lib_path\" "\
59368          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59369      cmd /c freetype.bat
59370
59371      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59372        # Once we build both, lib and dll, set freetype lib and include path appropriately
59373        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59374        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59375        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59376$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59377      else
59378        BUILD_FREETYPE=no
59379      fi
59380    else
59381      BUILD_FREETYPE=no
59382    fi
59383  fi
59384
59385              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59386
59387  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59388  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59389  METHOD="well-known location"
59390
59391  # Let's start with an optimistic view of the world :-)
59392  FOUND_FREETYPE=yes
59393
59394  # First look for the canonical freetype main include file ft2build.h.
59395  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59396    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59397    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59398    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59399      # Fail.
59400      FOUND_FREETYPE=no
59401    fi
59402  fi
59403
59404  if test "x$FOUND_FREETYPE" = xyes; then
59405    # Include file found, let's continue the sanity check.
59406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59407$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59408
59409    # Reset to default value
59410    FREETYPE_BASE_NAME=freetype
59411    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59412    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59413      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59414          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59415        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59416        # for the .6 version explicitly.
59417        FREETYPE_BASE_NAME=freetype.6
59418        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59419        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59420$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59421      else
59422        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59423$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59424        FOUND_FREETYPE=no
59425      fi
59426    else
59427      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59428        # On Windows, we will need both .lib and .dll file.
59429        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59430          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59431$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59432          FOUND_FREETYPE=no
59433        fi
59434      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59435          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59436        # Found lib in isa dir, use that instead.
59437        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59438        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59439$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59440      fi
59441    fi
59442  fi
59443
59444  if test "x$FOUND_FREETYPE" = xyes; then
59445
59446  # Only process if variable expands to non-empty
59447
59448  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59450
59451  # Input might be given as Windows format, start by converting to
59452  # unix format.
59453  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59454  new_path=`$CYGPATH -u "$path"`
59455
59456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59459  # "foo.exe" is OK but "foo" is an error.
59460  #
59461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59462  # It is also a way to make sure we got the proper file name for the real test later on.
59463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59464  if test "x$test_shortpath" = x; then
59465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59467    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59468  fi
59469
59470  # Call helper function which possibly converts this using DOS-style short mode.
59471  # If so, the updated path is stored in $new_path.
59472
59473  input_path="$new_path"
59474  # Check if we need to convert this using DOS-style short mode. If the path
59475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59476  # take no chances and rewrite it.
59477  # Note: m4 eats our [], so we need to use [ and ] instead.
59478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59479  if test "x$has_forbidden_chars" != x; then
59480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59484      # Going to short mode and back again did indeed matter. Since short mode is
59485      # case insensitive, let's make it lowercase to improve readability.
59486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59487      # Now convert it back to Unix-style (cygpath)
59488      input_path=`$CYGPATH -u "$shortmode_path"`
59489      new_path="$input_path"
59490    fi
59491  fi
59492
59493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59494  if test "x$test_cygdrive_prefix" = x; then
59495    # As a simple fix, exclude /usr/bin since it's not a real path.
59496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59498      # a path prefixed by /cygdrive for fixpath to work.
59499      new_path="$CYGWIN_ROOT_PATH$input_path"
59500    fi
59501  fi
59502
59503
59504  if test "x$path" != "x$new_path"; then
59505    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59507$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59508  fi
59509
59510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59511
59512  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59513  has_colon=`$ECHO $path | $GREP ^.:`
59514  new_path="$path"
59515  if test "x$has_colon" = x; then
59516    # Not in mixed or Windows style, start by that.
59517    new_path=`cmd //c echo $path`
59518  fi
59519
59520
59521  input_path="$new_path"
59522  # Check if we need to convert this using DOS-style short mode. If the path
59523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59524  # take no chances and rewrite it.
59525  # Note: m4 eats our [], so we need to use [ and ] instead.
59526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59527  if test "x$has_forbidden_chars" != x; then
59528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59530  fi
59531
59532
59533  windows_path="$new_path"
59534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59535    unix_path=`$CYGPATH -u "$windows_path"`
59536    new_path="$unix_path"
59537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59539    new_path="$unix_path"
59540  fi
59541
59542  if test "x$path" != "x$new_path"; then
59543    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59545$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59546  fi
59547
59548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59550
59551    else
59552      # We're on a unix platform. Hooray! :)
59553      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59554      has_space=`$ECHO "$path" | $GREP " "`
59555      if test "x$has_space" != x; then
59556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59558        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59559      fi
59560
59561      # Use eval to expand a potential ~
59562      eval path="$path"
59563      if test ! -f "$path" && test ! -d "$path"; then
59564        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59565      fi
59566
59567      if test -d "$path"; then
59568        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59569      else
59570        dir="`$DIRNAME "$path"`"
59571        base="`$BASENAME "$path"`"
59572        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59573      fi
59574    fi
59575  fi
59576
59577
59578  # Only process if variable expands to non-empty
59579
59580  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59582
59583  # Input might be given as Windows format, start by converting to
59584  # unix format.
59585  path="$POTENTIAL_FREETYPE_LIB_PATH"
59586  new_path=`$CYGPATH -u "$path"`
59587
59588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59591  # "foo.exe" is OK but "foo" is an error.
59592  #
59593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59594  # It is also a way to make sure we got the proper file name for the real test later on.
59595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59596  if test "x$test_shortpath" = x; then
59597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59599    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59600  fi
59601
59602  # Call helper function which possibly converts this using DOS-style short mode.
59603  # If so, the updated path is stored in $new_path.
59604
59605  input_path="$new_path"
59606  # Check if we need to convert this using DOS-style short mode. If the path
59607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59608  # take no chances and rewrite it.
59609  # Note: m4 eats our [], so we need to use [ and ] instead.
59610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59611  if test "x$has_forbidden_chars" != x; then
59612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59616      # Going to short mode and back again did indeed matter. Since short mode is
59617      # case insensitive, let's make it lowercase to improve readability.
59618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59619      # Now convert it back to Unix-style (cygpath)
59620      input_path=`$CYGPATH -u "$shortmode_path"`
59621      new_path="$input_path"
59622    fi
59623  fi
59624
59625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59626  if test "x$test_cygdrive_prefix" = x; then
59627    # As a simple fix, exclude /usr/bin since it's not a real path.
59628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59630      # a path prefixed by /cygdrive for fixpath to work.
59631      new_path="$CYGWIN_ROOT_PATH$input_path"
59632    fi
59633  fi
59634
59635
59636  if test "x$path" != "x$new_path"; then
59637    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59640  fi
59641
59642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59643
59644  path="$POTENTIAL_FREETYPE_LIB_PATH"
59645  has_colon=`$ECHO $path | $GREP ^.:`
59646  new_path="$path"
59647  if test "x$has_colon" = x; then
59648    # Not in mixed or Windows style, start by that.
59649    new_path=`cmd //c echo $path`
59650  fi
59651
59652
59653  input_path="$new_path"
59654  # Check if we need to convert this using DOS-style short mode. If the path
59655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59656  # take no chances and rewrite it.
59657  # Note: m4 eats our [], so we need to use [ and ] instead.
59658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59659  if test "x$has_forbidden_chars" != x; then
59660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59662  fi
59663
59664
59665  windows_path="$new_path"
59666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59667    unix_path=`$CYGPATH -u "$windows_path"`
59668    new_path="$unix_path"
59669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59671    new_path="$unix_path"
59672  fi
59673
59674  if test "x$path" != "x$new_path"; then
59675    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59678  fi
59679
59680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59682
59683    else
59684      # We're on a unix platform. Hooray! :)
59685      path="$POTENTIAL_FREETYPE_LIB_PATH"
59686      has_space=`$ECHO "$path" | $GREP " "`
59687      if test "x$has_space" != x; then
59688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59691      fi
59692
59693      # Use eval to expand a potential ~
59694      eval path="$path"
59695      if test ! -f "$path" && test ! -d "$path"; then
59696        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59697      fi
59698
59699      if test -d "$path"; then
59700        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59701      else
59702        dir="`$DIRNAME "$path"`"
59703        base="`$BASENAME "$path"`"
59704        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59705      fi
59706    fi
59707  fi
59708
59709
59710    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59712$as_echo_n "checking for freetype includes... " >&6; }
59713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59714$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59715    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59717$as_echo_n "checking for freetype libraries... " >&6; }
59718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59719$as_echo "$FREETYPE_LIB_PATH" >&6; }
59720  fi
59721
59722              else
59723
59724  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59725  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59726  METHOD="well-known location"
59727
59728  # Let's start with an optimistic view of the world :-)
59729  FOUND_FREETYPE=yes
59730
59731  # First look for the canonical freetype main include file ft2build.h.
59732  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59733    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59734    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59735    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59736      # Fail.
59737      FOUND_FREETYPE=no
59738    fi
59739  fi
59740
59741  if test "x$FOUND_FREETYPE" = xyes; then
59742    # Include file found, let's continue the sanity check.
59743    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59744$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59745
59746    # Reset to default value
59747    FREETYPE_BASE_NAME=freetype
59748    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59749    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59750      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59751          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59752        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59753        # for the .6 version explicitly.
59754        FREETYPE_BASE_NAME=freetype.6
59755        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59756        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59757$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59758      else
59759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59760$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59761        FOUND_FREETYPE=no
59762      fi
59763    else
59764      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59765        # On Windows, we will need both .lib and .dll file.
59766        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59767          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59768$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59769          FOUND_FREETYPE=no
59770        fi
59771      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59772          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59773        # Found lib in isa dir, use that instead.
59774        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59775        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59776$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59777      fi
59778    fi
59779  fi
59780
59781  if test "x$FOUND_FREETYPE" = xyes; then
59782
59783  # Only process if variable expands to non-empty
59784
59785  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59787
59788  # Input might be given as Windows format, start by converting to
59789  # unix format.
59790  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59791  new_path=`$CYGPATH -u "$path"`
59792
59793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59796  # "foo.exe" is OK but "foo" is an error.
59797  #
59798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59799  # It is also a way to make sure we got the proper file name for the real test later on.
59800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59801  if test "x$test_shortpath" = x; then
59802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59804    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59805  fi
59806
59807  # Call helper function which possibly converts this using DOS-style short mode.
59808  # If so, the updated path is stored in $new_path.
59809
59810  input_path="$new_path"
59811  # Check if we need to convert this using DOS-style short mode. If the path
59812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59813  # take no chances and rewrite it.
59814  # Note: m4 eats our [], so we need to use [ and ] instead.
59815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59816  if test "x$has_forbidden_chars" != x; then
59817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59821      # Going to short mode and back again did indeed matter. Since short mode is
59822      # case insensitive, let's make it lowercase to improve readability.
59823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59824      # Now convert it back to Unix-style (cygpath)
59825      input_path=`$CYGPATH -u "$shortmode_path"`
59826      new_path="$input_path"
59827    fi
59828  fi
59829
59830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59831  if test "x$test_cygdrive_prefix" = x; then
59832    # As a simple fix, exclude /usr/bin since it's not a real path.
59833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59835      # a path prefixed by /cygdrive for fixpath to work.
59836      new_path="$CYGWIN_ROOT_PATH$input_path"
59837    fi
59838  fi
59839
59840
59841  if test "x$path" != "x$new_path"; then
59842    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59844$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59845  fi
59846
59847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59848
59849  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59850  has_colon=`$ECHO $path | $GREP ^.:`
59851  new_path="$path"
59852  if test "x$has_colon" = x; then
59853    # Not in mixed or Windows style, start by that.
59854    new_path=`cmd //c echo $path`
59855  fi
59856
59857
59858  input_path="$new_path"
59859  # Check if we need to convert this using DOS-style short mode. If the path
59860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59861  # take no chances and rewrite it.
59862  # Note: m4 eats our [], so we need to use [ and ] instead.
59863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59864  if test "x$has_forbidden_chars" != x; then
59865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59867  fi
59868
59869
59870  windows_path="$new_path"
59871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59872    unix_path=`$CYGPATH -u "$windows_path"`
59873    new_path="$unix_path"
59874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59876    new_path="$unix_path"
59877  fi
59878
59879  if test "x$path" != "x$new_path"; then
59880    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59883  fi
59884
59885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59887
59888    else
59889      # We're on a unix platform. Hooray! :)
59890      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59891      has_space=`$ECHO "$path" | $GREP " "`
59892      if test "x$has_space" != x; then
59893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59895        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59896      fi
59897
59898      # Use eval to expand a potential ~
59899      eval path="$path"
59900      if test ! -f "$path" && test ! -d "$path"; then
59901        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59902      fi
59903
59904      if test -d "$path"; then
59905        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59906      else
59907        dir="`$DIRNAME "$path"`"
59908        base="`$BASENAME "$path"`"
59909        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59910      fi
59911    fi
59912  fi
59913
59914
59915  # Only process if variable expands to non-empty
59916
59917  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59919
59920  # Input might be given as Windows format, start by converting to
59921  # unix format.
59922  path="$POTENTIAL_FREETYPE_LIB_PATH"
59923  new_path=`$CYGPATH -u "$path"`
59924
59925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59928  # "foo.exe" is OK but "foo" is an error.
59929  #
59930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59931  # It is also a way to make sure we got the proper file name for the real test later on.
59932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59933  if test "x$test_shortpath" = x; then
59934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59936    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59937  fi
59938
59939  # Call helper function which possibly converts this using DOS-style short mode.
59940  # If so, the updated path is stored in $new_path.
59941
59942  input_path="$new_path"
59943  # Check if we need to convert this using DOS-style short mode. If the path
59944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59945  # take no chances and rewrite it.
59946  # Note: m4 eats our [], so we need to use [ and ] instead.
59947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59948  if test "x$has_forbidden_chars" != x; then
59949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59953      # Going to short mode and back again did indeed matter. Since short mode is
59954      # case insensitive, let's make it lowercase to improve readability.
59955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59956      # Now convert it back to Unix-style (cygpath)
59957      input_path=`$CYGPATH -u "$shortmode_path"`
59958      new_path="$input_path"
59959    fi
59960  fi
59961
59962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59963  if test "x$test_cygdrive_prefix" = x; then
59964    # As a simple fix, exclude /usr/bin since it's not a real path.
59965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59967      # a path prefixed by /cygdrive for fixpath to work.
59968      new_path="$CYGWIN_ROOT_PATH$input_path"
59969    fi
59970  fi
59971
59972
59973  if test "x$path" != "x$new_path"; then
59974    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59977  fi
59978
59979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59980
59981  path="$POTENTIAL_FREETYPE_LIB_PATH"
59982  has_colon=`$ECHO $path | $GREP ^.:`
59983  new_path="$path"
59984  if test "x$has_colon" = x; then
59985    # Not in mixed or Windows style, start by that.
59986    new_path=`cmd //c echo $path`
59987  fi
59988
59989
59990  input_path="$new_path"
59991  # Check if we need to convert this using DOS-style short mode. If the path
59992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59993  # take no chances and rewrite it.
59994  # Note: m4 eats our [], so we need to use [ and ] instead.
59995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59996  if test "x$has_forbidden_chars" != x; then
59997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59999  fi
60000
60001
60002  windows_path="$new_path"
60003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60004    unix_path=`$CYGPATH -u "$windows_path"`
60005    new_path="$unix_path"
60006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60008    new_path="$unix_path"
60009  fi
60010
60011  if test "x$path" != "x$new_path"; then
60012    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60015  fi
60016
60017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60019
60020    else
60021      # We're on a unix platform. Hooray! :)
60022      path="$POTENTIAL_FREETYPE_LIB_PATH"
60023      has_space=`$ECHO "$path" | $GREP " "`
60024      if test "x$has_space" != x; then
60025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60028      fi
60029
60030      # Use eval to expand a potential ~
60031      eval path="$path"
60032      if test ! -f "$path" && test ! -d "$path"; then
60033        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60034      fi
60035
60036      if test -d "$path"; then
60037        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60038      else
60039        dir="`$DIRNAME "$path"`"
60040        base="`$BASENAME "$path"`"
60041        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60042      fi
60043    fi
60044  fi
60045
60046
60047    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60049$as_echo_n "checking for freetype includes... " >&6; }
60050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60051$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60052    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60054$as_echo_n "checking for freetype libraries... " >&6; }
60055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60056$as_echo "$FREETYPE_LIB_PATH" >&6; }
60057  fi
60058
60059              fi
60060            fi
60061          fi
60062        else
60063          FREETYPE_BASE_DIR="$SYSROOT/usr"
60064
60065  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60066  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60067  METHOD="well-known location"
60068
60069  # Let's start with an optimistic view of the world :-)
60070  FOUND_FREETYPE=yes
60071
60072  # First look for the canonical freetype main include file ft2build.h.
60073  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60074    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60075    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60076    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60077      # Fail.
60078      FOUND_FREETYPE=no
60079    fi
60080  fi
60081
60082  if test "x$FOUND_FREETYPE" = xyes; then
60083    # Include file found, let's continue the sanity check.
60084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60085$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60086
60087    # Reset to default value
60088    FREETYPE_BASE_NAME=freetype
60089    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60090    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60091      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60092          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60093        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60094        # for the .6 version explicitly.
60095        FREETYPE_BASE_NAME=freetype.6
60096        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60097        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60098$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60099      else
60100        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60101$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60102        FOUND_FREETYPE=no
60103      fi
60104    else
60105      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60106        # On Windows, we will need both .lib and .dll file.
60107        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60108          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60109$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60110          FOUND_FREETYPE=no
60111        fi
60112      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60113          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60114        # Found lib in isa dir, use that instead.
60115        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60116        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60117$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60118      fi
60119    fi
60120  fi
60121
60122  if test "x$FOUND_FREETYPE" = xyes; then
60123
60124  # Only process if variable expands to non-empty
60125
60126  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60128
60129  # Input might be given as Windows format, start by converting to
60130  # unix format.
60131  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60132  new_path=`$CYGPATH -u "$path"`
60133
60134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60137  # "foo.exe" is OK but "foo" is an error.
60138  #
60139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60140  # It is also a way to make sure we got the proper file name for the real test later on.
60141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60142  if test "x$test_shortpath" = x; then
60143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60145    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60146  fi
60147
60148  # Call helper function which possibly converts this using DOS-style short mode.
60149  # If so, the updated path is stored in $new_path.
60150
60151  input_path="$new_path"
60152  # Check if we need to convert this using DOS-style short mode. If the path
60153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60154  # take no chances and rewrite it.
60155  # Note: m4 eats our [], so we need to use [ and ] instead.
60156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60157  if test "x$has_forbidden_chars" != x; then
60158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60162      # Going to short mode and back again did indeed matter. Since short mode is
60163      # case insensitive, let's make it lowercase to improve readability.
60164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60165      # Now convert it back to Unix-style (cygpath)
60166      input_path=`$CYGPATH -u "$shortmode_path"`
60167      new_path="$input_path"
60168    fi
60169  fi
60170
60171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60172  if test "x$test_cygdrive_prefix" = x; then
60173    # As a simple fix, exclude /usr/bin since it's not a real path.
60174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60176      # a path prefixed by /cygdrive for fixpath to work.
60177      new_path="$CYGWIN_ROOT_PATH$input_path"
60178    fi
60179  fi
60180
60181
60182  if test "x$path" != "x$new_path"; then
60183    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60185$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60186  fi
60187
60188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60189
60190  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60191  has_colon=`$ECHO $path | $GREP ^.:`
60192  new_path="$path"
60193  if test "x$has_colon" = x; then
60194    # Not in mixed or Windows style, start by that.
60195    new_path=`cmd //c echo $path`
60196  fi
60197
60198
60199  input_path="$new_path"
60200  # Check if we need to convert this using DOS-style short mode. If the path
60201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60202  # take no chances and rewrite it.
60203  # Note: m4 eats our [], so we need to use [ and ] instead.
60204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60205  if test "x$has_forbidden_chars" != x; then
60206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60208  fi
60209
60210
60211  windows_path="$new_path"
60212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60213    unix_path=`$CYGPATH -u "$windows_path"`
60214    new_path="$unix_path"
60215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60217    new_path="$unix_path"
60218  fi
60219
60220  if test "x$path" != "x$new_path"; then
60221    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60223$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60224  fi
60225
60226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60228
60229    else
60230      # We're on a unix platform. Hooray! :)
60231      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60232      has_space=`$ECHO "$path" | $GREP " "`
60233      if test "x$has_space" != x; then
60234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60237      fi
60238
60239      # Use eval to expand a potential ~
60240      eval path="$path"
60241      if test ! -f "$path" && test ! -d "$path"; then
60242        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60243      fi
60244
60245      if test -d "$path"; then
60246        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60247      else
60248        dir="`$DIRNAME "$path"`"
60249        base="`$BASENAME "$path"`"
60250        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60251      fi
60252    fi
60253  fi
60254
60255
60256  # Only process if variable expands to non-empty
60257
60258  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60260
60261  # Input might be given as Windows format, start by converting to
60262  # unix format.
60263  path="$POTENTIAL_FREETYPE_LIB_PATH"
60264  new_path=`$CYGPATH -u "$path"`
60265
60266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60269  # "foo.exe" is OK but "foo" is an error.
60270  #
60271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60272  # It is also a way to make sure we got the proper file name for the real test later on.
60273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60274  if test "x$test_shortpath" = x; then
60275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60277    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60278  fi
60279
60280  # Call helper function which possibly converts this using DOS-style short mode.
60281  # If so, the updated path is stored in $new_path.
60282
60283  input_path="$new_path"
60284  # Check if we need to convert this using DOS-style short mode. If the path
60285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60286  # take no chances and rewrite it.
60287  # Note: m4 eats our [], so we need to use [ and ] instead.
60288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60289  if test "x$has_forbidden_chars" != x; then
60290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60294      # Going to short mode and back again did indeed matter. Since short mode is
60295      # case insensitive, let's make it lowercase to improve readability.
60296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60297      # Now convert it back to Unix-style (cygpath)
60298      input_path=`$CYGPATH -u "$shortmode_path"`
60299      new_path="$input_path"
60300    fi
60301  fi
60302
60303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60304  if test "x$test_cygdrive_prefix" = x; then
60305    # As a simple fix, exclude /usr/bin since it's not a real path.
60306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60308      # a path prefixed by /cygdrive for fixpath to work.
60309      new_path="$CYGWIN_ROOT_PATH$input_path"
60310    fi
60311  fi
60312
60313
60314  if test "x$path" != "x$new_path"; then
60315    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60318  fi
60319
60320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60321
60322  path="$POTENTIAL_FREETYPE_LIB_PATH"
60323  has_colon=`$ECHO $path | $GREP ^.:`
60324  new_path="$path"
60325  if test "x$has_colon" = x; then
60326    # Not in mixed or Windows style, start by that.
60327    new_path=`cmd //c echo $path`
60328  fi
60329
60330
60331  input_path="$new_path"
60332  # Check if we need to convert this using DOS-style short mode. If the path
60333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60334  # take no chances and rewrite it.
60335  # Note: m4 eats our [], so we need to use [ and ] instead.
60336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60337  if test "x$has_forbidden_chars" != x; then
60338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60340  fi
60341
60342
60343  windows_path="$new_path"
60344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60345    unix_path=`$CYGPATH -u "$windows_path"`
60346    new_path="$unix_path"
60347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60349    new_path="$unix_path"
60350  fi
60351
60352  if test "x$path" != "x$new_path"; then
60353    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60356  fi
60357
60358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60360
60361    else
60362      # We're on a unix platform. Hooray! :)
60363      path="$POTENTIAL_FREETYPE_LIB_PATH"
60364      has_space=`$ECHO "$path" | $GREP " "`
60365      if test "x$has_space" != x; then
60366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60369      fi
60370
60371      # Use eval to expand a potential ~
60372      eval path="$path"
60373      if test ! -f "$path" && test ! -d "$path"; then
60374        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60375      fi
60376
60377      if test -d "$path"; then
60378        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60379      else
60380        dir="`$DIRNAME "$path"`"
60381        base="`$BASENAME "$path"`"
60382        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60383      fi
60384    fi
60385  fi
60386
60387
60388    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60390$as_echo_n "checking for freetype includes... " >&6; }
60391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60392$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60393    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60395$as_echo_n "checking for freetype libraries... " >&6; }
60396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60397$as_echo "$FREETYPE_LIB_PATH" >&6; }
60398  fi
60399
60400
60401          if test "x$FOUND_FREETYPE" != xyes; then
60402            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60403
60404  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60405  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60406  METHOD="well-known location"
60407
60408  # Let's start with an optimistic view of the world :-)
60409  FOUND_FREETYPE=yes
60410
60411  # First look for the canonical freetype main include file ft2build.h.
60412  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60413    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60414    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60415    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60416      # Fail.
60417      FOUND_FREETYPE=no
60418    fi
60419  fi
60420
60421  if test "x$FOUND_FREETYPE" = xyes; then
60422    # Include file found, let's continue the sanity check.
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60424$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60425
60426    # Reset to default value
60427    FREETYPE_BASE_NAME=freetype
60428    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60429    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60430      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60431          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60432        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60433        # for the .6 version explicitly.
60434        FREETYPE_BASE_NAME=freetype.6
60435        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60436        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60437$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60438      else
60439        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60440$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60441        FOUND_FREETYPE=no
60442      fi
60443    else
60444      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60445        # On Windows, we will need both .lib and .dll file.
60446        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60447          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60448$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60449          FOUND_FREETYPE=no
60450        fi
60451      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60452          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60453        # Found lib in isa dir, use that instead.
60454        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60455        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60456$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60457      fi
60458    fi
60459  fi
60460
60461  if test "x$FOUND_FREETYPE" = xyes; then
60462
60463  # Only process if variable expands to non-empty
60464
60465  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60467
60468  # Input might be given as Windows format, start by converting to
60469  # unix format.
60470  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60471  new_path=`$CYGPATH -u "$path"`
60472
60473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60476  # "foo.exe" is OK but "foo" is an error.
60477  #
60478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60479  # It is also a way to make sure we got the proper file name for the real test later on.
60480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60481  if test "x$test_shortpath" = x; then
60482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60483$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60484    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60485  fi
60486
60487  # Call helper function which possibly converts this using DOS-style short mode.
60488  # If so, the updated path is stored in $new_path.
60489
60490  input_path="$new_path"
60491  # Check if we need to convert this using DOS-style short mode. If the path
60492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60493  # take no chances and rewrite it.
60494  # Note: m4 eats our [], so we need to use [ and ] instead.
60495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60496  if test "x$has_forbidden_chars" != x; then
60497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60501      # Going to short mode and back again did indeed matter. Since short mode is
60502      # case insensitive, let's make it lowercase to improve readability.
60503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60504      # Now convert it back to Unix-style (cygpath)
60505      input_path=`$CYGPATH -u "$shortmode_path"`
60506      new_path="$input_path"
60507    fi
60508  fi
60509
60510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60511  if test "x$test_cygdrive_prefix" = x; then
60512    # As a simple fix, exclude /usr/bin since it's not a real path.
60513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60515      # a path prefixed by /cygdrive for fixpath to work.
60516      new_path="$CYGWIN_ROOT_PATH$input_path"
60517    fi
60518  fi
60519
60520
60521  if test "x$path" != "x$new_path"; then
60522    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60524$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60525  fi
60526
60527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60528
60529  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60530  has_colon=`$ECHO $path | $GREP ^.:`
60531  new_path="$path"
60532  if test "x$has_colon" = x; then
60533    # Not in mixed or Windows style, start by that.
60534    new_path=`cmd //c echo $path`
60535  fi
60536
60537
60538  input_path="$new_path"
60539  # Check if we need to convert this using DOS-style short mode. If the path
60540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60541  # take no chances and rewrite it.
60542  # Note: m4 eats our [], so we need to use [ and ] instead.
60543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60544  if test "x$has_forbidden_chars" != x; then
60545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60547  fi
60548
60549
60550  windows_path="$new_path"
60551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60552    unix_path=`$CYGPATH -u "$windows_path"`
60553    new_path="$unix_path"
60554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60556    new_path="$unix_path"
60557  fi
60558
60559  if test "x$path" != "x$new_path"; then
60560    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60562$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60563  fi
60564
60565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60567
60568    else
60569      # We're on a unix platform. Hooray! :)
60570      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60571      has_space=`$ECHO "$path" | $GREP " "`
60572      if test "x$has_space" != x; then
60573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60576      fi
60577
60578      # Use eval to expand a potential ~
60579      eval path="$path"
60580      if test ! -f "$path" && test ! -d "$path"; then
60581        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60582      fi
60583
60584      if test -d "$path"; then
60585        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60586      else
60587        dir="`$DIRNAME "$path"`"
60588        base="`$BASENAME "$path"`"
60589        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60590      fi
60591    fi
60592  fi
60593
60594
60595  # Only process if variable expands to non-empty
60596
60597  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60599
60600  # Input might be given as Windows format, start by converting to
60601  # unix format.
60602  path="$POTENTIAL_FREETYPE_LIB_PATH"
60603  new_path=`$CYGPATH -u "$path"`
60604
60605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60608  # "foo.exe" is OK but "foo" is an error.
60609  #
60610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60611  # It is also a way to make sure we got the proper file name for the real test later on.
60612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60613  if test "x$test_shortpath" = x; then
60614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60616    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60617  fi
60618
60619  # Call helper function which possibly converts this using DOS-style short mode.
60620  # If so, the updated path is stored in $new_path.
60621
60622  input_path="$new_path"
60623  # Check if we need to convert this using DOS-style short mode. If the path
60624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60625  # take no chances and rewrite it.
60626  # Note: m4 eats our [], so we need to use [ and ] instead.
60627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60628  if test "x$has_forbidden_chars" != x; then
60629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60633      # Going to short mode and back again did indeed matter. Since short mode is
60634      # case insensitive, let's make it lowercase to improve readability.
60635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60636      # Now convert it back to Unix-style (cygpath)
60637      input_path=`$CYGPATH -u "$shortmode_path"`
60638      new_path="$input_path"
60639    fi
60640  fi
60641
60642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60643  if test "x$test_cygdrive_prefix" = x; then
60644    # As a simple fix, exclude /usr/bin since it's not a real path.
60645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60647      # a path prefixed by /cygdrive for fixpath to work.
60648      new_path="$CYGWIN_ROOT_PATH$input_path"
60649    fi
60650  fi
60651
60652
60653  if test "x$path" != "x$new_path"; then
60654    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60657  fi
60658
60659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60660
60661  path="$POTENTIAL_FREETYPE_LIB_PATH"
60662  has_colon=`$ECHO $path | $GREP ^.:`
60663  new_path="$path"
60664  if test "x$has_colon" = x; then
60665    # Not in mixed or Windows style, start by that.
60666    new_path=`cmd //c echo $path`
60667  fi
60668
60669
60670  input_path="$new_path"
60671  # Check if we need to convert this using DOS-style short mode. If the path
60672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60673  # take no chances and rewrite it.
60674  # Note: m4 eats our [], so we need to use [ and ] instead.
60675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60676  if test "x$has_forbidden_chars" != x; then
60677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60679  fi
60680
60681
60682  windows_path="$new_path"
60683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60684    unix_path=`$CYGPATH -u "$windows_path"`
60685    new_path="$unix_path"
60686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60688    new_path="$unix_path"
60689  fi
60690
60691  if test "x$path" != "x$new_path"; then
60692    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60695  fi
60696
60697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60699
60700    else
60701      # We're on a unix platform. Hooray! :)
60702      path="$POTENTIAL_FREETYPE_LIB_PATH"
60703      has_space=`$ECHO "$path" | $GREP " "`
60704      if test "x$has_space" != x; then
60705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60706$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60707        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60708      fi
60709
60710      # Use eval to expand a potential ~
60711      eval path="$path"
60712      if test ! -f "$path" && test ! -d "$path"; then
60713        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60714      fi
60715
60716      if test -d "$path"; then
60717        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60718      else
60719        dir="`$DIRNAME "$path"`"
60720        base="`$BASENAME "$path"`"
60721        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60722      fi
60723    fi
60724  fi
60725
60726
60727    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60729$as_echo_n "checking for freetype includes... " >&6; }
60730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60731$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60732    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60734$as_echo_n "checking for freetype libraries... " >&6; }
60735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60736$as_echo "$FREETYPE_LIB_PATH" >&6; }
60737  fi
60738
60739          fi
60740
60741          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60742            if test "x$FOUND_FREETYPE" != xyes; then
60743              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60744              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60745
60746  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60747  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60748  METHOD="well-known location"
60749
60750  # Let's start with an optimistic view of the world :-)
60751  FOUND_FREETYPE=yes
60752
60753  # First look for the canonical freetype main include file ft2build.h.
60754  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60755    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60756    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60757    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60758      # Fail.
60759      FOUND_FREETYPE=no
60760    fi
60761  fi
60762
60763  if test "x$FOUND_FREETYPE" = xyes; then
60764    # Include file found, let's continue the sanity check.
60765    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60766$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60767
60768    # Reset to default value
60769    FREETYPE_BASE_NAME=freetype
60770    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60771    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60772      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60773          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60774        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60775        # for the .6 version explicitly.
60776        FREETYPE_BASE_NAME=freetype.6
60777        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60778        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60779$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60780      else
60781        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60782$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60783        FOUND_FREETYPE=no
60784      fi
60785    else
60786      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60787        # On Windows, we will need both .lib and .dll file.
60788        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60789          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60790$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60791          FOUND_FREETYPE=no
60792        fi
60793      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60794          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60795        # Found lib in isa dir, use that instead.
60796        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60797        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60798$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60799      fi
60800    fi
60801  fi
60802
60803  if test "x$FOUND_FREETYPE" = xyes; then
60804
60805  # Only process if variable expands to non-empty
60806
60807  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60809
60810  # Input might be given as Windows format, start by converting to
60811  # unix format.
60812  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60813  new_path=`$CYGPATH -u "$path"`
60814
60815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60818  # "foo.exe" is OK but "foo" is an error.
60819  #
60820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60821  # It is also a way to make sure we got the proper file name for the real test later on.
60822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60823  if test "x$test_shortpath" = x; then
60824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60825$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60826    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60827  fi
60828
60829  # Call helper function which possibly converts this using DOS-style short mode.
60830  # If so, the updated path is stored in $new_path.
60831
60832  input_path="$new_path"
60833  # Check if we need to convert this using DOS-style short mode. If the path
60834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60835  # take no chances and rewrite it.
60836  # Note: m4 eats our [], so we need to use [ and ] instead.
60837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60838  if test "x$has_forbidden_chars" != x; then
60839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60843      # Going to short mode and back again did indeed matter. Since short mode is
60844      # case insensitive, let's make it lowercase to improve readability.
60845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60846      # Now convert it back to Unix-style (cygpath)
60847      input_path=`$CYGPATH -u "$shortmode_path"`
60848      new_path="$input_path"
60849    fi
60850  fi
60851
60852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60853  if test "x$test_cygdrive_prefix" = x; then
60854    # As a simple fix, exclude /usr/bin since it's not a real path.
60855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60857      # a path prefixed by /cygdrive for fixpath to work.
60858      new_path="$CYGWIN_ROOT_PATH$input_path"
60859    fi
60860  fi
60861
60862
60863  if test "x$path" != "x$new_path"; then
60864    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60867  fi
60868
60869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60870
60871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60872  has_colon=`$ECHO $path | $GREP ^.:`
60873  new_path="$path"
60874  if test "x$has_colon" = x; then
60875    # Not in mixed or Windows style, start by that.
60876    new_path=`cmd //c echo $path`
60877  fi
60878
60879
60880  input_path="$new_path"
60881  # Check if we need to convert this using DOS-style short mode. If the path
60882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60883  # take no chances and rewrite it.
60884  # Note: m4 eats our [], so we need to use [ and ] instead.
60885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60886  if test "x$has_forbidden_chars" != x; then
60887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60889  fi
60890
60891
60892  windows_path="$new_path"
60893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60894    unix_path=`$CYGPATH -u "$windows_path"`
60895    new_path="$unix_path"
60896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60898    new_path="$unix_path"
60899  fi
60900
60901  if test "x$path" != "x$new_path"; then
60902    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60905  fi
60906
60907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60909
60910    else
60911      # We're on a unix platform. Hooray! :)
60912      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60913      has_space=`$ECHO "$path" | $GREP " "`
60914      if test "x$has_space" != x; then
60915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60918      fi
60919
60920      # Use eval to expand a potential ~
60921      eval path="$path"
60922      if test ! -f "$path" && test ! -d "$path"; then
60923        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60924      fi
60925
60926      if test -d "$path"; then
60927        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60928      else
60929        dir="`$DIRNAME "$path"`"
60930        base="`$BASENAME "$path"`"
60931        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60932      fi
60933    fi
60934  fi
60935
60936
60937  # Only process if variable expands to non-empty
60938
60939  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60941
60942  # Input might be given as Windows format, start by converting to
60943  # unix format.
60944  path="$POTENTIAL_FREETYPE_LIB_PATH"
60945  new_path=`$CYGPATH -u "$path"`
60946
60947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60950  # "foo.exe" is OK but "foo" is an error.
60951  #
60952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60953  # It is also a way to make sure we got the proper file name for the real test later on.
60954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60955  if test "x$test_shortpath" = x; then
60956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60957$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60958    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60959  fi
60960
60961  # Call helper function which possibly converts this using DOS-style short mode.
60962  # If so, the updated path is stored in $new_path.
60963
60964  input_path="$new_path"
60965  # Check if we need to convert this using DOS-style short mode. If the path
60966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60967  # take no chances and rewrite it.
60968  # Note: m4 eats our [], so we need to use [ and ] instead.
60969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60970  if test "x$has_forbidden_chars" != x; then
60971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60975      # Going to short mode and back again did indeed matter. Since short mode is
60976      # case insensitive, let's make it lowercase to improve readability.
60977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60978      # Now convert it back to Unix-style (cygpath)
60979      input_path=`$CYGPATH -u "$shortmode_path"`
60980      new_path="$input_path"
60981    fi
60982  fi
60983
60984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60985  if test "x$test_cygdrive_prefix" = x; then
60986    # As a simple fix, exclude /usr/bin since it's not a real path.
60987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60989      # a path prefixed by /cygdrive for fixpath to work.
60990      new_path="$CYGWIN_ROOT_PATH$input_path"
60991    fi
60992  fi
60993
60994
60995  if test "x$path" != "x$new_path"; then
60996    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60998$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60999  fi
61000
61001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61002
61003  path="$POTENTIAL_FREETYPE_LIB_PATH"
61004  has_colon=`$ECHO $path | $GREP ^.:`
61005  new_path="$path"
61006  if test "x$has_colon" = x; then
61007    # Not in mixed or Windows style, start by that.
61008    new_path=`cmd //c echo $path`
61009  fi
61010
61011
61012  input_path="$new_path"
61013  # Check if we need to convert this using DOS-style short mode. If the path
61014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61015  # take no chances and rewrite it.
61016  # Note: m4 eats our [], so we need to use [ and ] instead.
61017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61018  if test "x$has_forbidden_chars" != x; then
61019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61021  fi
61022
61023
61024  windows_path="$new_path"
61025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61026    unix_path=`$CYGPATH -u "$windows_path"`
61027    new_path="$unix_path"
61028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61030    new_path="$unix_path"
61031  fi
61032
61033  if test "x$path" != "x$new_path"; then
61034    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61037  fi
61038
61039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61041
61042    else
61043      # We're on a unix platform. Hooray! :)
61044      path="$POTENTIAL_FREETYPE_LIB_PATH"
61045      has_space=`$ECHO "$path" | $GREP " "`
61046      if test "x$has_space" != x; then
61047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61048$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61050      fi
61051
61052      # Use eval to expand a potential ~
61053      eval path="$path"
61054      if test ! -f "$path" && test ! -d "$path"; then
61055        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61056      fi
61057
61058      if test -d "$path"; then
61059        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61060      else
61061        dir="`$DIRNAME "$path"`"
61062        base="`$BASENAME "$path"`"
61063        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61064      fi
61065    fi
61066  fi
61067
61068
61069    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61071$as_echo_n "checking for freetype includes... " >&6; }
61072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61073$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61074    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61076$as_echo_n "checking for freetype libraries... " >&6; }
61077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61078$as_echo "$FREETYPE_LIB_PATH" >&6; }
61079  fi
61080
61081            fi
61082          fi
61083
61084          if test "x$FOUND_FREETYPE" != xyes; then
61085            FREETYPE_BASE_DIR="$SYSROOT/usr"
61086            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61087
61088  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61089  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61090  METHOD="well-known location"
61091
61092  # Let's start with an optimistic view of the world :-)
61093  FOUND_FREETYPE=yes
61094
61095  # First look for the canonical freetype main include file ft2build.h.
61096  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61097    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61098    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61099    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61100      # Fail.
61101      FOUND_FREETYPE=no
61102    fi
61103  fi
61104
61105  if test "x$FOUND_FREETYPE" = xyes; then
61106    # Include file found, let's continue the sanity check.
61107    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61108$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61109
61110    # Reset to default value
61111    FREETYPE_BASE_NAME=freetype
61112    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61113    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61114      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61115          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61116        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61117        # for the .6 version explicitly.
61118        FREETYPE_BASE_NAME=freetype.6
61119        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61120        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61121$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61122      else
61123        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61124$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61125        FOUND_FREETYPE=no
61126      fi
61127    else
61128      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61129        # On Windows, we will need both .lib and .dll file.
61130        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61131          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61132$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61133          FOUND_FREETYPE=no
61134        fi
61135      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61136          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61137        # Found lib in isa dir, use that instead.
61138        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61139        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61140$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61141      fi
61142    fi
61143  fi
61144
61145  if test "x$FOUND_FREETYPE" = xyes; then
61146
61147  # Only process if variable expands to non-empty
61148
61149  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61151
61152  # Input might be given as Windows format, start by converting to
61153  # unix format.
61154  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61155  new_path=`$CYGPATH -u "$path"`
61156
61157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61160  # "foo.exe" is OK but "foo" is an error.
61161  #
61162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61163  # It is also a way to make sure we got the proper file name for the real test later on.
61164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61165  if test "x$test_shortpath" = x; then
61166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61168    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61169  fi
61170
61171  # Call helper function which possibly converts this using DOS-style short mode.
61172  # If so, the updated path is stored in $new_path.
61173
61174  input_path="$new_path"
61175  # Check if we need to convert this using DOS-style short mode. If the path
61176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61177  # take no chances and rewrite it.
61178  # Note: m4 eats our [], so we need to use [ and ] instead.
61179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61180  if test "x$has_forbidden_chars" != x; then
61181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61185      # Going to short mode and back again did indeed matter. Since short mode is
61186      # case insensitive, let's make it lowercase to improve readability.
61187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61188      # Now convert it back to Unix-style (cygpath)
61189      input_path=`$CYGPATH -u "$shortmode_path"`
61190      new_path="$input_path"
61191    fi
61192  fi
61193
61194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61195  if test "x$test_cygdrive_prefix" = x; then
61196    # As a simple fix, exclude /usr/bin since it's not a real path.
61197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61199      # a path prefixed by /cygdrive for fixpath to work.
61200      new_path="$CYGWIN_ROOT_PATH$input_path"
61201    fi
61202  fi
61203
61204
61205  if test "x$path" != "x$new_path"; then
61206    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61208$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61209  fi
61210
61211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61212
61213  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61214  has_colon=`$ECHO $path | $GREP ^.:`
61215  new_path="$path"
61216  if test "x$has_colon" = x; then
61217    # Not in mixed or Windows style, start by that.
61218    new_path=`cmd //c echo $path`
61219  fi
61220
61221
61222  input_path="$new_path"
61223  # Check if we need to convert this using DOS-style short mode. If the path
61224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61225  # take no chances and rewrite it.
61226  # Note: m4 eats our [], so we need to use [ and ] instead.
61227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61228  if test "x$has_forbidden_chars" != x; then
61229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61231  fi
61232
61233
61234  windows_path="$new_path"
61235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61236    unix_path=`$CYGPATH -u "$windows_path"`
61237    new_path="$unix_path"
61238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61240    new_path="$unix_path"
61241  fi
61242
61243  if test "x$path" != "x$new_path"; then
61244    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61247  fi
61248
61249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61251
61252    else
61253      # We're on a unix platform. Hooray! :)
61254      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61255      has_space=`$ECHO "$path" | $GREP " "`
61256      if test "x$has_space" != x; then
61257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61260      fi
61261
61262      # Use eval to expand a potential ~
61263      eval path="$path"
61264      if test ! -f "$path" && test ! -d "$path"; then
61265        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61266      fi
61267
61268      if test -d "$path"; then
61269        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61270      else
61271        dir="`$DIRNAME "$path"`"
61272        base="`$BASENAME "$path"`"
61273        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61274      fi
61275    fi
61276  fi
61277
61278
61279  # Only process if variable expands to non-empty
61280
61281  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61283
61284  # Input might be given as Windows format, start by converting to
61285  # unix format.
61286  path="$POTENTIAL_FREETYPE_LIB_PATH"
61287  new_path=`$CYGPATH -u "$path"`
61288
61289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61292  # "foo.exe" is OK but "foo" is an error.
61293  #
61294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61295  # It is also a way to make sure we got the proper file name for the real test later on.
61296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61297  if test "x$test_shortpath" = x; then
61298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61300    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61301  fi
61302
61303  # Call helper function which possibly converts this using DOS-style short mode.
61304  # If so, the updated path is stored in $new_path.
61305
61306  input_path="$new_path"
61307  # Check if we need to convert this using DOS-style short mode. If the path
61308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61309  # take no chances and rewrite it.
61310  # Note: m4 eats our [], so we need to use [ and ] instead.
61311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61312  if test "x$has_forbidden_chars" != x; then
61313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61317      # Going to short mode and back again did indeed matter. Since short mode is
61318      # case insensitive, let's make it lowercase to improve readability.
61319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61320      # Now convert it back to Unix-style (cygpath)
61321      input_path=`$CYGPATH -u "$shortmode_path"`
61322      new_path="$input_path"
61323    fi
61324  fi
61325
61326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61327  if test "x$test_cygdrive_prefix" = x; then
61328    # As a simple fix, exclude /usr/bin since it's not a real path.
61329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61331      # a path prefixed by /cygdrive for fixpath to work.
61332      new_path="$CYGWIN_ROOT_PATH$input_path"
61333    fi
61334  fi
61335
61336
61337  if test "x$path" != "x$new_path"; then
61338    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61341  fi
61342
61343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61344
61345  path="$POTENTIAL_FREETYPE_LIB_PATH"
61346  has_colon=`$ECHO $path | $GREP ^.:`
61347  new_path="$path"
61348  if test "x$has_colon" = x; then
61349    # Not in mixed or Windows style, start by that.
61350    new_path=`cmd //c echo $path`
61351  fi
61352
61353
61354  input_path="$new_path"
61355  # Check if we need to convert this using DOS-style short mode. If the path
61356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61357  # take no chances and rewrite it.
61358  # Note: m4 eats our [], so we need to use [ and ] instead.
61359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61360  if test "x$has_forbidden_chars" != x; then
61361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61363  fi
61364
61365
61366  windows_path="$new_path"
61367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61368    unix_path=`$CYGPATH -u "$windows_path"`
61369    new_path="$unix_path"
61370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61372    new_path="$unix_path"
61373  fi
61374
61375  if test "x$path" != "x$new_path"; then
61376    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61379  fi
61380
61381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61383
61384    else
61385      # We're on a unix platform. Hooray! :)
61386      path="$POTENTIAL_FREETYPE_LIB_PATH"
61387      has_space=`$ECHO "$path" | $GREP " "`
61388      if test "x$has_space" != x; then
61389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61392      fi
61393
61394      # Use eval to expand a potential ~
61395      eval path="$path"
61396      if test ! -f "$path" && test ! -d "$path"; then
61397        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61398      fi
61399
61400      if test -d "$path"; then
61401        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61402      else
61403        dir="`$DIRNAME "$path"`"
61404        base="`$BASENAME "$path"`"
61405        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61406      fi
61407    fi
61408  fi
61409
61410
61411    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61413$as_echo_n "checking for freetype includes... " >&6; }
61414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61415$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61416    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61418$as_echo_n "checking for freetype libraries... " >&6; }
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61420$as_echo "$FREETYPE_LIB_PATH" >&6; }
61421  fi
61422
61423            else
61424
61425  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61426  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61427  METHOD="well-known location"
61428
61429  # Let's start with an optimistic view of the world :-)
61430  FOUND_FREETYPE=yes
61431
61432  # First look for the canonical freetype main include file ft2build.h.
61433  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61434    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61435    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61436    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61437      # Fail.
61438      FOUND_FREETYPE=no
61439    fi
61440  fi
61441
61442  if test "x$FOUND_FREETYPE" = xyes; then
61443    # Include file found, let's continue the sanity check.
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61445$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61446
61447    # Reset to default value
61448    FREETYPE_BASE_NAME=freetype
61449    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61450    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61451      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61452          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61453        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61454        # for the .6 version explicitly.
61455        FREETYPE_BASE_NAME=freetype.6
61456        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61457        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61458$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61459      else
61460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61462        FOUND_FREETYPE=no
61463      fi
61464    else
61465      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61466        # On Windows, we will need both .lib and .dll file.
61467        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61468          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61470          FOUND_FREETYPE=no
61471        fi
61472      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61473          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61474        # Found lib in isa dir, use that instead.
61475        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61476        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61477$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61478      fi
61479    fi
61480  fi
61481
61482  if test "x$FOUND_FREETYPE" = xyes; then
61483
61484  # Only process if variable expands to non-empty
61485
61486  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61488
61489  # Input might be given as Windows format, start by converting to
61490  # unix format.
61491  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61492  new_path=`$CYGPATH -u "$path"`
61493
61494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61497  # "foo.exe" is OK but "foo" is an error.
61498  #
61499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61500  # It is also a way to make sure we got the proper file name for the real test later on.
61501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61502  if test "x$test_shortpath" = x; then
61503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61505    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61506  fi
61507
61508  # Call helper function which possibly converts this using DOS-style short mode.
61509  # If so, the updated path is stored in $new_path.
61510
61511  input_path="$new_path"
61512  # Check if we need to convert this using DOS-style short mode. If the path
61513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61514  # take no chances and rewrite it.
61515  # Note: m4 eats our [], so we need to use [ and ] instead.
61516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61517  if test "x$has_forbidden_chars" != x; then
61518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61522      # Going to short mode and back again did indeed matter. Since short mode is
61523      # case insensitive, let's make it lowercase to improve readability.
61524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61525      # Now convert it back to Unix-style (cygpath)
61526      input_path=`$CYGPATH -u "$shortmode_path"`
61527      new_path="$input_path"
61528    fi
61529  fi
61530
61531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61532  if test "x$test_cygdrive_prefix" = x; then
61533    # As a simple fix, exclude /usr/bin since it's not a real path.
61534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61536      # a path prefixed by /cygdrive for fixpath to work.
61537      new_path="$CYGWIN_ROOT_PATH$input_path"
61538    fi
61539  fi
61540
61541
61542  if test "x$path" != "x$new_path"; then
61543    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61545$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61546  fi
61547
61548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61549
61550  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61551  has_colon=`$ECHO $path | $GREP ^.:`
61552  new_path="$path"
61553  if test "x$has_colon" = x; then
61554    # Not in mixed or Windows style, start by that.
61555    new_path=`cmd //c echo $path`
61556  fi
61557
61558
61559  input_path="$new_path"
61560  # Check if we need to convert this using DOS-style short mode. If the path
61561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61562  # take no chances and rewrite it.
61563  # Note: m4 eats our [], so we need to use [ and ] instead.
61564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61565  if test "x$has_forbidden_chars" != x; then
61566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61568  fi
61569
61570
61571  windows_path="$new_path"
61572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61573    unix_path=`$CYGPATH -u "$windows_path"`
61574    new_path="$unix_path"
61575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61577    new_path="$unix_path"
61578  fi
61579
61580  if test "x$path" != "x$new_path"; then
61581    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61584  fi
61585
61586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61588
61589    else
61590      # We're on a unix platform. Hooray! :)
61591      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61592      has_space=`$ECHO "$path" | $GREP " "`
61593      if test "x$has_space" != x; then
61594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61595$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61597      fi
61598
61599      # Use eval to expand a potential ~
61600      eval path="$path"
61601      if test ! -f "$path" && test ! -d "$path"; then
61602        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61603      fi
61604
61605      if test -d "$path"; then
61606        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61607      else
61608        dir="`$DIRNAME "$path"`"
61609        base="`$BASENAME "$path"`"
61610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61611      fi
61612    fi
61613  fi
61614
61615
61616  # Only process if variable expands to non-empty
61617
61618  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61620
61621  # Input might be given as Windows format, start by converting to
61622  # unix format.
61623  path="$POTENTIAL_FREETYPE_LIB_PATH"
61624  new_path=`$CYGPATH -u "$path"`
61625
61626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61629  # "foo.exe" is OK but "foo" is an error.
61630  #
61631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61632  # It is also a way to make sure we got the proper file name for the real test later on.
61633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61634  if test "x$test_shortpath" = x; then
61635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61637    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61638  fi
61639
61640  # Call helper function which possibly converts this using DOS-style short mode.
61641  # If so, the updated path is stored in $new_path.
61642
61643  input_path="$new_path"
61644  # Check if we need to convert this using DOS-style short mode. If the path
61645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61646  # take no chances and rewrite it.
61647  # Note: m4 eats our [], so we need to use [ and ] instead.
61648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61649  if test "x$has_forbidden_chars" != x; then
61650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61654      # Going to short mode and back again did indeed matter. Since short mode is
61655      # case insensitive, let's make it lowercase to improve readability.
61656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61657      # Now convert it back to Unix-style (cygpath)
61658      input_path=`$CYGPATH -u "$shortmode_path"`
61659      new_path="$input_path"
61660    fi
61661  fi
61662
61663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61664  if test "x$test_cygdrive_prefix" = x; then
61665    # As a simple fix, exclude /usr/bin since it's not a real path.
61666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61668      # a path prefixed by /cygdrive for fixpath to work.
61669      new_path="$CYGWIN_ROOT_PATH$input_path"
61670    fi
61671  fi
61672
61673
61674  if test "x$path" != "x$new_path"; then
61675    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61678  fi
61679
61680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61681
61682  path="$POTENTIAL_FREETYPE_LIB_PATH"
61683  has_colon=`$ECHO $path | $GREP ^.:`
61684  new_path="$path"
61685  if test "x$has_colon" = x; then
61686    # Not in mixed or Windows style, start by that.
61687    new_path=`cmd //c echo $path`
61688  fi
61689
61690
61691  input_path="$new_path"
61692  # Check if we need to convert this using DOS-style short mode. If the path
61693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61694  # take no chances and rewrite it.
61695  # Note: m4 eats our [], so we need to use [ and ] instead.
61696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61697  if test "x$has_forbidden_chars" != x; then
61698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61700  fi
61701
61702
61703  windows_path="$new_path"
61704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61705    unix_path=`$CYGPATH -u "$windows_path"`
61706    new_path="$unix_path"
61707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61709    new_path="$unix_path"
61710  fi
61711
61712  if test "x$path" != "x$new_path"; then
61713    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61716  fi
61717
61718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61720
61721    else
61722      # We're on a unix platform. Hooray! :)
61723      path="$POTENTIAL_FREETYPE_LIB_PATH"
61724      has_space=`$ECHO "$path" | $GREP " "`
61725      if test "x$has_space" != x; then
61726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61729      fi
61730
61731      # Use eval to expand a potential ~
61732      eval path="$path"
61733      if test ! -f "$path" && test ! -d "$path"; then
61734        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61735      fi
61736
61737      if test -d "$path"; then
61738        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61739      else
61740        dir="`$DIRNAME "$path"`"
61741        base="`$BASENAME "$path"`"
61742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61743      fi
61744    fi
61745  fi
61746
61747
61748    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61750$as_echo_n "checking for freetype includes... " >&6; }
61751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61752$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61753    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61755$as_echo_n "checking for freetype libraries... " >&6; }
61756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61757$as_echo "$FREETYPE_LIB_PATH" >&6; }
61758  fi
61759
61760              if test "x$FOUND_FREETYPE" != xyes; then
61761
61762  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61763  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61764  METHOD="well-known location"
61765
61766  # Let's start with an optimistic view of the world :-)
61767  FOUND_FREETYPE=yes
61768
61769  # First look for the canonical freetype main include file ft2build.h.
61770  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61771    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61772    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61773    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61774      # Fail.
61775      FOUND_FREETYPE=no
61776    fi
61777  fi
61778
61779  if test "x$FOUND_FREETYPE" = xyes; then
61780    # Include file found, let's continue the sanity check.
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61782$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61783
61784    # Reset to default value
61785    FREETYPE_BASE_NAME=freetype
61786    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61787    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61788      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61789          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61790        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61791        # for the .6 version explicitly.
61792        FREETYPE_BASE_NAME=freetype.6
61793        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61794        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61795$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61796      else
61797        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61798$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61799        FOUND_FREETYPE=no
61800      fi
61801    else
61802      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61803        # On Windows, we will need both .lib and .dll file.
61804        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61805          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61806$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61807          FOUND_FREETYPE=no
61808        fi
61809      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61810          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61811        # Found lib in isa dir, use that instead.
61812        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61813        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61814$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61815      fi
61816    fi
61817  fi
61818
61819  if test "x$FOUND_FREETYPE" = xyes; then
61820
61821  # Only process if variable expands to non-empty
61822
61823  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61825
61826  # Input might be given as Windows format, start by converting to
61827  # unix format.
61828  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61829  new_path=`$CYGPATH -u "$path"`
61830
61831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61834  # "foo.exe" is OK but "foo" is an error.
61835  #
61836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61837  # It is also a way to make sure we got the proper file name for the real test later on.
61838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61839  if test "x$test_shortpath" = x; then
61840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61842    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61843  fi
61844
61845  # Call helper function which possibly converts this using DOS-style short mode.
61846  # If so, the updated path is stored in $new_path.
61847
61848  input_path="$new_path"
61849  # Check if we need to convert this using DOS-style short mode. If the path
61850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61851  # take no chances and rewrite it.
61852  # Note: m4 eats our [], so we need to use [ and ] instead.
61853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61854  if test "x$has_forbidden_chars" != x; then
61855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61859      # Going to short mode and back again did indeed matter. Since short mode is
61860      # case insensitive, let's make it lowercase to improve readability.
61861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61862      # Now convert it back to Unix-style (cygpath)
61863      input_path=`$CYGPATH -u "$shortmode_path"`
61864      new_path="$input_path"
61865    fi
61866  fi
61867
61868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61869  if test "x$test_cygdrive_prefix" = x; then
61870    # As a simple fix, exclude /usr/bin since it's not a real path.
61871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61873      # a path prefixed by /cygdrive for fixpath to work.
61874      new_path="$CYGWIN_ROOT_PATH$input_path"
61875    fi
61876  fi
61877
61878
61879  if test "x$path" != "x$new_path"; then
61880    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61882$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61883  fi
61884
61885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61886
61887  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61888  has_colon=`$ECHO $path | $GREP ^.:`
61889  new_path="$path"
61890  if test "x$has_colon" = x; then
61891    # Not in mixed or Windows style, start by that.
61892    new_path=`cmd //c echo $path`
61893  fi
61894
61895
61896  input_path="$new_path"
61897  # Check if we need to convert this using DOS-style short mode. If the path
61898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61899  # take no chances and rewrite it.
61900  # Note: m4 eats our [], so we need to use [ and ] instead.
61901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61902  if test "x$has_forbidden_chars" != x; then
61903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61905  fi
61906
61907
61908  windows_path="$new_path"
61909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61910    unix_path=`$CYGPATH -u "$windows_path"`
61911    new_path="$unix_path"
61912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61914    new_path="$unix_path"
61915  fi
61916
61917  if test "x$path" != "x$new_path"; then
61918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61921  fi
61922
61923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61925
61926    else
61927      # We're on a unix platform. Hooray! :)
61928      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61929      has_space=`$ECHO "$path" | $GREP " "`
61930      if test "x$has_space" != x; then
61931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61934      fi
61935
61936      # Use eval to expand a potential ~
61937      eval path="$path"
61938      if test ! -f "$path" && test ! -d "$path"; then
61939        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61940      fi
61941
61942      if test -d "$path"; then
61943        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61944      else
61945        dir="`$DIRNAME "$path"`"
61946        base="`$BASENAME "$path"`"
61947        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61948      fi
61949    fi
61950  fi
61951
61952
61953  # Only process if variable expands to non-empty
61954
61955  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61957
61958  # Input might be given as Windows format, start by converting to
61959  # unix format.
61960  path="$POTENTIAL_FREETYPE_LIB_PATH"
61961  new_path=`$CYGPATH -u "$path"`
61962
61963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61966  # "foo.exe" is OK but "foo" is an error.
61967  #
61968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61969  # It is also a way to make sure we got the proper file name for the real test later on.
61970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61971  if test "x$test_shortpath" = x; then
61972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61974    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61975  fi
61976
61977  # Call helper function which possibly converts this using DOS-style short mode.
61978  # If so, the updated path is stored in $new_path.
61979
61980  input_path="$new_path"
61981  # Check if we need to convert this using DOS-style short mode. If the path
61982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61983  # take no chances and rewrite it.
61984  # Note: m4 eats our [], so we need to use [ and ] instead.
61985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61986  if test "x$has_forbidden_chars" != x; then
61987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61991      # Going to short mode and back again did indeed matter. Since short mode is
61992      # case insensitive, let's make it lowercase to improve readability.
61993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61994      # Now convert it back to Unix-style (cygpath)
61995      input_path=`$CYGPATH -u "$shortmode_path"`
61996      new_path="$input_path"
61997    fi
61998  fi
61999
62000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62001  if test "x$test_cygdrive_prefix" = x; then
62002    # As a simple fix, exclude /usr/bin since it's not a real path.
62003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62005      # a path prefixed by /cygdrive for fixpath to work.
62006      new_path="$CYGWIN_ROOT_PATH$input_path"
62007    fi
62008  fi
62009
62010
62011  if test "x$path" != "x$new_path"; then
62012    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62015  fi
62016
62017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62018
62019  path="$POTENTIAL_FREETYPE_LIB_PATH"
62020  has_colon=`$ECHO $path | $GREP ^.:`
62021  new_path="$path"
62022  if test "x$has_colon" = x; then
62023    # Not in mixed or Windows style, start by that.
62024    new_path=`cmd //c echo $path`
62025  fi
62026
62027
62028  input_path="$new_path"
62029  # Check if we need to convert this using DOS-style short mode. If the path
62030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62031  # take no chances and rewrite it.
62032  # Note: m4 eats our [], so we need to use [ and ] instead.
62033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62034  if test "x$has_forbidden_chars" != x; then
62035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62037  fi
62038
62039
62040  windows_path="$new_path"
62041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62042    unix_path=`$CYGPATH -u "$windows_path"`
62043    new_path="$unix_path"
62044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62046    new_path="$unix_path"
62047  fi
62048
62049  if test "x$path" != "x$new_path"; then
62050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62053  fi
62054
62055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62057
62058    else
62059      # We're on a unix platform. Hooray! :)
62060      path="$POTENTIAL_FREETYPE_LIB_PATH"
62061      has_space=`$ECHO "$path" | $GREP " "`
62062      if test "x$has_space" != x; then
62063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62066      fi
62067
62068      # Use eval to expand a potential ~
62069      eval path="$path"
62070      if test ! -f "$path" && test ! -d "$path"; then
62071        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62072      fi
62073
62074      if test -d "$path"; then
62075        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62076      else
62077        dir="`$DIRNAME "$path"`"
62078        base="`$BASENAME "$path"`"
62079        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62080      fi
62081    fi
62082  fi
62083
62084
62085    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62087$as_echo_n "checking for freetype includes... " >&6; }
62088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62089$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62090    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62092$as_echo_n "checking for freetype libraries... " >&6; }
62093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62094$as_echo "$FREETYPE_LIB_PATH" >&6; }
62095  fi
62096
62097              fi
62098            fi
62099          fi
62100        fi
62101      fi # end check in well-known locations
62102
62103      if test "x$FOUND_FREETYPE" != xyes; then
62104
62105  # Print a helpful message on how to acquire the necessary build dependency.
62106  # freetype is the help tag: freetype, cups, alsa etc
62107  MISSING_DEPENDENCY=freetype
62108
62109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62110    cygwin_help $MISSING_DEPENDENCY
62111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62112    msys_help $MISSING_DEPENDENCY
62113  else
62114    PKGHANDLER_COMMAND=
62115
62116    case $PKGHANDLER in
62117      apt-get)
62118        apt_help     $MISSING_DEPENDENCY ;;
62119      yum)
62120        yum_help     $MISSING_DEPENDENCY ;;
62121      port)
62122        port_help    $MISSING_DEPENDENCY ;;
62123      pkgutil)
62124        pkgutil_help $MISSING_DEPENDENCY ;;
62125      pkgadd)
62126        pkgadd_help  $MISSING_DEPENDENCY ;;
62127    esac
62128
62129    if test "x$PKGHANDLER_COMMAND" != x; then
62130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62131    fi
62132  fi
62133
62134        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62135      fi
62136    fi # end user specified settings
62137
62138    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62139    if test "x$FREETYPE_CFLAGS" = x; then
62140
62141  # Only process if variable expands to non-empty
62142
62143  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62145
62146  # Input might be given as Windows format, start by converting to
62147  # unix format.
62148  path="$FREETYPE_INCLUDE_PATH"
62149  new_path=`$CYGPATH -u "$path"`
62150
62151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62154  # "foo.exe" is OK but "foo" is an error.
62155  #
62156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62157  # It is also a way to make sure we got the proper file name for the real test later on.
62158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62159  if test "x$test_shortpath" = x; then
62160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62161$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62162    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62163  fi
62164
62165  # Call helper function which possibly converts this using DOS-style short mode.
62166  # If so, the updated path is stored in $new_path.
62167
62168  input_path="$new_path"
62169  # Check if we need to convert this using DOS-style short mode. If the path
62170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62171  # take no chances and rewrite it.
62172  # Note: m4 eats our [], so we need to use [ and ] instead.
62173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62174  if test "x$has_forbidden_chars" != x; then
62175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62179      # Going to short mode and back again did indeed matter. Since short mode is
62180      # case insensitive, let's make it lowercase to improve readability.
62181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62182      # Now convert it back to Unix-style (cygpath)
62183      input_path=`$CYGPATH -u "$shortmode_path"`
62184      new_path="$input_path"
62185    fi
62186  fi
62187
62188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62189  if test "x$test_cygdrive_prefix" = x; then
62190    # As a simple fix, exclude /usr/bin since it's not a real path.
62191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62193      # a path prefixed by /cygdrive for fixpath to work.
62194      new_path="$CYGWIN_ROOT_PATH$input_path"
62195    fi
62196  fi
62197
62198
62199  if test "x$path" != "x$new_path"; then
62200    FREETYPE_INCLUDE_PATH="$new_path"
62201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62202$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62203  fi
62204
62205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62206
62207  path="$FREETYPE_INCLUDE_PATH"
62208  has_colon=`$ECHO $path | $GREP ^.:`
62209  new_path="$path"
62210  if test "x$has_colon" = x; then
62211    # Not in mixed or Windows style, start by that.
62212    new_path=`cmd //c echo $path`
62213  fi
62214
62215
62216  input_path="$new_path"
62217  # Check if we need to convert this using DOS-style short mode. If the path
62218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62219  # take no chances and rewrite it.
62220  # Note: m4 eats our [], so we need to use [ and ] instead.
62221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62222  if test "x$has_forbidden_chars" != x; then
62223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62225  fi
62226
62227
62228  windows_path="$new_path"
62229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62230    unix_path=`$CYGPATH -u "$windows_path"`
62231    new_path="$unix_path"
62232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62234    new_path="$unix_path"
62235  fi
62236
62237  if test "x$path" != "x$new_path"; then
62238    FREETYPE_INCLUDE_PATH="$new_path"
62239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62240$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62241  fi
62242
62243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62245
62246    else
62247      # We're on a unix platform. Hooray! :)
62248      path="$FREETYPE_INCLUDE_PATH"
62249      has_space=`$ECHO "$path" | $GREP " "`
62250      if test "x$has_space" != x; then
62251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62252$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62254      fi
62255
62256      # Use eval to expand a potential ~
62257      eval path="$path"
62258      if test ! -f "$path" && test ! -d "$path"; then
62259        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62260      fi
62261
62262      if test -d "$path"; then
62263        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62264      else
62265        dir="`$DIRNAME "$path"`"
62266        base="`$BASENAME "$path"`"
62267        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62268      fi
62269    fi
62270  fi
62271
62272      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62273        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62274      else
62275        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62276      fi
62277    fi
62278
62279    if test "x$FREETYPE_LIBS" = x; then
62280
62281  # Only process if variable expands to non-empty
62282
62283  if test "x$FREETYPE_LIB_PATH" != x; then
62284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62285
62286  # Input might be given as Windows format, start by converting to
62287  # unix format.
62288  path="$FREETYPE_LIB_PATH"
62289  new_path=`$CYGPATH -u "$path"`
62290
62291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62294  # "foo.exe" is OK but "foo" is an error.
62295  #
62296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62297  # It is also a way to make sure we got the proper file name for the real test later on.
62298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62299  if test "x$test_shortpath" = x; then
62300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62301$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62302    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62303  fi
62304
62305  # Call helper function which possibly converts this using DOS-style short mode.
62306  # If so, the updated path is stored in $new_path.
62307
62308  input_path="$new_path"
62309  # Check if we need to convert this using DOS-style short mode. If the path
62310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62311  # take no chances and rewrite it.
62312  # Note: m4 eats our [], so we need to use [ and ] instead.
62313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62314  if test "x$has_forbidden_chars" != x; then
62315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62319      # Going to short mode and back again did indeed matter. Since short mode is
62320      # case insensitive, let's make it lowercase to improve readability.
62321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62322      # Now convert it back to Unix-style (cygpath)
62323      input_path=`$CYGPATH -u "$shortmode_path"`
62324      new_path="$input_path"
62325    fi
62326  fi
62327
62328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62329  if test "x$test_cygdrive_prefix" = x; then
62330    # As a simple fix, exclude /usr/bin since it's not a real path.
62331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62333      # a path prefixed by /cygdrive for fixpath to work.
62334      new_path="$CYGWIN_ROOT_PATH$input_path"
62335    fi
62336  fi
62337
62338
62339  if test "x$path" != "x$new_path"; then
62340    FREETYPE_LIB_PATH="$new_path"
62341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62342$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62343  fi
62344
62345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62346
62347  path="$FREETYPE_LIB_PATH"
62348  has_colon=`$ECHO $path | $GREP ^.:`
62349  new_path="$path"
62350  if test "x$has_colon" = x; then
62351    # Not in mixed or Windows style, start by that.
62352    new_path=`cmd //c echo $path`
62353  fi
62354
62355
62356  input_path="$new_path"
62357  # Check if we need to convert this using DOS-style short mode. If the path
62358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62359  # take no chances and rewrite it.
62360  # Note: m4 eats our [], so we need to use [ and ] instead.
62361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62362  if test "x$has_forbidden_chars" != x; then
62363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62365  fi
62366
62367
62368  windows_path="$new_path"
62369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62370    unix_path=`$CYGPATH -u "$windows_path"`
62371    new_path="$unix_path"
62372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62374    new_path="$unix_path"
62375  fi
62376
62377  if test "x$path" != "x$new_path"; then
62378    FREETYPE_LIB_PATH="$new_path"
62379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62380$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62381  fi
62382
62383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62385
62386    else
62387      # We're on a unix platform. Hooray! :)
62388      path="$FREETYPE_LIB_PATH"
62389      has_space=`$ECHO "$path" | $GREP " "`
62390      if test "x$has_space" != x; then
62391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62392$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62394      fi
62395
62396      # Use eval to expand a potential ~
62397      eval path="$path"
62398      if test ! -f "$path" && test ! -d "$path"; then
62399        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62400      fi
62401
62402      if test -d "$path"; then
62403        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62404      else
62405        dir="`$DIRNAME "$path"`"
62406        base="`$BASENAME "$path"`"
62407        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62408      fi
62409    fi
62410  fi
62411
62412      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62413        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62414      else
62415        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62416      fi
62417    fi
62418
62419    # Try to compile it
62420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62421$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62422    ac_ext=cpp
62423ac_cpp='$CXXCPP $CPPFLAGS'
62424ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62425ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62426ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62427
62428    PREV_CXXCFLAGS="$CXXFLAGS"
62429    PREV_LIBS="$LIBS"
62430    PREV_CXX="$CXX"
62431    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62432    LIBS="$LIBS $FREETYPE_LIBS"
62433    CXX="$FIXPATH $CXX"
62434    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62435/* end confdefs.h.  */
62436
62437          #include<ft2build.h>
62438          #include FT_FREETYPE_H
62439          int main () {
62440            FT_Init_FreeType(NULL);
62441            return 0;
62442          }
62443
62444_ACEOF
62445if ac_fn_cxx_try_link "$LINENO"; then :
62446
62447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62448$as_echo "yes" >&6; }
62449
62450else
62451
62452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62453$as_echo "no" >&6; }
62454          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62455$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62456          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62457$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62458
62459
62460  # Print a helpful message on how to acquire the necessary build dependency.
62461  # freetype is the help tag: freetype, cups, alsa etc
62462  MISSING_DEPENDENCY=freetype
62463
62464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62465    cygwin_help $MISSING_DEPENDENCY
62466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62467    msys_help $MISSING_DEPENDENCY
62468  else
62469    PKGHANDLER_COMMAND=
62470
62471    case $PKGHANDLER in
62472      apt-get)
62473        apt_help     $MISSING_DEPENDENCY ;;
62474      yum)
62475        yum_help     $MISSING_DEPENDENCY ;;
62476      port)
62477        port_help    $MISSING_DEPENDENCY ;;
62478      pkgutil)
62479        pkgutil_help $MISSING_DEPENDENCY ;;
62480      pkgadd)
62481        pkgadd_help  $MISSING_DEPENDENCY ;;
62482    esac
62483
62484    if test "x$PKGHANDLER_COMMAND" != x; then
62485      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62486    fi
62487  fi
62488
62489
62490          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62491
62492
62493fi
62494rm -f core conftest.err conftest.$ac_objext \
62495    conftest$ac_exeext conftest.$ac_ext
62496    CXXCFLAGS="$PREV_CXXFLAGS"
62497    LIBS="$PREV_LIBS"
62498    CXX="$PREV_CXX"
62499    ac_ext=cpp
62500ac_cpp='$CXXCPP $CPPFLAGS'
62501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62504
62505
62506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62507$as_echo_n "checking if we should bundle freetype... " >&6; }
62508    if test "x$BUNDLE_FREETYPE" = xyes; then
62509      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62510    fi
62511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62512$as_echo "$BUNDLE_FREETYPE" >&6; }
62513
62514  fi # end freetype needed
62515
62516
62517
62518
62519
62520
62521
62522# Check whether --with-alsa was given.
62523if test "${with_alsa+set}" = set; then :
62524  withval=$with_alsa;
62525fi
62526
62527
62528# Check whether --with-alsa-include was given.
62529if test "${with_alsa_include+set}" = set; then :
62530  withval=$with_alsa_include;
62531fi
62532
62533
62534# Check whether --with-alsa-lib was given.
62535if test "${with_alsa_lib+set}" = set; then :
62536  withval=$with_alsa_lib;
62537fi
62538
62539
62540  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62541    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62542        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62543        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62544      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62545$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62546    fi
62547    ALSA_CFLAGS=
62548    ALSA_LIBS=
62549  else
62550    ALSA_FOUND=no
62551
62552    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62553      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62554    fi
62555
62556    if test "x${with_alsa}" != x; then
62557      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62558      ALSA_CFLAGS="-I${with_alsa}/include"
62559      ALSA_FOUND=yes
62560    fi
62561    if test "x${with_alsa_include}" != x; then
62562      ALSA_CFLAGS="-I${with_alsa_include}"
62563      ALSA_FOUND=yes
62564    fi
62565    if test "x${with_alsa_lib}" != x; then
62566      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62567      ALSA_FOUND=yes
62568    fi
62569    # Do not try pkg-config if we have a sysroot set.
62570    if test "x$SYSROOT" = x; then
62571      if test "x$ALSA_FOUND" = xno; then
62572
62573pkg_failed=no
62574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62575$as_echo_n "checking for ALSA... " >&6; }
62576
62577if test -n "$ALSA_CFLAGS"; then
62578    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62579 elif test -n "$PKG_CONFIG"; then
62580    if test -n "$PKG_CONFIG" && \
62581    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62582  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62583  ac_status=$?
62584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62585  test $ac_status = 0; }; then
62586  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62587else
62588  pkg_failed=yes
62589fi
62590 else
62591    pkg_failed=untried
62592fi
62593if test -n "$ALSA_LIBS"; then
62594    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62595 elif test -n "$PKG_CONFIG"; then
62596    if test -n "$PKG_CONFIG" && \
62597    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62598  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62599  ac_status=$?
62600  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62601  test $ac_status = 0; }; then
62602  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62603else
62604  pkg_failed=yes
62605fi
62606 else
62607    pkg_failed=untried
62608fi
62609
62610
62611
62612if test $pkg_failed = yes; then
62613
62614if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62615        _pkg_short_errors_supported=yes
62616else
62617        _pkg_short_errors_supported=no
62618fi
62619        if test $_pkg_short_errors_supported = yes; then
62620	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62621        else
62622	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62623        fi
62624	# Put the nasty error message in config.log where it belongs
62625	echo "$ALSA_PKG_ERRORS" >&5
62626
62627	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62628$as_echo "no" >&6; }
62629                ALSA_FOUND=no
62630elif test $pkg_failed = untried; then
62631	ALSA_FOUND=no
62632else
62633	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62634	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62635        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62636$as_echo "yes" >&6; }
62637	ALSA_FOUND=yes
62638fi
62639      fi
62640    fi
62641    if test "x$ALSA_FOUND" = xno; then
62642      for ac_header in alsa/asoundlib.h
62643do :
62644  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62645if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62646  cat >>confdefs.h <<_ACEOF
62647#define HAVE_ALSA_ASOUNDLIB_H 1
62648_ACEOF
62649
62650            ALSA_FOUND=yes
62651            ALSA_CFLAGS=-Iignoreme
62652            ALSA_LIBS=-lasound
62653            DEFAULT_ALSA=yes
62654
62655else
62656  ALSA_FOUND=no
62657
62658fi
62659
62660done
62661
62662    fi
62663    if test "x$ALSA_FOUND" = xno; then
62664
62665  # Print a helpful message on how to acquire the necessary build dependency.
62666  # alsa is the help tag: freetype, cups, alsa etc
62667  MISSING_DEPENDENCY=alsa
62668
62669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62670    cygwin_help $MISSING_DEPENDENCY
62671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62672    msys_help $MISSING_DEPENDENCY
62673  else
62674    PKGHANDLER_COMMAND=
62675
62676    case $PKGHANDLER in
62677      apt-get)
62678        apt_help     $MISSING_DEPENDENCY ;;
62679      yum)
62680        yum_help     $MISSING_DEPENDENCY ;;
62681      port)
62682        port_help    $MISSING_DEPENDENCY ;;
62683      pkgutil)
62684        pkgutil_help $MISSING_DEPENDENCY ;;
62685      pkgadd)
62686        pkgadd_help  $MISSING_DEPENDENCY ;;
62687    esac
62688
62689    if test "x$PKGHANDLER_COMMAND" != x; then
62690      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62691    fi
62692  fi
62693
62694      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62695    fi
62696  fi
62697
62698
62699
62700
62701
62702
62703# Check whether --with-libffi was given.
62704if test "${with_libffi+set}" = set; then :
62705  withval=$with_libffi;
62706fi
62707
62708
62709# Check whether --with-libffi-include was given.
62710if test "${with_libffi_include+set}" = set; then :
62711  withval=$with_libffi_include;
62712fi
62713
62714
62715# Check whether --with-libffi-lib was given.
62716if test "${with_libffi_lib+set}" = set; then :
62717  withval=$with_libffi_lib;
62718fi
62719
62720
62721  if test "x$NEEDS_LIB_FFI" = xfalse; then
62722    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62723        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62724        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62725      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62726$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62727    fi
62728    LIBFFI_CFLAGS=
62729    LIBFFI_LIBS=
62730  else
62731    LIBFFI_FOUND=no
62732
62733    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62734      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62735    fi
62736
62737    if test "x${with_libffi}" != x; then
62738      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62739      LIBFFI_CFLAGS="-I${with_libffi}/include"
62740      LIBFFI_FOUND=yes
62741    fi
62742    if test "x${with_libffi_include}" != x; then
62743      LIBFFI_CFLAGS="-I${with_libffi_include}"
62744      LIBFFI_FOUND=yes
62745    fi
62746    if test "x${with_libffi_lib}" != x; then
62747      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62748      LIBFFI_FOUND=yes
62749    fi
62750    # Do not try pkg-config if we have a sysroot set.
62751    if test "x$SYSROOT" = x; then
62752      if test "x$LIBFFI_FOUND" = xno; then
62753        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62754
62755pkg_failed=no
62756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62757$as_echo_n "checking for LIBFFI... " >&6; }
62758
62759if test -n "$LIBFFI_CFLAGS"; then
62760    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62761 elif test -n "$PKG_CONFIG"; then
62762    if test -n "$PKG_CONFIG" && \
62763    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62764  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62765  ac_status=$?
62766  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62767  test $ac_status = 0; }; then
62768  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62769else
62770  pkg_failed=yes
62771fi
62772 else
62773    pkg_failed=untried
62774fi
62775if test -n "$LIBFFI_LIBS"; then
62776    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62777 elif test -n "$PKG_CONFIG"; then
62778    if test -n "$PKG_CONFIG" && \
62779    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62780  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62781  ac_status=$?
62782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62783  test $ac_status = 0; }; then
62784  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62785else
62786  pkg_failed=yes
62787fi
62788 else
62789    pkg_failed=untried
62790fi
62791
62792
62793
62794if test $pkg_failed = yes; then
62795
62796if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62797        _pkg_short_errors_supported=yes
62798else
62799        _pkg_short_errors_supported=no
62800fi
62801        if test $_pkg_short_errors_supported = yes; then
62802	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62803        else
62804	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62805        fi
62806	# Put the nasty error message in config.log where it belongs
62807	echo "$LIBFFI_PKG_ERRORS" >&5
62808
62809	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62810$as_echo "no" >&6; }
62811                LIBFFI_FOUND=no
62812elif test $pkg_failed = untried; then
62813	LIBFFI_FOUND=no
62814else
62815	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62816	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62818$as_echo "yes" >&6; }
62819	LIBFFI_FOUND=yes
62820fi
62821      fi
62822    fi
62823    if test "x$LIBFFI_FOUND" = xno; then
62824      for ac_header in ffi.h
62825do :
62826  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62827if test "x$ac_cv_header_ffi_h" = xyes; then :
62828  cat >>confdefs.h <<_ACEOF
62829#define HAVE_FFI_H 1
62830_ACEOF
62831
62832            LIBFFI_FOUND=yes
62833            LIBFFI_CFLAGS=
62834            LIBFFI_LIBS=-lffi
62835
62836else
62837  LIBFFI_FOUND=no
62838
62839fi
62840
62841done
62842
62843    fi
62844    if test "x$LIBFFI_FOUND" = xno; then
62845
62846  # Print a helpful message on how to acquire the necessary build dependency.
62847  # ffi is the help tag: freetype, cups, alsa etc
62848  MISSING_DEPENDENCY=ffi
62849
62850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62851    cygwin_help $MISSING_DEPENDENCY
62852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62853    msys_help $MISSING_DEPENDENCY
62854  else
62855    PKGHANDLER_COMMAND=
62856
62857    case $PKGHANDLER in
62858      apt-get)
62859        apt_help     $MISSING_DEPENDENCY ;;
62860      yum)
62861        yum_help     $MISSING_DEPENDENCY ;;
62862      port)
62863        port_help    $MISSING_DEPENDENCY ;;
62864      pkgutil)
62865        pkgutil_help $MISSING_DEPENDENCY ;;
62866      pkgadd)
62867        pkgadd_help  $MISSING_DEPENDENCY ;;
62868    esac
62869
62870    if test "x$PKGHANDLER_COMMAND" != x; then
62871      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62872    fi
62873  fi
62874
62875      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62876    fi
62877
62878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62879$as_echo_n "checking if libffi works... " >&6; }
62880    ac_ext=c
62881ac_cpp='$CPP $CPPFLAGS'
62882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62884ac_compiler_gnu=$ac_cv_c_compiler_gnu
62885
62886    OLD_CFLAGS="$CFLAGS"
62887    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62888    OLD_LIBS="$LIBS"
62889    LIBS="$LIBS $LIBFFI_LIBS"
62890    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62891/* end confdefs.h.  */
62892#include <ffi.h>
62893int
62894main ()
62895{
62896
62897          ffi_call(NULL, NULL, NULL, NULL);
62898          return 0;
62899
62900  ;
62901  return 0;
62902}
62903_ACEOF
62904if ac_fn_c_try_link "$LINENO"; then :
62905  LIBFFI_WORKS=yes
62906else
62907  LIBFFI_WORKS=no
62908
62909fi
62910rm -f core conftest.err conftest.$ac_objext \
62911    conftest$ac_exeext conftest.$ac_ext
62912    CFLAGS="$OLD_CFLAGS"
62913    LIBS="$OLD_LIBS"
62914    ac_ext=cpp
62915ac_cpp='$CXXCPP $CPPFLAGS'
62916ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62917ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62918ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62919
62920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62921$as_echo "$LIBFFI_WORKS" >&6; }
62922
62923    if test "x$LIBFFI_WORKS" = xno; then
62924
62925  # Print a helpful message on how to acquire the necessary build dependency.
62926  # ffi is the help tag: freetype, cups, alsa etc
62927  MISSING_DEPENDENCY=ffi
62928
62929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62930    cygwin_help $MISSING_DEPENDENCY
62931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62932    msys_help $MISSING_DEPENDENCY
62933  else
62934    PKGHANDLER_COMMAND=
62935
62936    case $PKGHANDLER in
62937      apt-get)
62938        apt_help     $MISSING_DEPENDENCY ;;
62939      yum)
62940        yum_help     $MISSING_DEPENDENCY ;;
62941      port)
62942        port_help    $MISSING_DEPENDENCY ;;
62943      pkgutil)
62944        pkgutil_help $MISSING_DEPENDENCY ;;
62945      pkgadd)
62946        pkgadd_help  $MISSING_DEPENDENCY ;;
62947    esac
62948
62949    if test "x$PKGHANDLER_COMMAND" != x; then
62950      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62951    fi
62952  fi
62953
62954      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62955    fi
62956  fi
62957
62958
62959
62960
62961
62962  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62963    # Extract the first word of "llvm-config", so it can be a program name with args.
62964set dummy llvm-config; ac_word=$2
62965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62966$as_echo_n "checking for $ac_word... " >&6; }
62967if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62968  $as_echo_n "(cached) " >&6
62969else
62970  if test -n "$LLVM_CONFIG"; then
62971  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62972else
62973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62974for as_dir in $PATH
62975do
62976  IFS=$as_save_IFS
62977  test -z "$as_dir" && as_dir=.
62978    for ac_exec_ext in '' $ac_executable_extensions; do
62979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62980    ac_cv_prog_LLVM_CONFIG="llvm-config"
62981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62982    break 2
62983  fi
62984done
62985  done
62986IFS=$as_save_IFS
62987
62988fi
62989fi
62990LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62991if test -n "$LLVM_CONFIG"; then
62992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62993$as_echo "$LLVM_CONFIG" >&6; }
62994else
62995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62996$as_echo "no" >&6; }
62997fi
62998
62999
63000
63001    if test "x$LLVM_CONFIG" != xllvm-config; then
63002      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63003    fi
63004
63005    llvm_components="jit mcjit engine nativecodegen native"
63006    unset LLVM_CFLAGS
63007    for flag in $("$LLVM_CONFIG" --cxxflags); do
63008      if echo "${flag}" | grep -q '^-[ID]'; then
63009        if test "${flag}" != "-D_DEBUG" ; then
63010          if test "${LLVM_CFLAGS}" != "" ; then
63011            LLVM_CFLAGS="${LLVM_CFLAGS} "
63012          fi
63013          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63014        fi
63015      fi
63016    done
63017    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63018    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63019
63020    unset LLVM_LDFLAGS
63021    for flag in $("${LLVM_CONFIG}" --ldflags); do
63022      if echo "${flag}" | grep -q '^-L'; then
63023        if test "${LLVM_LDFLAGS}" != ""; then
63024          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63025        fi
63026        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63027      fi
63028    done
63029
63030    unset LLVM_LIBS
63031    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63032      if echo "${flag}" | grep -q '^-l'; then
63033        if test "${LLVM_LIBS}" != ""; then
63034          LLVM_LIBS="${LLVM_LIBS} "
63035        fi
63036        LLVM_LIBS="${LLVM_LIBS}${flag}"
63037      fi
63038    done
63039
63040    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63041    # always properly detect -ltinfo
63042    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63043
63044
63045
63046
63047  fi
63048
63049
63050
63051# Check whether --with-libjpeg was given.
63052if test "${with_libjpeg+set}" = set; then :
63053  withval=$with_libjpeg;
63054fi
63055
63056
63057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63058$as_echo_n "checking for which libjpeg to use... " >&6; }
63059  # default is bundled
63060  DEFAULT_LIBJPEG=bundled
63061  # if user didn't specify, use DEFAULT_LIBJPEG
63062  if test "x${with_libjpeg}" = "x"; then
63063    with_libjpeg=${DEFAULT_LIBJPEG}
63064  fi
63065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63066$as_echo "${with_libjpeg}" >&6; }
63067
63068  if test "x${with_libjpeg}" = "xbundled"; then
63069    USE_EXTERNAL_LIBJPEG=false
63070  elif test "x${with_libjpeg}" = "xsystem"; then
63071    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63072if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63073
63074else
63075   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63076fi
63077
63078
63079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63080$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63081if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63082  $as_echo_n "(cached) " >&6
63083else
63084  ac_check_lib_save_LIBS=$LIBS
63085LIBS="-ljpeg  $LIBS"
63086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63087/* end confdefs.h.  */
63088
63089/* Override any GCC internal prototype to avoid an error.
63090   Use char because int might match the return type of a GCC
63091   builtin and then its argument prototype would still apply.  */
63092#ifdef __cplusplus
63093extern "C"
63094#endif
63095char jpeg_CreateDecompress ();
63096int
63097main ()
63098{
63099return jpeg_CreateDecompress ();
63100  ;
63101  return 0;
63102}
63103_ACEOF
63104if ac_fn_cxx_try_link "$LINENO"; then :
63105  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63106else
63107  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63108fi
63109rm -f core conftest.err conftest.$ac_objext \
63110    conftest$ac_exeext conftest.$ac_ext
63111LIBS=$ac_check_lib_save_LIBS
63112fi
63113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63114$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63115if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63116  cat >>confdefs.h <<_ACEOF
63117#define HAVE_LIBJPEG 1
63118_ACEOF
63119
63120  LIBS="-ljpeg $LIBS"
63121
63122else
63123   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63124fi
63125
63126
63127    USE_EXTERNAL_LIBJPEG=true
63128  else
63129    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63130  fi
63131
63132
63133
63134
63135
63136# Check whether --with-giflib was given.
63137if test "${with_giflib+set}" = set; then :
63138  withval=$with_giflib;
63139fi
63140
63141
63142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63143$as_echo_n "checking for which giflib to use... " >&6; }
63144  # default is bundled
63145  DEFAULT_GIFLIB=bundled
63146  # if user didn't specify, use DEFAULT_GIFLIB
63147  if test "x${with_giflib}" = "x"; then
63148    with_giflib=${DEFAULT_GIFLIB}
63149  fi
63150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63151$as_echo "${with_giflib}" >&6; }
63152
63153  if test "x${with_giflib}" = "xbundled"; then
63154    USE_EXTERNAL_LIBGIF=false
63155  elif test "x${with_giflib}" = "xsystem"; then
63156    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63157if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63158
63159else
63160   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63161fi
63162
63163
63164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63165$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63166if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63167  $as_echo_n "(cached) " >&6
63168else
63169  ac_check_lib_save_LIBS=$LIBS
63170LIBS="-lgif  $LIBS"
63171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63172/* end confdefs.h.  */
63173
63174/* Override any GCC internal prototype to avoid an error.
63175   Use char because int might match the return type of a GCC
63176   builtin and then its argument prototype would still apply.  */
63177#ifdef __cplusplus
63178extern "C"
63179#endif
63180char DGifGetCode ();
63181int
63182main ()
63183{
63184return DGifGetCode ();
63185  ;
63186  return 0;
63187}
63188_ACEOF
63189if ac_fn_cxx_try_link "$LINENO"; then :
63190  ac_cv_lib_gif_DGifGetCode=yes
63191else
63192  ac_cv_lib_gif_DGifGetCode=no
63193fi
63194rm -f core conftest.err conftest.$ac_objext \
63195    conftest$ac_exeext conftest.$ac_ext
63196LIBS=$ac_check_lib_save_LIBS
63197fi
63198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63199$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63200if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63201  cat >>confdefs.h <<_ACEOF
63202#define HAVE_LIBGIF 1
63203_ACEOF
63204
63205  LIBS="-lgif $LIBS"
63206
63207else
63208   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63209fi
63210
63211
63212    USE_EXTERNAL_LIBGIF=true
63213  else
63214    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63215  fi
63216
63217
63218
63219
63220
63221# Check whether --with-libpng was given.
63222if test "${with_libpng+set}" = set; then :
63223  withval=$with_libpng;
63224fi
63225
63226
63227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63228$as_echo_n "checking for which libpng to use... " >&6; }
63229
63230  # default is bundled
63231  DEFAULT_LIBPNG=bundled
63232  # if user didn't specify, use DEFAULT_LIBPNG
63233  if test "x${with_libpng}" = "x"; then
63234      with_libpng=${DEFAULT_LIBPNG}
63235  fi
63236
63237  if test "x${with_libpng}" = "xbundled"; then
63238      USE_EXTERNAL_LIBPNG=false
63239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63240$as_echo "bundled" >&6; }
63241  elif test "x${with_libpng}" = "xsystem"; then
63242
63243pkg_failed=no
63244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63245$as_echo_n "checking for PNG... " >&6; }
63246
63247if test -n "$PNG_CFLAGS"; then
63248    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63249 elif test -n "$PKG_CONFIG"; then
63250    if test -n "$PKG_CONFIG" && \
63251    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63252  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63253  ac_status=$?
63254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63255  test $ac_status = 0; }; then
63256  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63257else
63258  pkg_failed=yes
63259fi
63260 else
63261    pkg_failed=untried
63262fi
63263if test -n "$PNG_LIBS"; then
63264    pkg_cv_PNG_LIBS="$PNG_LIBS"
63265 elif test -n "$PKG_CONFIG"; then
63266    if test -n "$PKG_CONFIG" && \
63267    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63268  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63269  ac_status=$?
63270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63271  test $ac_status = 0; }; then
63272  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63273else
63274  pkg_failed=yes
63275fi
63276 else
63277    pkg_failed=untried
63278fi
63279
63280
63281
63282if test $pkg_failed = yes; then
63283
63284if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63285        _pkg_short_errors_supported=yes
63286else
63287        _pkg_short_errors_supported=no
63288fi
63289        if test $_pkg_short_errors_supported = yes; then
63290	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63291        else
63292	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63293        fi
63294	# Put the nasty error message in config.log where it belongs
63295	echo "$PNG_PKG_ERRORS" >&5
63296
63297	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63298$as_echo "no" >&6; }
63299                 LIBPNG_FOUND=no
63300elif test $pkg_failed = untried; then
63301	 LIBPNG_FOUND=no
63302else
63303	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63304	PNG_LIBS=$pkg_cv_PNG_LIBS
63305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63306$as_echo "yes" >&6; }
63307	 LIBPNG_FOUND=yes
63308fi
63309      if test "x${LIBPNG_FOUND}" = "xyes"; then
63310          USE_EXTERNAL_LIBPNG=true
63311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63312$as_echo "system" >&6; }
63313      else
63314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63315$as_echo "system not found" >&6; }
63316          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63317      fi
63318  else
63319      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63320  fi
63321
63322
63323
63324
63325
63326# Check whether --with-zlib was given.
63327if test "${with_zlib+set}" = set; then :
63328  withval=$with_zlib;
63329fi
63330
63331
63332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63333$as_echo_n "checking for compress in -lz... " >&6; }
63334if ${ac_cv_lib_z_compress+:} false; then :
63335  $as_echo_n "(cached) " >&6
63336else
63337  ac_check_lib_save_LIBS=$LIBS
63338LIBS="-lz  $LIBS"
63339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63340/* end confdefs.h.  */
63341
63342/* Override any GCC internal prototype to avoid an error.
63343   Use char because int might match the return type of a GCC
63344   builtin and then its argument prototype would still apply.  */
63345#ifdef __cplusplus
63346extern "C"
63347#endif
63348char compress ();
63349int
63350main ()
63351{
63352return compress ();
63353  ;
63354  return 0;
63355}
63356_ACEOF
63357if ac_fn_cxx_try_link "$LINENO"; then :
63358  ac_cv_lib_z_compress=yes
63359else
63360  ac_cv_lib_z_compress=no
63361fi
63362rm -f core conftest.err conftest.$ac_objext \
63363    conftest$ac_exeext conftest.$ac_ext
63364LIBS=$ac_check_lib_save_LIBS
63365fi
63366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63367$as_echo "$ac_cv_lib_z_compress" >&6; }
63368if test "x$ac_cv_lib_z_compress" = xyes; then :
63369   ZLIB_FOUND=yes
63370else
63371   ZLIB_FOUND=no
63372fi
63373
63374
63375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63376$as_echo_n "checking for which zlib to use... " >&6; }
63377
63378  DEFAULT_ZLIB=system
63379  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63380    # On windows default is bundled...on others default is system
63381    DEFAULT_ZLIB=bundled
63382  fi
63383
63384  if test "x${ZLIB_FOUND}" != "xyes"; then
63385    # If we don't find any system...set default to bundled
63386    DEFAULT_ZLIB=bundled
63387  fi
63388
63389  # If user didn't specify, use DEFAULT_ZLIB
63390  if test "x${with_zlib}" = "x"; then
63391    with_zlib=${DEFAULT_ZLIB}
63392  fi
63393
63394  if test "x${with_zlib}" = "xbundled"; then
63395    USE_EXTERNAL_LIBZ=false
63396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63397$as_echo "bundled" >&6; }
63398  elif test "x${with_zlib}" = "xsystem"; then
63399    if test "x${ZLIB_FOUND}" = "xyes"; then
63400      USE_EXTERNAL_LIBZ=true
63401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63402$as_echo "system" >&6; }
63403    else
63404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63405$as_echo "system not found" >&6; }
63406      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63407    fi
63408  else
63409    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63410  fi
63411
63412
63413
63414
63415
63416# Check whether --with-lcms was given.
63417if test "${with_lcms+set}" = set; then :
63418  withval=$with_lcms;
63419fi
63420
63421
63422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63423$as_echo_n "checking for which lcms to use... " >&6; }
63424
63425  DEFAULT_LCMS=bundled
63426  # If user didn't specify, use DEFAULT_LCMS
63427  if test "x${with_lcms}" = "x"; then
63428      with_lcms=${DEFAULT_LCMS}
63429  fi
63430
63431  if test "x${with_lcms}" = "xbundled"; then
63432    USE_EXTERNAL_LCMS=false
63433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63434$as_echo "bundled" >&6; }
63435  elif test "x${with_lcms}" = "xsystem"; then
63436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63437$as_echo "system" >&6; }
63438
63439pkg_failed=no
63440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63441$as_echo_n "checking for LCMS... " >&6; }
63442
63443if test -n "$LCMS_CFLAGS"; then
63444    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63445 elif test -n "$PKG_CONFIG"; then
63446    if test -n "$PKG_CONFIG" && \
63447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63448  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63449  ac_status=$?
63450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63451  test $ac_status = 0; }; then
63452  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63453else
63454  pkg_failed=yes
63455fi
63456 else
63457    pkg_failed=untried
63458fi
63459if test -n "$LCMS_LIBS"; then
63460    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63461 elif test -n "$PKG_CONFIG"; then
63462    if test -n "$PKG_CONFIG" && \
63463    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63464  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63465  ac_status=$?
63466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63467  test $ac_status = 0; }; then
63468  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63469else
63470  pkg_failed=yes
63471fi
63472 else
63473    pkg_failed=untried
63474fi
63475
63476
63477
63478if test $pkg_failed = yes; then
63479
63480if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63481        _pkg_short_errors_supported=yes
63482else
63483        _pkg_short_errors_supported=no
63484fi
63485        if test $_pkg_short_errors_supported = yes; then
63486	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63487        else
63488	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63489        fi
63490	# Put the nasty error message in config.log where it belongs
63491	echo "$LCMS_PKG_ERRORS" >&5
63492
63493	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63494$as_echo "no" >&6; }
63495                LCMS_FOUND=no
63496elif test $pkg_failed = untried; then
63497	LCMS_FOUND=no
63498else
63499	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63500	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63502$as_echo "yes" >&6; }
63503	LCMS_FOUND=yes
63504fi
63505    if test "x${LCMS_FOUND}" = "xyes"; then
63506      USE_EXTERNAL_LCMS=true
63507    else
63508      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63509    fi
63510  else
63511    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63512  fi
63513
63514
63515
63516
63517
63518
63519
63520
63521
63522
63523
63524  # Setup libm (the maths library)
63525  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63527$as_echo_n "checking for cos in -lm... " >&6; }
63528if ${ac_cv_lib_m_cos+:} false; then :
63529  $as_echo_n "(cached) " >&6
63530else
63531  ac_check_lib_save_LIBS=$LIBS
63532LIBS="-lm  $LIBS"
63533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63534/* end confdefs.h.  */
63535
63536/* Override any GCC internal prototype to avoid an error.
63537   Use char because int might match the return type of a GCC
63538   builtin and then its argument prototype would still apply.  */
63539#ifdef __cplusplus
63540extern "C"
63541#endif
63542char cos ();
63543int
63544main ()
63545{
63546return cos ();
63547  ;
63548  return 0;
63549}
63550_ACEOF
63551if ac_fn_cxx_try_link "$LINENO"; then :
63552  ac_cv_lib_m_cos=yes
63553else
63554  ac_cv_lib_m_cos=no
63555fi
63556rm -f core conftest.err conftest.$ac_objext \
63557    conftest$ac_exeext conftest.$ac_ext
63558LIBS=$ac_check_lib_save_LIBS
63559fi
63560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63561$as_echo "$ac_cv_lib_m_cos" >&6; }
63562if test "x$ac_cv_lib_m_cos" = xyes; then :
63563  cat >>confdefs.h <<_ACEOF
63564#define HAVE_LIBM 1
63565_ACEOF
63566
63567  LIBS="-lm $LIBS"
63568
63569else
63570
63571        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63572$as_echo "$as_me: Maths library was not found" >&6;}
63573
63574fi
63575
63576    LIBM="-lm"
63577  else
63578    LIBM=""
63579  fi
63580
63581
63582  # Setup libdl (for dynamic library loading)
63583  save_LIBS="$LIBS"
63584  LIBS=""
63585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63586$as_echo_n "checking for dlopen in -ldl... " >&6; }
63587if ${ac_cv_lib_dl_dlopen+:} false; then :
63588  $as_echo_n "(cached) " >&6
63589else
63590  ac_check_lib_save_LIBS=$LIBS
63591LIBS="-ldl  $LIBS"
63592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63593/* end confdefs.h.  */
63594
63595/* Override any GCC internal prototype to avoid an error.
63596   Use char because int might match the return type of a GCC
63597   builtin and then its argument prototype would still apply.  */
63598#ifdef __cplusplus
63599extern "C"
63600#endif
63601char dlopen ();
63602int
63603main ()
63604{
63605return dlopen ();
63606  ;
63607  return 0;
63608}
63609_ACEOF
63610if ac_fn_cxx_try_link "$LINENO"; then :
63611  ac_cv_lib_dl_dlopen=yes
63612else
63613  ac_cv_lib_dl_dlopen=no
63614fi
63615rm -f core conftest.err conftest.$ac_objext \
63616    conftest$ac_exeext conftest.$ac_ext
63617LIBS=$ac_check_lib_save_LIBS
63618fi
63619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63620$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63621if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63622  cat >>confdefs.h <<_ACEOF
63623#define HAVE_LIBDL 1
63624_ACEOF
63625
63626  LIBS="-ldl $LIBS"
63627
63628fi
63629
63630  LIBDL="$LIBS"
63631
63632  LIBS="$save_LIBS"
63633
63634  # Deprecated libraries, keep the flags for backwards compatibility
63635  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63636
63637
63638# Check whether --with-dxsdk was given.
63639if test "${with_dxsdk+set}" = set; then :
63640  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63641$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63642fi
63643
63644
63645
63646
63647# Check whether --with-dxsdk-lib was given.
63648if test "${with_dxsdk_lib+set}" = set; then :
63649  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63650$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63651fi
63652
63653
63654
63655
63656# Check whether --with-dxsdk-include was given.
63657if test "${with_dxsdk_include+set}" = set; then :
63658  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63659$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63660fi
63661
63662
63663  fi
63664
63665  # Control if libzip can use mmap. Available for purposes of overriding.
63666  LIBZIP_CAN_USE_MMAP=true
63667
63668
63669
63670  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63671    # Find the root of the Solaris Studio installation from the compiler path
63672    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63673    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63675$as_echo_n "checking for libstlport.so.1... " >&6; }
63676    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63677      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63678      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63679    fi
63680    if test -f "$STLPORT_LIB"; then
63681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63682$as_echo "yes, $STLPORT_LIB" >&6; }
63683
63684  # Only process if variable expands to non-empty
63685
63686  if test "x$STLPORT_LIB" != x; then
63687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63688
63689  # Input might be given as Windows format, start by converting to
63690  # unix format.
63691  path="$STLPORT_LIB"
63692  new_path=`$CYGPATH -u "$path"`
63693
63694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63697  # "foo.exe" is OK but "foo" is an error.
63698  #
63699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63700  # It is also a way to make sure we got the proper file name for the real test later on.
63701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63702  if test "x$test_shortpath" = x; then
63703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63704$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63705    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63706  fi
63707
63708  # Call helper function which possibly converts this using DOS-style short mode.
63709  # If so, the updated path is stored in $new_path.
63710
63711  input_path="$new_path"
63712  # Check if we need to convert this using DOS-style short mode. If the path
63713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63714  # take no chances and rewrite it.
63715  # Note: m4 eats our [], so we need to use [ and ] instead.
63716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63717  if test "x$has_forbidden_chars" != x; then
63718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63722      # Going to short mode and back again did indeed matter. Since short mode is
63723      # case insensitive, let's make it lowercase to improve readability.
63724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63725      # Now convert it back to Unix-style (cygpath)
63726      input_path=`$CYGPATH -u "$shortmode_path"`
63727      new_path="$input_path"
63728    fi
63729  fi
63730
63731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63732  if test "x$test_cygdrive_prefix" = x; then
63733    # As a simple fix, exclude /usr/bin since it's not a real path.
63734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63736      # a path prefixed by /cygdrive for fixpath to work.
63737      new_path="$CYGWIN_ROOT_PATH$input_path"
63738    fi
63739  fi
63740
63741
63742  if test "x$path" != "x$new_path"; then
63743    STLPORT_LIB="$new_path"
63744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63745$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63746  fi
63747
63748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63749
63750  path="$STLPORT_LIB"
63751  has_colon=`$ECHO $path | $GREP ^.:`
63752  new_path="$path"
63753  if test "x$has_colon" = x; then
63754    # Not in mixed or Windows style, start by that.
63755    new_path=`cmd //c echo $path`
63756  fi
63757
63758
63759  input_path="$new_path"
63760  # Check if we need to convert this using DOS-style short mode. If the path
63761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63762  # take no chances and rewrite it.
63763  # Note: m4 eats our [], so we need to use [ and ] instead.
63764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63765  if test "x$has_forbidden_chars" != x; then
63766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63768  fi
63769
63770
63771  windows_path="$new_path"
63772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63773    unix_path=`$CYGPATH -u "$windows_path"`
63774    new_path="$unix_path"
63775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63777    new_path="$unix_path"
63778  fi
63779
63780  if test "x$path" != "x$new_path"; then
63781    STLPORT_LIB="$new_path"
63782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63783$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63784  fi
63785
63786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63788
63789    else
63790      # We're on a unix platform. Hooray! :)
63791      path="$STLPORT_LIB"
63792      has_space=`$ECHO "$path" | $GREP " "`
63793      if test "x$has_space" != x; then
63794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63795$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63797      fi
63798
63799      # Use eval to expand a potential ~
63800      eval path="$path"
63801      if test ! -f "$path" && test ! -d "$path"; then
63802        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63803      fi
63804
63805      if test -d "$path"; then
63806        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63807      else
63808        dir="`$DIRNAME "$path"`"
63809        base="`$BASENAME "$path"`"
63810        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63811      fi
63812    fi
63813  fi
63814
63815    else
63816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63817$as_echo "no, not found at $STLPORT_LIB" >&6; }
63818      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63819    fi
63820
63821  fi
63822
63823
63824
63825
63826
63827
63828
63829
63830
63831
63832
63833
63834
63835
63836###############################################################################
63837#
63838# We need to do some final tweaking, when everything else is done.
63839#
63840###############################################################################
63841
63842
63843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63844$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63845
63846  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63847    ENABLE_INTREE_EC=yes
63848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63849$as_echo "yes" >&6; }
63850  else
63851    ENABLE_INTREE_EC=no
63852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63853$as_echo "no" >&6; }
63854  fi
63855
63856
63857
63858
63859  # Check whether --enable-jtreg-failure-handler was given.
63860if test "${enable_jtreg_failure_handler+set}" = set; then :
63861  enableval=$enable_jtreg_failure_handler;
63862fi
63863
63864
63865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63866$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63867
63868  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63869    if test "x$JT_HOME" = "x"; then
63870      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63871    else
63872      BUILD_FAILURE_HANDLER=true
63873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63874$as_echo "yes, forced" >&6; }
63875    fi
63876  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63877    BUILD_FAILURE_HANDLER=false
63878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63879$as_echo "no, forced" >&6; }
63880  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63881      || test "x$enable_jtreg_failure_handler" = "x"; then
63882    if test "x$JT_HOME" = "x"; then
63883      BUILD_FAILURE_HANDLER=false
63884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63885$as_echo "no, missing jtreg" >&6; }
63886    else
63887      BUILD_FAILURE_HANDLER=true
63888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63889$as_echo "yes, jtreg present" >&6; }
63890    fi
63891  else
63892    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63893  fi
63894
63895
63896
63897
63898  # Check whether --enable-generate-classlist was given.
63899if test "${enable_generate_classlist+set}" = set; then :
63900  enableval=$enable_generate_classlist;
63901fi
63902
63903
63904  # Check if it's likely that it's possible to generate the classlist. Depending
63905  # on exact jvm configuration it could be possible anyway.
63906  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63907    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63908  else
63909    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63910  fi
63911
63912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63913$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63914  if test "x$enable_generate_classlist" = "xyes"; then
63915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63916$as_echo "yes, forced" >&6; }
63917    ENABLE_GENERATE_CLASSLIST="true"
63918    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63919      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63920$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63921    fi
63922  elif test "x$enable_generate_classlist" = "xno"; then
63923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63924$as_echo "no, forced" >&6; }
63925    ENABLE_GENERATE_CLASSLIST="false"
63926  elif test "x$enable_generate_classlist" = "x"; then
63927    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63929$as_echo "yes" >&6; }
63930      ENABLE_GENERATE_CLASSLIST="true"
63931    else
63932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63933$as_echo "no" >&6; }
63934      ENABLE_GENERATE_CLASSLIST="false"
63935    fi
63936  else
63937    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63938  fi
63939
63940
63941
63942
63943###############################################################################
63944#
63945# Configure parts of the build that only affect the build performance,
63946# not the result.
63947#
63948###############################################################################
63949
63950
63951  # How many cores do we have on this build system?
63952
63953# Check whether --with-num-cores was given.
63954if test "${with_num_cores+set}" = set; then :
63955  withval=$with_num_cores;
63956fi
63957
63958  if test "x$with_num_cores" = x; then
63959    # The number of cores were not specified, try to probe them.
63960
63961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63962$as_echo_n "checking for number of cores... " >&6; }
63963  NUM_CORES=1
63964  FOUND_CORES=no
63965
63966  if test -f /proc/cpuinfo; then
63967    # Looks like a Linux (or cygwin) system
63968    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63969    FOUND_CORES=yes
63970  elif test -x /usr/sbin/psrinfo; then
63971    # Looks like a Solaris system
63972    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63973    FOUND_CORES=yes
63974  elif test -x /usr/sbin/sysctl; then
63975    # Looks like a MacOSX system
63976    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63977    FOUND_CORES=yes
63978  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63979    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63980    FOUND_CORES=yes
63981  elif test -n "$NUMBER_OF_PROCESSORS"; then
63982    # On windows, look in the env
63983    NUM_CORES=$NUMBER_OF_PROCESSORS
63984    FOUND_CORES=yes
63985  fi
63986
63987  if test "x$FOUND_CORES" = xyes; then
63988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63989$as_echo "$NUM_CORES" >&6; }
63990  else
63991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63992$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63993    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63994$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63995  fi
63996
63997  else
63998    NUM_CORES=$with_num_cores
63999  fi
64000
64001
64002
64003  # How much memory do we have on this build system?
64004
64005# Check whether --with-memory-size was given.
64006if test "${with_memory_size+set}" = set; then :
64007  withval=$with_memory_size;
64008fi
64009
64010  if test "x$with_memory_size" = x; then
64011    # The memory size was not specified, try to probe it.
64012
64013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64014$as_echo_n "checking for memory size... " >&6; }
64015  # Default to 1024 MB
64016  MEMORY_SIZE=1024
64017  FOUND_MEM=no
64018
64019  if test -f /proc/meminfo; then
64020    # Looks like a Linux (or cygwin) system
64021    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64022    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64023    FOUND_MEM=yes
64024  elif test -x /usr/sbin/prtconf; then
64025    # Looks like a Solaris or AIX system
64026    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64027    FOUND_MEM=yes
64028  elif test -x /usr/sbin/sysctl; then
64029    # Looks like a MacOSX system
64030    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64031    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64032    FOUND_MEM=yes
64033  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64034    # Windows, but without cygwin
64035    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64036    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64037    FOUND_MEM=yes
64038  fi
64039
64040  if test "x$FOUND_MEM" = xyes; then
64041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64042$as_echo "$MEMORY_SIZE MB" >&6; }
64043  else
64044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64045$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64046    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64047$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64048  fi
64049
64050  else
64051    MEMORY_SIZE=$with_memory_size
64052  fi
64053
64054
64055
64056  # Provide a decent default number of parallel jobs for make depending on
64057  # number of cores, amount of memory and machine architecture.
64058
64059# Check whether --with-jobs was given.
64060if test "${with_jobs+set}" = set; then :
64061  withval=$with_jobs;
64062fi
64063
64064  if test "x$with_jobs" = x; then
64065    # Number of jobs was not specified, calculate.
64066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64067$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64068    # Approximate memory in GB.
64069    memory_gb=`expr $MEMORY_SIZE / 1024`
64070    # Pick the lowest of memory in gb and number of cores.
64071    if test "$memory_gb" -lt "$NUM_CORES"; then
64072      JOBS="$memory_gb"
64073    else
64074      JOBS="$NUM_CORES"
64075    fi
64076    if test "$JOBS" -eq "0"; then
64077      JOBS=1
64078    fi
64079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64080$as_echo "$JOBS" >&6; }
64081  else
64082    JOBS=$with_jobs
64083  fi
64084
64085
64086
64087  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64088
64089# Check whether --with-test-jobs was given.
64090if test "${with_test_jobs+set}" = set; then :
64091  withval=$with_test_jobs;
64092fi
64093
64094  if test "x$with_test_jobs" = x; then
64095      TEST_JOBS=0
64096  else
64097      TEST_JOBS=$with_test_jobs
64098  fi
64099
64100
64101
64102# Setup arguments for the boot jdk (after cores and memory have been setup)
64103
64104  ##############################################################################
64105  #
64106  # Specify jvm options for anything that is run with the Boot JDK.
64107  # Not all JVM:s accept the same arguments on the command line.
64108  #
64109
64110# Check whether --with-boot-jdk-jvmargs was given.
64111if test "${with_boot_jdk_jvmargs+set}" = set; then :
64112  withval=$with_boot_jdk_jvmargs;
64113fi
64114
64115
64116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64117$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64118
64119  # Disable special log output when a debug build is used as Boot JDK...
64120
64121  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64122  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64123  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64124  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64125  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64126  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64127    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64128    JVM_ARG_OK=true
64129  else
64130    $ECHO "Arg failed:" >&5
64131    $ECHO "$OUTPUT" >&5
64132    JVM_ARG_OK=false
64133  fi
64134
64135
64136  # Force en-US environment
64137
64138  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64139  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64140  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64141  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64142  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64143  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64144    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64145    JVM_ARG_OK=true
64146  else
64147    $ECHO "Arg failed:" >&5
64148    $ECHO "$OUTPUT" >&5
64149    JVM_ARG_OK=false
64150  fi
64151
64152
64153  # Apply user provided options.
64154
64155  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64156  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64157  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64158  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64159  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64160  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64161    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64162    JVM_ARG_OK=true
64163  else
64164    $ECHO "Arg failed:" >&5
64165    $ECHO "$OUTPUT" >&5
64166    JVM_ARG_OK=false
64167  fi
64168
64169
64170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64171$as_echo "$boot_jdk_jvmargs" >&6; }
64172
64173  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64174  JAVA_FLAGS=$boot_jdk_jvmargs
64175
64176
64177
64178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64179$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64180
64181  # Starting amount of heap memory.
64182
64183  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64184  $ECHO "Command: $JAVA -Xms64M -version" >&5
64185  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64186  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64187  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64188  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64189    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64190    JVM_ARG_OK=true
64191  else
64192    $ECHO "Arg failed:" >&5
64193    $ECHO "$OUTPUT" >&5
64194    JVM_ARG_OK=false
64195  fi
64196
64197  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64198
64199  # Maximum amount of heap memory and stack size.
64200  JVM_HEAP_LIMIT_32="1024"
64201  # Running a 64 bit JVM allows for and requires a bigger heap
64202  JVM_HEAP_LIMIT_64="1600"
64203  STACK_SIZE_32=768
64204  STACK_SIZE_64=1536
64205  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64206  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64207    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64208  fi
64209  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64210    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64211  fi
64212  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64213    JVM_HEAP_LIMIT_32=512
64214    JVM_HEAP_LIMIT_64=512
64215  fi
64216
64217  if test "x$BOOT_JDK_BITS" = "x32"; then
64218    STACK_SIZE=$STACK_SIZE_32
64219    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64220  else
64221    STACK_SIZE=$STACK_SIZE_64
64222    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64223  fi
64224
64225  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64226  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64227  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64228  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64229  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64230  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64231    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64232    JVM_ARG_OK=true
64233  else
64234    $ECHO "Arg failed:" >&5
64235    $ECHO "$OUTPUT" >&5
64236    JVM_ARG_OK=false
64237  fi
64238
64239
64240  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64241  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64242  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64243  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64244  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64245  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64246    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64247    JVM_ARG_OK=true
64248  else
64249    $ECHO "Arg failed:" >&5
64250    $ECHO "$OUTPUT" >&5
64251    JVM_ARG_OK=false
64252  fi
64253
64254
64255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64256$as_echo "$boot_jdk_jvmargs_big" >&6; }
64257
64258  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64259
64260
64261  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64262    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64263    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64264  else
64265    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64266    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64267  fi
64268  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64269  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64271$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64273$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64274
64275
64276  # By default, the main javac compilations use big
64277  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64278
64279
64280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64281$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64282
64283  # Use serial gc for small short lived tools if possible
64284
64285  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64286  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64287  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64288  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64289  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64290  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64291    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64292    JVM_ARG_OK=true
64293  else
64294    $ECHO "Arg failed:" >&5
64295    $ECHO "$OUTPUT" >&5
64296    JVM_ARG_OK=false
64297  fi
64298
64299
64300  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64301  $ECHO "Command: $JAVA -Xms32M -version" >&5
64302  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64303  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64304  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64305  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64306    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64307    JVM_ARG_OK=true
64308  else
64309    $ECHO "Arg failed:" >&5
64310    $ECHO "$OUTPUT" >&5
64311    JVM_ARG_OK=false
64312  fi
64313
64314
64315  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64316  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64317  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64318  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64319  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64320  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64321    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64322    JVM_ARG_OK=true
64323  else
64324    $ECHO "Arg failed:" >&5
64325    $ECHO "$OUTPUT" >&5
64326    JVM_ARG_OK=false
64327  fi
64328
64329
64330  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64331  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64332  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64333  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64334  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64335  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64336    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64337    JVM_ARG_OK=true
64338  else
64339    $ECHO "Arg failed:" >&5
64340    $ECHO "$OUTPUT" >&5
64341    JVM_ARG_OK=false
64342  fi
64343
64344
64345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64346$as_echo "$boot_jdk_jvmargs_small" >&6; }
64347
64348  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64349
64350
64351  JAVA_TOOL_FLAGS_SMALL=""
64352  for f in $JAVA_FLAGS_SMALL; do
64353    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64354  done
64355
64356
64357
64358# Setup smart javac (after cores and memory have been setup)
64359
64360
64361# Check whether --with-sjavac-server-java was given.
64362if test "${with_sjavac_server_java+set}" = set; then :
64363  withval=$with_sjavac_server_java;
64364fi
64365
64366
64367  if test "x$with_sjavac_server_java" != x; then
64368    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64369    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64370    if test "x$FOUND_VERSION" = x; then
64371      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64372    fi
64373  else
64374    SJAVAC_SERVER_JAVA="$JAVA"
64375  fi
64376
64377
64378  if test "$MEMORY_SIZE" -gt "3000"; then
64379
64380  $ECHO "Check if jvm arg is ok: -d64" >&5
64381  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64382  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64383  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64384  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64385  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64386    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64387    JVM_ARG_OK=true
64388  else
64389    $ECHO "Arg failed:" >&5
64390    $ECHO "$OUTPUT" >&5
64391    JVM_ARG_OK=false
64392  fi
64393
64394    if test "$JVM_ARG_OK" = true; then
64395      JVM_64BIT=true
64396      JVM_ARG_OK=false
64397    fi
64398  fi
64399
64400  MX_VALUE=`expr $MEMORY_SIZE / 2`
64401  if test "$JVM_64BIT" = true; then
64402    # Set ms lower than mx since more than one instance of the server might
64403    # get launched at the same time before they figure out which instance won.
64404    MS_VALUE=512
64405    if test "$MX_VALUE" -gt "2048"; then
64406      MX_VALUE=2048
64407    fi
64408  else
64409    MS_VALUE=256
64410    if test "$MX_VALUE" -gt "1500"; then
64411      MX_VALUE=1500
64412    fi
64413  fi
64414  if test "$MX_VALUE" -lt "512"; then
64415    MX_VALUE=512
64416  fi
64417
64418  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64419  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64420  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64421  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64422  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64423  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64424    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64425    JVM_ARG_OK=true
64426  else
64427    $ECHO "Arg failed:" >&5
64428    $ECHO "$OUTPUT" >&5
64429    JVM_ARG_OK=false
64430  fi
64431
64432
64433
64434  # Check whether --enable-sjavac was given.
64435if test "${enable_sjavac+set}" = set; then :
64436  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64437else
64438  ENABLE_SJAVAC="no"
64439fi
64440
64441  if test "x$JVM_ARG_OK" = "xfalse"; then
64442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64443$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64444    ENABLE_SJAVAC="no"
64445  fi
64446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64447$as_echo_n "checking whether to use sjavac... " >&6; }
64448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64449$as_echo "$ENABLE_SJAVAC" >&6; }
64450
64451
64452  # Check whether --enable-javac-server was given.
64453if test "${enable_javac_server+set}" = set; then :
64454  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64455else
64456  ENABLE_JAVAC_SERVER="yes"
64457fi
64458
64459  if test "x$JVM_ARG_OK" = "xfalse"; then
64460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64461$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64462    ENABLE_JAVAC_SERVER="no"
64463  fi
64464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64465$as_echo_n "checking whether to use javac server... " >&6; }
64466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64467$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64468
64469
64470  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64471    # When using a server javac, the small client instances do not need much
64472    # resources.
64473    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64474  fi
64475
64476
64477# Setup use of icecc if requested
64478
64479  # Check whether --enable-icecc was given.
64480if test "${enable_icecc+set}" = set; then :
64481  enableval=$enable_icecc;
64482fi
64483
64484
64485  if test "x${enable_icecc}" = "xyes"; then
64486
64487
64488
64489  # Publish this variable in the help.
64490
64491
64492  if [ -z "${ICECC_CMD+x}" ]; then
64493    # The variable is not set by user, try to locate tool using the code snippet
64494    for ac_prog in icecc
64495do
64496  # Extract the first word of "$ac_prog", so it can be a program name with args.
64497set dummy $ac_prog; ac_word=$2
64498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64499$as_echo_n "checking for $ac_word... " >&6; }
64500if ${ac_cv_path_ICECC_CMD+:} false; then :
64501  $as_echo_n "(cached) " >&6
64502else
64503  case $ICECC_CMD in
64504  [\\/]* | ?:[\\/]*)
64505  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64506  ;;
64507  *)
64508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64509for as_dir in $PATH
64510do
64511  IFS=$as_save_IFS
64512  test -z "$as_dir" && as_dir=.
64513    for ac_exec_ext in '' $ac_executable_extensions; do
64514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64515    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64517    break 2
64518  fi
64519done
64520  done
64521IFS=$as_save_IFS
64522
64523  ;;
64524esac
64525fi
64526ICECC_CMD=$ac_cv_path_ICECC_CMD
64527if test -n "$ICECC_CMD"; then
64528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64529$as_echo "$ICECC_CMD" >&6; }
64530else
64531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64532$as_echo "no" >&6; }
64533fi
64534
64535
64536  test -n "$ICECC_CMD" && break
64537done
64538
64539  else
64540    # The variable is set, but is it from the command line or the environment?
64541
64542    # Try to remove the string !ICECC_CMD! from our list.
64543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64545      # If it failed, the variable was not from the command line. Ignore it,
64546      # but warn the user (except for BASH, which is always set by the calling BASH).
64547      if test "xICECC_CMD" != xBASH; then
64548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64549$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64550      fi
64551      # Try to locate tool using the code snippet
64552      for ac_prog in icecc
64553do
64554  # Extract the first word of "$ac_prog", so it can be a program name with args.
64555set dummy $ac_prog; ac_word=$2
64556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64557$as_echo_n "checking for $ac_word... " >&6; }
64558if ${ac_cv_path_ICECC_CMD+:} false; then :
64559  $as_echo_n "(cached) " >&6
64560else
64561  case $ICECC_CMD in
64562  [\\/]* | ?:[\\/]*)
64563  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64564  ;;
64565  *)
64566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64567for as_dir in $PATH
64568do
64569  IFS=$as_save_IFS
64570  test -z "$as_dir" && as_dir=.
64571    for ac_exec_ext in '' $ac_executable_extensions; do
64572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64573    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64575    break 2
64576  fi
64577done
64578  done
64579IFS=$as_save_IFS
64580
64581  ;;
64582esac
64583fi
64584ICECC_CMD=$ac_cv_path_ICECC_CMD
64585if test -n "$ICECC_CMD"; then
64586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64587$as_echo "$ICECC_CMD" >&6; }
64588else
64589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64590$as_echo "no" >&6; }
64591fi
64592
64593
64594  test -n "$ICECC_CMD" && break
64595done
64596
64597    else
64598      # If it succeeded, then it was overridden by the user. We will use it
64599      # for the tool.
64600
64601      # First remove it from the list of overridden variables, so we can test
64602      # for unknown variables in the end.
64603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64604
64605      # Check if we try to supply an empty value
64606      if test "x$ICECC_CMD" = x; then
64607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64608$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64610$as_echo_n "checking for ICECC_CMD... " >&6; }
64611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64612$as_echo "disabled" >&6; }
64613      else
64614        # Check if the provided tool contains a complete path.
64615        tool_specified="$ICECC_CMD"
64616        tool_basename="${tool_specified##*/}"
64617        if test "x$tool_basename" = "x$tool_specified"; then
64618          # A command without a complete path is provided, search $PATH.
64619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64620$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64621          # Extract the first word of "$tool_basename", so it can be a program name with args.
64622set dummy $tool_basename; ac_word=$2
64623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64624$as_echo_n "checking for $ac_word... " >&6; }
64625if ${ac_cv_path_ICECC_CMD+:} false; then :
64626  $as_echo_n "(cached) " >&6
64627else
64628  case $ICECC_CMD in
64629  [\\/]* | ?:[\\/]*)
64630  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64631  ;;
64632  *)
64633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64634for as_dir in $PATH
64635do
64636  IFS=$as_save_IFS
64637  test -z "$as_dir" && as_dir=.
64638    for ac_exec_ext in '' $ac_executable_extensions; do
64639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64640    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64642    break 2
64643  fi
64644done
64645  done
64646IFS=$as_save_IFS
64647
64648  ;;
64649esac
64650fi
64651ICECC_CMD=$ac_cv_path_ICECC_CMD
64652if test -n "$ICECC_CMD"; then
64653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64654$as_echo "$ICECC_CMD" >&6; }
64655else
64656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64657$as_echo "no" >&6; }
64658fi
64659
64660
64661          if test "x$ICECC_CMD" = x; then
64662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64663          fi
64664        else
64665          # Otherwise we believe it is a complete path. Use it as it is.
64666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64667$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64669$as_echo_n "checking for ICECC_CMD... " >&6; }
64670          if test ! -x "$tool_specified"; then
64671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64672$as_echo "not found" >&6; }
64673            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64674          fi
64675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64676$as_echo "$tool_specified" >&6; }
64677        fi
64678      fi
64679    fi
64680
64681  fi
64682
64683
64684
64685  if test "x$ICECC_CMD" = x; then
64686    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64687  fi
64688
64689
64690    old_path="$PATH"
64691
64692    # Look for icecc-create-env in some known places
64693    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64694
64695
64696
64697  # Publish this variable in the help.
64698
64699
64700  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64701    # The variable is not set by user, try to locate tool using the code snippet
64702    for ac_prog in icecc-create-env
64703do
64704  # Extract the first word of "$ac_prog", so it can be a program name with args.
64705set dummy $ac_prog; ac_word=$2
64706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64707$as_echo_n "checking for $ac_word... " >&6; }
64708if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64709  $as_echo_n "(cached) " >&6
64710else
64711  case $ICECC_CREATE_ENV in
64712  [\\/]* | ?:[\\/]*)
64713  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64714  ;;
64715  *)
64716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64717for as_dir in $PATH
64718do
64719  IFS=$as_save_IFS
64720  test -z "$as_dir" && as_dir=.
64721    for ac_exec_ext in '' $ac_executable_extensions; do
64722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64723    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64725    break 2
64726  fi
64727done
64728  done
64729IFS=$as_save_IFS
64730
64731  ;;
64732esac
64733fi
64734ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64735if test -n "$ICECC_CREATE_ENV"; then
64736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64737$as_echo "$ICECC_CREATE_ENV" >&6; }
64738else
64739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64740$as_echo "no" >&6; }
64741fi
64742
64743
64744  test -n "$ICECC_CREATE_ENV" && break
64745done
64746
64747  else
64748    # The variable is set, but is it from the command line or the environment?
64749
64750    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64753      # If it failed, the variable was not from the command line. Ignore it,
64754      # but warn the user (except for BASH, which is always set by the calling BASH).
64755      if test "xICECC_CREATE_ENV" != xBASH; then
64756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64757$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64758      fi
64759      # Try to locate tool using the code snippet
64760      for ac_prog in icecc-create-env
64761do
64762  # Extract the first word of "$ac_prog", so it can be a program name with args.
64763set dummy $ac_prog; ac_word=$2
64764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64765$as_echo_n "checking for $ac_word... " >&6; }
64766if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64767  $as_echo_n "(cached) " >&6
64768else
64769  case $ICECC_CREATE_ENV in
64770  [\\/]* | ?:[\\/]*)
64771  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64772  ;;
64773  *)
64774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64775for as_dir in $PATH
64776do
64777  IFS=$as_save_IFS
64778  test -z "$as_dir" && as_dir=.
64779    for ac_exec_ext in '' $ac_executable_extensions; do
64780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64781    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64783    break 2
64784  fi
64785done
64786  done
64787IFS=$as_save_IFS
64788
64789  ;;
64790esac
64791fi
64792ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64793if test -n "$ICECC_CREATE_ENV"; then
64794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64795$as_echo "$ICECC_CREATE_ENV" >&6; }
64796else
64797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64798$as_echo "no" >&6; }
64799fi
64800
64801
64802  test -n "$ICECC_CREATE_ENV" && break
64803done
64804
64805    else
64806      # If it succeeded, then it was overridden by the user. We will use it
64807      # for the tool.
64808
64809      # First remove it from the list of overridden variables, so we can test
64810      # for unknown variables in the end.
64811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64812
64813      # Check if we try to supply an empty value
64814      if test "x$ICECC_CREATE_ENV" = x; then
64815        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64816$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64818$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64820$as_echo "disabled" >&6; }
64821      else
64822        # Check if the provided tool contains a complete path.
64823        tool_specified="$ICECC_CREATE_ENV"
64824        tool_basename="${tool_specified##*/}"
64825        if test "x$tool_basename" = "x$tool_specified"; then
64826          # A command without a complete path is provided, search $PATH.
64827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64828$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64829          # Extract the first word of "$tool_basename", so it can be a program name with args.
64830set dummy $tool_basename; ac_word=$2
64831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64832$as_echo_n "checking for $ac_word... " >&6; }
64833if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64834  $as_echo_n "(cached) " >&6
64835else
64836  case $ICECC_CREATE_ENV in
64837  [\\/]* | ?:[\\/]*)
64838  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64839  ;;
64840  *)
64841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64842for as_dir in $PATH
64843do
64844  IFS=$as_save_IFS
64845  test -z "$as_dir" && as_dir=.
64846    for ac_exec_ext in '' $ac_executable_extensions; do
64847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64848    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64850    break 2
64851  fi
64852done
64853  done
64854IFS=$as_save_IFS
64855
64856  ;;
64857esac
64858fi
64859ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64860if test -n "$ICECC_CREATE_ENV"; then
64861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64862$as_echo "$ICECC_CREATE_ENV" >&6; }
64863else
64864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64865$as_echo "no" >&6; }
64866fi
64867
64868
64869          if test "x$ICECC_CREATE_ENV" = x; then
64870            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64871          fi
64872        else
64873          # Otherwise we believe it is a complete path. Use it as it is.
64874          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64875$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64876          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64877$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64878          if test ! -x "$tool_specified"; then
64879            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64880$as_echo "not found" >&6; }
64881            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64882          fi
64883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64884$as_echo "$tool_specified" >&6; }
64885        fi
64886      fi
64887    fi
64888
64889  fi
64890
64891
64892
64893  if test "x$ICECC_CREATE_ENV" = x; then
64894    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64895  fi
64896
64897
64898    # Use icecc-create-env to create a minimal compilation environment that can
64899    # be sent to the other hosts in the icecream cluster.
64900    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64901    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64902    # Older versions of icecc does not have the --gcc parameter
64903    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64904      icecc_gcc_arg="--gcc"
64905    fi
64906    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64907
64908  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64909      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64910          ${icecc_create_env_log} 2>&1 )
64911  if test "$?" != "0"; then
64912    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64913$as_echo "$as_me: icecc-create-env output:" >&6;}
64914    cat \
64915          ${icecc_create_env_log}
64916    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64917  fi
64918
64919    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64920      # For clang, the icecc compilerwrapper is needed. It usually resides next
64921      # to icecc-create-env.
64922
64923
64924
64925  # Publish this variable in the help.
64926
64927
64928  if [ -z "${ICECC_WRAPPER+x}" ]; then
64929    # The variable is not set by user, try to locate tool using the code snippet
64930    for ac_prog in compilerwrapper
64931do
64932  # Extract the first word of "$ac_prog", so it can be a program name with args.
64933set dummy $ac_prog; ac_word=$2
64934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64935$as_echo_n "checking for $ac_word... " >&6; }
64936if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64937  $as_echo_n "(cached) " >&6
64938else
64939  case $ICECC_WRAPPER in
64940  [\\/]* | ?:[\\/]*)
64941  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64942  ;;
64943  *)
64944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64945for as_dir in $PATH
64946do
64947  IFS=$as_save_IFS
64948  test -z "$as_dir" && as_dir=.
64949    for ac_exec_ext in '' $ac_executable_extensions; do
64950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64951    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64953    break 2
64954  fi
64955done
64956  done
64957IFS=$as_save_IFS
64958
64959  ;;
64960esac
64961fi
64962ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64963if test -n "$ICECC_WRAPPER"; then
64964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64965$as_echo "$ICECC_WRAPPER" >&6; }
64966else
64967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64968$as_echo "no" >&6; }
64969fi
64970
64971
64972  test -n "$ICECC_WRAPPER" && break
64973done
64974
64975  else
64976    # The variable is set, but is it from the command line or the environment?
64977
64978    # Try to remove the string !ICECC_WRAPPER! from our list.
64979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64981      # If it failed, the variable was not from the command line. Ignore it,
64982      # but warn the user (except for BASH, which is always set by the calling BASH).
64983      if test "xICECC_WRAPPER" != xBASH; then
64984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64985$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64986      fi
64987      # Try to locate tool using the code snippet
64988      for ac_prog in compilerwrapper
64989do
64990  # Extract the first word of "$ac_prog", so it can be a program name with args.
64991set dummy $ac_prog; ac_word=$2
64992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64993$as_echo_n "checking for $ac_word... " >&6; }
64994if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64995  $as_echo_n "(cached) " >&6
64996else
64997  case $ICECC_WRAPPER in
64998  [\\/]* | ?:[\\/]*)
64999  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65000  ;;
65001  *)
65002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65003for as_dir in $PATH
65004do
65005  IFS=$as_save_IFS
65006  test -z "$as_dir" && as_dir=.
65007    for ac_exec_ext in '' $ac_executable_extensions; do
65008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65009    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65011    break 2
65012  fi
65013done
65014  done
65015IFS=$as_save_IFS
65016
65017  ;;
65018esac
65019fi
65020ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65021if test -n "$ICECC_WRAPPER"; then
65022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65023$as_echo "$ICECC_WRAPPER" >&6; }
65024else
65025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65026$as_echo "no" >&6; }
65027fi
65028
65029
65030  test -n "$ICECC_WRAPPER" && break
65031done
65032
65033    else
65034      # If it succeeded, then it was overridden by the user. We will use it
65035      # for the tool.
65036
65037      # First remove it from the list of overridden variables, so we can test
65038      # for unknown variables in the end.
65039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65040
65041      # Check if we try to supply an empty value
65042      if test "x$ICECC_WRAPPER" = x; then
65043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65044$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65046$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65048$as_echo "disabled" >&6; }
65049      else
65050        # Check if the provided tool contains a complete path.
65051        tool_specified="$ICECC_WRAPPER"
65052        tool_basename="${tool_specified##*/}"
65053        if test "x$tool_basename" = "x$tool_specified"; then
65054          # A command without a complete path is provided, search $PATH.
65055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65056$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65057          # Extract the first word of "$tool_basename", so it can be a program name with args.
65058set dummy $tool_basename; ac_word=$2
65059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65060$as_echo_n "checking for $ac_word... " >&6; }
65061if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65062  $as_echo_n "(cached) " >&6
65063else
65064  case $ICECC_WRAPPER in
65065  [\\/]* | ?:[\\/]*)
65066  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65067  ;;
65068  *)
65069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65070for as_dir in $PATH
65071do
65072  IFS=$as_save_IFS
65073  test -z "$as_dir" && as_dir=.
65074    for ac_exec_ext in '' $ac_executable_extensions; do
65075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65076    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65078    break 2
65079  fi
65080done
65081  done
65082IFS=$as_save_IFS
65083
65084  ;;
65085esac
65086fi
65087ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65088if test -n "$ICECC_WRAPPER"; then
65089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65090$as_echo "$ICECC_WRAPPER" >&6; }
65091else
65092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65093$as_echo "no" >&6; }
65094fi
65095
65096
65097          if test "x$ICECC_WRAPPER" = x; then
65098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65099          fi
65100        else
65101          # Otherwise we believe it is a complete path. Use it as it is.
65102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65103$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65105$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65106          if test ! -x "$tool_specified"; then
65107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65108$as_echo "not found" >&6; }
65109            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65110          fi
65111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65112$as_echo "$tool_specified" >&6; }
65113        fi
65114      fi
65115    fi
65116
65117  fi
65118
65119
65120
65121  if test "x$ICECC_WRAPPER" = x; then
65122    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65123  fi
65124
65125
65126
65127  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65128      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65129  if test "$?" != "0"; then
65130    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65131$as_echo "$as_me: icecc-create-env output:" >&6;}
65132    cat ${icecc_create_env_log}
65133    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65134  fi
65135
65136    else
65137      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65138    fi
65139    PATH="$old_path"
65140    # The bundle with the compiler gets a name based on checksums. Parse log file
65141    # to find it.
65142    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65143    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65144    if test ! -f ${ICECC_ENV_BUNDLE}; then
65145      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65146    fi
65147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65148$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65150$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65151    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65152
65153    if test "x${COMPILE_TYPE}" = "xcross"; then
65154      # If cross compiling, create a separate env package for the build compiler
65155      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65156      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65157      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65158
65159  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65160      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65161            ${icecc_create_env_log_build} 2>&1 )
65162  if test "$?" != "0"; then
65163    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65164$as_echo "$as_me: icecc-create-env output:" >&6;}
65165    cat \
65166            ${icecc_create_env_log_build}
65167    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65168  fi
65169
65170      elif test "x${BUILD_CC##*/}" = "xclang"; then
65171
65172  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65173      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65174  if test "$?" != "0"; then
65175    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65176$as_echo "$as_me: icecc-create-env output:" >&6;}
65177    cat ${icecc_create_env_log_build}
65178    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65179  fi
65180
65181      else
65182        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65183      fi
65184      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65185      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65186      if test ! -f ${ICECC_ENV_BUNDLE}; then
65187        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65188      fi
65189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65190$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65192$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65193      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65194          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65195    else
65196      BUILD_ICECC="${ICECC}"
65197    fi
65198
65199
65200  fi
65201
65202
65203# Can the C/C++ compiler use precompiled headers?
65204
65205
65206  ###############################################################################
65207  #
65208  # Can the C/C++ compiler use precompiled headers?
65209  #
65210  # Check whether --enable-precompiled-headers was given.
65211if test "${enable_precompiled_headers+set}" = set; then :
65212  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65213else
65214  ENABLE_PRECOMPH=yes
65215fi
65216
65217
65218  USE_PRECOMPILED_HEADER=1
65219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65220$as_echo_n "checking If precompiled header is enabled... " >&6; }
65221  if test "x$ENABLE_PRECOMPH" = xno; then
65222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65223$as_echo "no, forced" >&6; }
65224    USE_PRECOMPILED_HEADER=0
65225  elif test "x$ICECC" != "x"; then
65226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65227$as_echo "no, does not work effectively with icecc" >&6; }
65228    USE_PRECOMPILED_HEADER=0
65229  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65231$as_echo "no, does not work with Solaris Studio" >&6; }
65232    USE_PRECOMPILED_HEADER=0
65233  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65235$as_echo "no, does not work with xlc" >&6; }
65236    USE_PRECOMPILED_HEADER=0
65237  else
65238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65239$as_echo "yes" >&6; }
65240  fi
65241
65242  if test "x$ENABLE_PRECOMPH" = xyes; then
65243    # Check that the compiler actually supports precomp headers.
65244    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65246$as_echo_n "checking that precompiled headers work... " >&6; }
65247      echo "int alfa();" > conftest.h
65248      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65249      if test ! -f conftest.hpp.gch; then
65250        USE_PRECOMPILED_HEADER=0
65251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65252$as_echo "no" >&6; }
65253      else
65254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65255$as_echo "yes" >&6; }
65256      fi
65257      $RM conftest.h conftest.hpp.gch
65258    fi
65259  fi
65260
65261
65262
65263
65264# Setup use of ccache, if available
65265
65266  # Check whether --enable-ccache was given.
65267if test "${enable_ccache+set}" = set; then :
65268  enableval=$enable_ccache;
65269fi
65270
65271
65272  CCACHE_STATUS=
65273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65274$as_echo_n "checking is ccache enabled... " >&6; }
65275  if test "x$enable_ccache" = xyes; then
65276    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65278$as_echo "yes" >&6; }
65279      OLD_PATH="$PATH"
65280      if test "x$TOOLCHAIN_PATH" != x; then
65281        PATH=$TOOLCHAIN_PATH:$PATH
65282      fi
65283
65284
65285
65286  # Publish this variable in the help.
65287
65288
65289  if [ -z "${CCACHE+x}" ]; then
65290    # The variable is not set by user, try to locate tool using the code snippet
65291    for ac_prog in ccache
65292do
65293  # Extract the first word of "$ac_prog", so it can be a program name with args.
65294set dummy $ac_prog; ac_word=$2
65295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65296$as_echo_n "checking for $ac_word... " >&6; }
65297if ${ac_cv_path_CCACHE+:} false; then :
65298  $as_echo_n "(cached) " >&6
65299else
65300  case $CCACHE in
65301  [\\/]* | ?:[\\/]*)
65302  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65303  ;;
65304  *)
65305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65306for as_dir in $PATH
65307do
65308  IFS=$as_save_IFS
65309  test -z "$as_dir" && as_dir=.
65310    for ac_exec_ext in '' $ac_executable_extensions; do
65311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65312    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65314    break 2
65315  fi
65316done
65317  done
65318IFS=$as_save_IFS
65319
65320  ;;
65321esac
65322fi
65323CCACHE=$ac_cv_path_CCACHE
65324if test -n "$CCACHE"; then
65325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65326$as_echo "$CCACHE" >&6; }
65327else
65328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65329$as_echo "no" >&6; }
65330fi
65331
65332
65333  test -n "$CCACHE" && break
65334done
65335
65336  else
65337    # The variable is set, but is it from the command line or the environment?
65338
65339    # Try to remove the string !CCACHE! from our list.
65340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65342      # If it failed, the variable was not from the command line. Ignore it,
65343      # but warn the user (except for BASH, which is always set by the calling BASH).
65344      if test "xCCACHE" != xBASH; then
65345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65346$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65347      fi
65348      # Try to locate tool using the code snippet
65349      for ac_prog in ccache
65350do
65351  # Extract the first word of "$ac_prog", so it can be a program name with args.
65352set dummy $ac_prog; ac_word=$2
65353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65354$as_echo_n "checking for $ac_word... " >&6; }
65355if ${ac_cv_path_CCACHE+:} false; then :
65356  $as_echo_n "(cached) " >&6
65357else
65358  case $CCACHE in
65359  [\\/]* | ?:[\\/]*)
65360  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65361  ;;
65362  *)
65363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65364for as_dir in $PATH
65365do
65366  IFS=$as_save_IFS
65367  test -z "$as_dir" && as_dir=.
65368    for ac_exec_ext in '' $ac_executable_extensions; do
65369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65370    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65372    break 2
65373  fi
65374done
65375  done
65376IFS=$as_save_IFS
65377
65378  ;;
65379esac
65380fi
65381CCACHE=$ac_cv_path_CCACHE
65382if test -n "$CCACHE"; then
65383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65384$as_echo "$CCACHE" >&6; }
65385else
65386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65387$as_echo "no" >&6; }
65388fi
65389
65390
65391  test -n "$CCACHE" && break
65392done
65393
65394    else
65395      # If it succeeded, then it was overridden by the user. We will use it
65396      # for the tool.
65397
65398      # First remove it from the list of overridden variables, so we can test
65399      # for unknown variables in the end.
65400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65401
65402      # Check if we try to supply an empty value
65403      if test "x$CCACHE" = x; then
65404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65405$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65407$as_echo_n "checking for CCACHE... " >&6; }
65408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65409$as_echo "disabled" >&6; }
65410      else
65411        # Check if the provided tool contains a complete path.
65412        tool_specified="$CCACHE"
65413        tool_basename="${tool_specified##*/}"
65414        if test "x$tool_basename" = "x$tool_specified"; then
65415          # A command without a complete path is provided, search $PATH.
65416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65417$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65418          # Extract the first word of "$tool_basename", so it can be a program name with args.
65419set dummy $tool_basename; ac_word=$2
65420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65421$as_echo_n "checking for $ac_word... " >&6; }
65422if ${ac_cv_path_CCACHE+:} false; then :
65423  $as_echo_n "(cached) " >&6
65424else
65425  case $CCACHE in
65426  [\\/]* | ?:[\\/]*)
65427  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65428  ;;
65429  *)
65430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65431for as_dir in $PATH
65432do
65433  IFS=$as_save_IFS
65434  test -z "$as_dir" && as_dir=.
65435    for ac_exec_ext in '' $ac_executable_extensions; do
65436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65437    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65439    break 2
65440  fi
65441done
65442  done
65443IFS=$as_save_IFS
65444
65445  ;;
65446esac
65447fi
65448CCACHE=$ac_cv_path_CCACHE
65449if test -n "$CCACHE"; then
65450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65451$as_echo "$CCACHE" >&6; }
65452else
65453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65454$as_echo "no" >&6; }
65455fi
65456
65457
65458          if test "x$CCACHE" = x; then
65459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65460          fi
65461        else
65462          # Otherwise we believe it is a complete path. Use it as it is.
65463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65464$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65466$as_echo_n "checking for CCACHE... " >&6; }
65467          if test ! -x "$tool_specified"; then
65468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65469$as_echo "not found" >&6; }
65470            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65471          fi
65472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65473$as_echo "$tool_specified" >&6; }
65474        fi
65475      fi
65476    fi
65477
65478  fi
65479
65480
65481
65482  if test "x$CCACHE" = x; then
65483    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65484  fi
65485
65486
65487      PATH="$OLD_PATH"
65488      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65489      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65490    else
65491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65492$as_echo "no" >&6; }
65493      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65494$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65495    fi
65496  elif test "x$enable_ccache" = xno; then
65497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65498$as_echo "no, explicitly disabled" >&6; }
65499    CCACHE_STATUS="Disabled"
65500  elif test "x$enable_ccache" = x; then
65501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65502$as_echo "no" >&6; }
65503  else
65504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65505$as_echo "unknown" >&6; }
65506    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65507  fi
65508
65509
65510
65511# Check whether --with-ccache-dir was given.
65512if test "${with_ccache_dir+set}" = set; then :
65513  withval=$with_ccache_dir;
65514fi
65515
65516
65517  if test "x$with_ccache_dir" != x; then
65518    # When using a non home ccache directory, assume the use is to share ccache files
65519    # with other users. Thus change the umask.
65520    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65521    if test "x$CCACHE" = x; then
65522      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65523$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65524    fi
65525  fi
65526
65527  if test "x$CCACHE" != x; then
65528
65529  if test "x$CCACHE" != x; then
65530    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65531      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65532          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65533      if test "x$HAS_BAD_CCACHE" != "x"; then
65534        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65535      fi
65536      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65537$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65538      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65539      PUSHED_FLAGS="$CXXFLAGS"
65540      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65542/* end confdefs.h.  */
65543
65544int
65545main ()
65546{
65547
65548  ;
65549  return 0;
65550}
65551_ACEOF
65552if ac_fn_cxx_try_compile "$LINENO"; then :
65553  CC_KNOWS_CCACHE_TRICK=yes
65554else
65555  CC_KNOWS_CCACHE_TRICK=no
65556fi
65557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65558      CXXFLAGS="$PUSHED_FLAGS"
65559      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65561$as_echo "yes" >&6; }
65562        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65563
65564        CCACHE_SLOPPINESS=pch_defines,time_macros
65565      else
65566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65567$as_echo "no" >&6; }
65568        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65569      fi
65570    fi
65571
65572    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65573        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65574
65575    if test "x$SET_CCACHE_DIR" != x; then
65576      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65577      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65578    fi
65579  fi
65580
65581  fi
65582
65583
65584###############################################################################
65585#
65586# And now the finish...
65587#
65588###############################################################################
65589
65590# Check for some common pitfalls
65591
65592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65593    file_to_test="$SRC_ROOT/LICENSE"
65594    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65595      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
65596    fi
65597  fi
65598
65599
65600  # Did user specify any unknown variables?
65601
65602  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65603    # Replace the separating ! with spaces before presenting for end user.
65604    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65605    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65606$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65607  fi
65608
65609
65610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65611$as_echo_n "checking if build directory is on local disk... " >&6; }
65612
65613  # df -l lists only local disks; if the given directory is not found then
65614  # a non-zero exit code is given
65615  if test "x$DF" = x; then
65616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65617      # msys does not have df; use Windows "net use" instead.
65618      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65619      if test "x$IS_NETWORK_DISK" = x; then
65620        OUTPUT_DIR_IS_LOCAL="yes"
65621      else
65622        OUTPUT_DIR_IS_LOCAL="no"
65623      fi
65624    else
65625      # No df here, say it's local
65626      OUTPUT_DIR_IS_LOCAL="yes"
65627    fi
65628  else
65629    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65630      OUTPUT_DIR_IS_LOCAL="yes"
65631    else
65632      OUTPUT_DIR_IS_LOCAL="no"
65633    fi
65634  fi
65635
65636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65637$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65638
65639
65640
65641  # Check if the user has any old-style ALT_ variables set.
65642  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65643
65644  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65645  # Since we can't properly handle the dependencies for this, warn the user about the situation
65646  if test -e $OUTPUT_ROOT/spec.gmk; then
65647    IS_RECONFIGURE=yes
65648  else
65649    IS_RECONFIGURE=no
65650  fi
65651
65652
65653# At the end, call the custom hook. (Dummy macro if no custom sources available)
65654
65655
65656# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65657
65658  # Keep feature lists sorted and free of duplicates
65659  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65660  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65661  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65662  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65663  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65664  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65665  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65666
65667  # Validate features
65668  for variant in $JVM_VARIANTS; do
65669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65670$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65671    features_var_name=JVM_FEATURES_$variant
65672    JVM_FEATURES_TO_TEST=${!features_var_name}
65673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65674$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65675    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65676    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65677    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65678    if test "x$INVALID_FEATURES" != x; then
65679      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65680    fi
65681  done
65682
65683
65684# We're messing a bit with internal autoconf variables to put the config.status
65685# in the output directory instead of the current directory.
65686CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65687
65688# Create the actual output files. Now the main work of configure is done.
65689cat >confcache <<\_ACEOF
65690# This file is a shell script that caches the results of configure
65691# tests run on this system so they can be shared between configure
65692# scripts and configure runs, see configure's option --config-cache.
65693# It is not useful on other systems.  If it contains results you don't
65694# want to keep, you may remove or edit it.
65695#
65696# config.status only pays attention to the cache file if you give it
65697# the --recheck option to rerun configure.
65698#
65699# `ac_cv_env_foo' variables (set or unset) will be overridden when
65700# loading this file, other *unset* `ac_cv_foo' will be assigned the
65701# following values.
65702
65703_ACEOF
65704
65705# The following way of writing the cache mishandles newlines in values,
65706# but we know of no workaround that is simple, portable, and efficient.
65707# So, we kill variables containing newlines.
65708# Ultrix sh set writes to stderr and can't be redirected directly,
65709# and sets the high bit in the cache file unless we assign to the vars.
65710(
65711  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65712    eval ac_val=\$$ac_var
65713    case $ac_val in #(
65714    *${as_nl}*)
65715      case $ac_var in #(
65716      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65717$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65718      esac
65719      case $ac_var in #(
65720      _ | IFS | as_nl) ;; #(
65721      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65722      *) { eval $ac_var=; unset $ac_var;} ;;
65723      esac ;;
65724    esac
65725  done
65726
65727  (set) 2>&1 |
65728    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65729    *${as_nl}ac_space=\ *)
65730      # `set' does not quote correctly, so add quotes: double-quote
65731      # substitution turns \\\\ into \\, and sed turns \\ into \.
65732      sed -n \
65733	"s/'/'\\\\''/g;
65734	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65735      ;; #(
65736    *)
65737      # `set' quotes correctly as required by POSIX, so do not add quotes.
65738      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65739      ;;
65740    esac |
65741    sort
65742) |
65743  sed '
65744     /^ac_cv_env_/b end
65745     t clear
65746     :clear
65747     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65748     t end
65749     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65750     :end' >>confcache
65751if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65752  if test -w "$cache_file"; then
65753    if test "x$cache_file" != "x/dev/null"; then
65754      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65755$as_echo "$as_me: updating cache $cache_file" >&6;}
65756      if test ! -f "$cache_file" || test -h "$cache_file"; then
65757	cat confcache >"$cache_file"
65758      else
65759        case $cache_file in #(
65760        */* | ?:*)
65761	  mv -f confcache "$cache_file"$$ &&
65762	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65763        *)
65764	  mv -f confcache "$cache_file" ;;
65765	esac
65766      fi
65767    fi
65768  else
65769    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65770$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65771  fi
65772fi
65773rm -f confcache
65774
65775test "x$prefix" = xNONE && prefix=$ac_default_prefix
65776# Let make expand exec_prefix.
65777test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65778
65779# Transform confdefs.h into DEFS.
65780# Protect against shell expansion while executing Makefile rules.
65781# Protect against Makefile macro expansion.
65782#
65783# If the first sed substitution is executed (which looks for macros that
65784# take arguments), then branch to the quote section.  Otherwise,
65785# look for a macro that doesn't take arguments.
65786ac_script='
65787:mline
65788/\\$/{
65789 N
65790 s,\\\n,,
65791 b mline
65792}
65793t clear
65794:clear
65795s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65796t quote
65797s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65798t quote
65799b any
65800:quote
65801s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65802s/\[/\\&/g
65803s/\]/\\&/g
65804s/\$/$$/g
65805H
65806:any
65807${
65808	g
65809	s/^\n//
65810	s/\n/ /g
65811	p
65812}
65813'
65814DEFS=`sed -n "$ac_script" confdefs.h`
65815
65816
65817ac_libobjs=
65818ac_ltlibobjs=
65819U=
65820for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65821  # 1. Remove the extension, and $U if already installed.
65822  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65823  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65824  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65825  #    will be set to the directory where LIBOBJS objects are built.
65826  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65827  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65828done
65829LIBOBJS=$ac_libobjs
65830
65831LTLIBOBJS=$ac_ltlibobjs
65832
65833
65834
65835: "${CONFIG_STATUS=./config.status}"
65836ac_write_fail=0
65837ac_clean_files_save=$ac_clean_files
65838ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65839{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65840$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65841as_write_fail=0
65842cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65843#! $SHELL
65844# Generated by $as_me.
65845# Run this file to recreate the current configuration.
65846# Compiler output produced by configure, useful for debugging
65847# configure, is in config.log if it exists.
65848
65849debug=false
65850ac_cs_recheck=false
65851ac_cs_silent=false
65852
65853SHELL=\${CONFIG_SHELL-$SHELL}
65854export SHELL
65855_ASEOF
65856cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65857## -------------------- ##
65858## M4sh Initialization. ##
65859## -------------------- ##
65860
65861# Be more Bourne compatible
65862DUALCASE=1; export DUALCASE # for MKS sh
65863if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65864  emulate sh
65865  NULLCMD=:
65866  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65867  # is contrary to our usage.  Disable this feature.
65868  alias -g '${1+"$@"}'='"$@"'
65869  setopt NO_GLOB_SUBST
65870else
65871  case `(set -o) 2>/dev/null` in #(
65872  *posix*) :
65873    set -o posix ;; #(
65874  *) :
65875     ;;
65876esac
65877fi
65878
65879
65880as_nl='
65881'
65882export as_nl
65883# Printing a long string crashes Solaris 7 /usr/bin/printf.
65884as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65885as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65886as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65887# Prefer a ksh shell builtin over an external printf program on Solaris,
65888# but without wasting forks for bash or zsh.
65889if test -z "$BASH_VERSION$ZSH_VERSION" \
65890    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65891  as_echo='print -r --'
65892  as_echo_n='print -rn --'
65893elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65894  as_echo='printf %s\n'
65895  as_echo_n='printf %s'
65896else
65897  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65898    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65899    as_echo_n='/usr/ucb/echo -n'
65900  else
65901    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65902    as_echo_n_body='eval
65903      arg=$1;
65904      case $arg in #(
65905      *"$as_nl"*)
65906	expr "X$arg" : "X\\(.*\\)$as_nl";
65907	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65908      esac;
65909      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65910    '
65911    export as_echo_n_body
65912    as_echo_n='sh -c $as_echo_n_body as_echo'
65913  fi
65914  export as_echo_body
65915  as_echo='sh -c $as_echo_body as_echo'
65916fi
65917
65918# The user is always right.
65919if test "${PATH_SEPARATOR+set}" != set; then
65920  PATH_SEPARATOR=:
65921  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65922    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65923      PATH_SEPARATOR=';'
65924  }
65925fi
65926
65927
65928# IFS
65929# We need space, tab and new line, in precisely that order.  Quoting is
65930# there to prevent editors from complaining about space-tab.
65931# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65932# splitting by setting IFS to empty value.)
65933IFS=" ""	$as_nl"
65934
65935# Find who we are.  Look in the path if we contain no directory separator.
65936as_myself=
65937case $0 in #((
65938  *[\\/]* ) as_myself=$0 ;;
65939  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65940for as_dir in $PATH
65941do
65942  IFS=$as_save_IFS
65943  test -z "$as_dir" && as_dir=.
65944    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65945  done
65946IFS=$as_save_IFS
65947
65948     ;;
65949esac
65950# We did not find ourselves, most probably we were run as `sh COMMAND'
65951# in which case we are not to be found in the path.
65952if test "x$as_myself" = x; then
65953  as_myself=$0
65954fi
65955if test ! -f "$as_myself"; then
65956  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65957  exit 1
65958fi
65959
65960# Unset variables that we do not need and which cause bugs (e.g. in
65961# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65962# suppresses any "Segmentation fault" message there.  '((' could
65963# trigger a bug in pdksh 5.2.14.
65964for as_var in BASH_ENV ENV MAIL MAILPATH
65965do eval test x\${$as_var+set} = xset \
65966  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65967done
65968PS1='$ '
65969PS2='> '
65970PS4='+ '
65971
65972# NLS nuisances.
65973LC_ALL=C
65974export LC_ALL
65975LANGUAGE=C
65976export LANGUAGE
65977
65978# CDPATH.
65979(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65980
65981
65982# as_fn_error STATUS ERROR [LINENO LOG_FD]
65983# ----------------------------------------
65984# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65985# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65986# script with STATUS, using 1 if that was 0.
65987as_fn_error ()
65988{
65989  as_status=$1; test $as_status -eq 0 && as_status=1
65990  if test "$4"; then
65991    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65992    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65993  fi
65994  $as_echo "$as_me: error: $2" >&2
65995  as_fn_exit $as_status
65996} # as_fn_error
65997
65998
65999# as_fn_set_status STATUS
66000# -----------------------
66001# Set $? to STATUS, without forking.
66002as_fn_set_status ()
66003{
66004  return $1
66005} # as_fn_set_status
66006
66007# as_fn_exit STATUS
66008# -----------------
66009# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66010as_fn_exit ()
66011{
66012  set +e
66013  as_fn_set_status $1
66014  exit $1
66015} # as_fn_exit
66016
66017# as_fn_unset VAR
66018# ---------------
66019# Portably unset VAR.
66020as_fn_unset ()
66021{
66022  { eval $1=; unset $1;}
66023}
66024as_unset=as_fn_unset
66025# as_fn_append VAR VALUE
66026# ----------------------
66027# Append the text in VALUE to the end of the definition contained in VAR. Take
66028# advantage of any shell optimizations that allow amortized linear growth over
66029# repeated appends, instead of the typical quadratic growth present in naive
66030# implementations.
66031if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66032  eval 'as_fn_append ()
66033  {
66034    eval $1+=\$2
66035  }'
66036else
66037  as_fn_append ()
66038  {
66039    eval $1=\$$1\$2
66040  }
66041fi # as_fn_append
66042
66043# as_fn_arith ARG...
66044# ------------------
66045# Perform arithmetic evaluation on the ARGs, and store the result in the
66046# global $as_val. Take advantage of shells that can avoid forks. The arguments
66047# must be portable across $(()) and expr.
66048if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66049  eval 'as_fn_arith ()
66050  {
66051    as_val=$(( $* ))
66052  }'
66053else
66054  as_fn_arith ()
66055  {
66056    as_val=`expr "$@" || test $? -eq 1`
66057  }
66058fi # as_fn_arith
66059
66060
66061if expr a : '\(a\)' >/dev/null 2>&1 &&
66062   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66063  as_expr=expr
66064else
66065  as_expr=false
66066fi
66067
66068if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66069  as_basename=basename
66070else
66071  as_basename=false
66072fi
66073
66074if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66075  as_dirname=dirname
66076else
66077  as_dirname=false
66078fi
66079
66080as_me=`$as_basename -- "$0" ||
66081$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66082	 X"$0" : 'X\(//\)$' \| \
66083	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66084$as_echo X/"$0" |
66085    sed '/^.*\/\([^/][^/]*\)\/*$/{
66086	    s//\1/
66087	    q
66088	  }
66089	  /^X\/\(\/\/\)$/{
66090	    s//\1/
66091	    q
66092	  }
66093	  /^X\/\(\/\).*/{
66094	    s//\1/
66095	    q
66096	  }
66097	  s/.*/./; q'`
66098
66099# Avoid depending upon Character Ranges.
66100as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66101as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66102as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66103as_cr_digits='0123456789'
66104as_cr_alnum=$as_cr_Letters$as_cr_digits
66105
66106ECHO_C= ECHO_N= ECHO_T=
66107case `echo -n x` in #(((((
66108-n*)
66109  case `echo 'xy\c'` in
66110  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66111  xy)  ECHO_C='\c';;
66112  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66113       ECHO_T='	';;
66114  esac;;
66115*)
66116  ECHO_N='-n';;
66117esac
66118
66119rm -f conf$$ conf$$.exe conf$$.file
66120if test -d conf$$.dir; then
66121  rm -f conf$$.dir/conf$$.file
66122else
66123  rm -f conf$$.dir
66124  mkdir conf$$.dir 2>/dev/null
66125fi
66126if (echo >conf$$.file) 2>/dev/null; then
66127  if ln -s conf$$.file conf$$ 2>/dev/null; then
66128    as_ln_s='ln -s'
66129    # ... but there are two gotchas:
66130    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66131    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66132    # In both cases, we have to default to `cp -pR'.
66133    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66134      as_ln_s='cp -pR'
66135  elif ln conf$$.file conf$$ 2>/dev/null; then
66136    as_ln_s=ln
66137  else
66138    as_ln_s='cp -pR'
66139  fi
66140else
66141  as_ln_s='cp -pR'
66142fi
66143rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66144rmdir conf$$.dir 2>/dev/null
66145
66146
66147# as_fn_mkdir_p
66148# -------------
66149# Create "$as_dir" as a directory, including parents if necessary.
66150as_fn_mkdir_p ()
66151{
66152
66153  case $as_dir in #(
66154  -*) as_dir=./$as_dir;;
66155  esac
66156  test -d "$as_dir" || eval $as_mkdir_p || {
66157    as_dirs=
66158    while :; do
66159      case $as_dir in #(
66160      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66161      *) as_qdir=$as_dir;;
66162      esac
66163      as_dirs="'$as_qdir' $as_dirs"
66164      as_dir=`$as_dirname -- "$as_dir" ||
66165$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66166	 X"$as_dir" : 'X\(//\)[^/]' \| \
66167	 X"$as_dir" : 'X\(//\)$' \| \
66168	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66169$as_echo X"$as_dir" |
66170    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66171	    s//\1/
66172	    q
66173	  }
66174	  /^X\(\/\/\)[^/].*/{
66175	    s//\1/
66176	    q
66177	  }
66178	  /^X\(\/\/\)$/{
66179	    s//\1/
66180	    q
66181	  }
66182	  /^X\(\/\).*/{
66183	    s//\1/
66184	    q
66185	  }
66186	  s/.*/./; q'`
66187      test -d "$as_dir" && break
66188    done
66189    test -z "$as_dirs" || eval "mkdir $as_dirs"
66190  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66191
66192
66193} # as_fn_mkdir_p
66194if mkdir -p . 2>/dev/null; then
66195  as_mkdir_p='mkdir -p "$as_dir"'
66196else
66197  test -d ./-p && rmdir ./-p
66198  as_mkdir_p=false
66199fi
66200
66201
66202# as_fn_executable_p FILE
66203# -----------------------
66204# Test if FILE is an executable regular file.
66205as_fn_executable_p ()
66206{
66207  test -f "$1" && test -x "$1"
66208} # as_fn_executable_p
66209as_test_x='test -x'
66210as_executable_p=as_fn_executable_p
66211
66212# Sed expression to map a string onto a valid CPP name.
66213as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66214
66215# Sed expression to map a string onto a valid variable name.
66216as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66217
66218
66219exec 6>&1
66220## ----------------------------------- ##
66221## Main body of $CONFIG_STATUS script. ##
66222## ----------------------------------- ##
66223_ASEOF
66224test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66225
66226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66227# Save the log message, to keep $0 and so on meaningful, and to
66228# report actual input values of CONFIG_FILES etc. instead of their
66229# values after options handling.
66230ac_log="
66231This file was extended by OpenJDK $as_me jdk9, which was
66232generated by GNU Autoconf 2.69.  Invocation command line was
66233
66234  CONFIG_FILES    = $CONFIG_FILES
66235  CONFIG_HEADERS  = $CONFIG_HEADERS
66236  CONFIG_LINKS    = $CONFIG_LINKS
66237  CONFIG_COMMANDS = $CONFIG_COMMANDS
66238  $ $0 $@
66239
66240on `(hostname || uname -n) 2>/dev/null | sed 1q`
66241"
66242
66243_ACEOF
66244
66245case $ac_config_files in *"
66246"*) set x $ac_config_files; shift; ac_config_files=$*;;
66247esac
66248
66249
66250
66251cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66252# Files that config.status was made for.
66253config_files="$ac_config_files"
66254
66255_ACEOF
66256
66257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66258ac_cs_usage="\
66259\`$as_me' instantiates files and other configuration actions
66260from templates according to the current configuration.  Unless the files
66261and actions are specified as TAGs, all are instantiated by default.
66262
66263Usage: $0 [OPTION]... [TAG]...
66264
66265  -h, --help       print this help, then exit
66266  -V, --version    print version number and configuration settings, then exit
66267      --config     print configuration, then exit
66268  -q, --quiet, --silent
66269                   do not print progress messages
66270  -d, --debug      don't remove temporary files
66271      --recheck    update $as_me by reconfiguring in the same conditions
66272      --file=FILE[:TEMPLATE]
66273                   instantiate the configuration file FILE
66274
66275Configuration files:
66276$config_files
66277
66278Report bugs to <build-dev@openjdk.java.net>.
66279OpenJDK home page: <http://openjdk.java.net>."
66280
66281_ACEOF
66282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66283ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66284ac_cs_version="\\
66285OpenJDK config.status jdk9
66286configured by $0, generated by GNU Autoconf 2.69,
66287  with options \\"\$ac_cs_config\\"
66288
66289Copyright (C) 2012 Free Software Foundation, Inc.
66290This config.status script is free software; the Free Software Foundation
66291gives unlimited permission to copy, distribute and modify it."
66292
66293ac_pwd='$ac_pwd'
66294srcdir='$srcdir'
66295AWK='$AWK'
66296test -n "\$AWK" || AWK=awk
66297_ACEOF
66298
66299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66300# The default lists apply if the user does not specify any file.
66301ac_need_defaults=:
66302while test $# != 0
66303do
66304  case $1 in
66305  --*=?*)
66306    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66307    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66308    ac_shift=:
66309    ;;
66310  --*=)
66311    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66312    ac_optarg=
66313    ac_shift=:
66314    ;;
66315  *)
66316    ac_option=$1
66317    ac_optarg=$2
66318    ac_shift=shift
66319    ;;
66320  esac
66321
66322  case $ac_option in
66323  # Handling of the options.
66324  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66325    ac_cs_recheck=: ;;
66326  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66327    $as_echo "$ac_cs_version"; exit ;;
66328  --config | --confi | --conf | --con | --co | --c )
66329    $as_echo "$ac_cs_config"; exit ;;
66330  --debug | --debu | --deb | --de | --d | -d )
66331    debug=: ;;
66332  --file | --fil | --fi | --f )
66333    $ac_shift
66334    case $ac_optarg in
66335    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66336    '') as_fn_error $? "missing file argument" ;;
66337    esac
66338    as_fn_append CONFIG_FILES " '$ac_optarg'"
66339    ac_need_defaults=false;;
66340  --he | --h |  --help | --hel | -h )
66341    $as_echo "$ac_cs_usage"; exit ;;
66342  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66343  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66344    ac_cs_silent=: ;;
66345
66346  # This is an error.
66347  -*) as_fn_error $? "unrecognized option: \`$1'
66348Try \`$0 --help' for more information." ;;
66349
66350  *) as_fn_append ac_config_targets " $1"
66351     ac_need_defaults=false ;;
66352
66353  esac
66354  shift
66355done
66356
66357ac_configure_extra_args=
66358
66359if $ac_cs_silent; then
66360  exec 6>/dev/null
66361  ac_configure_extra_args="$ac_configure_extra_args --silent"
66362fi
66363
66364_ACEOF
66365cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66366if \$ac_cs_recheck; then
66367  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66368  shift
66369  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66370  CONFIG_SHELL='$SHELL'
66371  export CONFIG_SHELL
66372  exec "\$@"
66373fi
66374
66375_ACEOF
66376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66377exec 5>>config.log
66378{
66379  echo
66380  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66381## Running $as_me. ##
66382_ASBOX
66383  $as_echo "$ac_log"
66384} >&5
66385
66386_ACEOF
66387cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66388_ACEOF
66389
66390cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66391
66392# Handling of arguments.
66393for ac_config_target in $ac_config_targets
66394do
66395  case $ac_config_target in
66396    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66397    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66398    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66399    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66400    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66401
66402  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66403  esac
66404done
66405
66406
66407# If the user did not use the arguments to specify the items to instantiate,
66408# then the envvar interface is used.  Set only those that are not.
66409# We use the long form for the default assignment because of an extremely
66410# bizarre bug on SunOS 4.1.3.
66411if $ac_need_defaults; then
66412  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66413fi
66414
66415# Have a temporary directory for convenience.  Make it in the build tree
66416# simply because there is no reason against having it here, and in addition,
66417# creating and moving files from /tmp can sometimes cause problems.
66418# Hook for its removal unless debugging.
66419# Note that there is a small window in which the directory will not be cleaned:
66420# after its creation but before its name has been assigned to `$tmp'.
66421$debug ||
66422{
66423  tmp= ac_tmp=
66424  trap 'exit_status=$?
66425  : "${ac_tmp:=$tmp}"
66426  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66427' 0
66428  trap 'as_fn_exit 1' 1 2 13 15
66429}
66430# Create a (secure) tmp directory for tmp files.
66431
66432{
66433  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66434  test -d "$tmp"
66435}  ||
66436{
66437  tmp=./conf$$-$RANDOM
66438  (umask 077 && mkdir "$tmp")
66439} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66440ac_tmp=$tmp
66441
66442# Set up the scripts for CONFIG_FILES section.
66443# No need to generate them if there are no CONFIG_FILES.
66444# This happens for instance with `./config.status config.h'.
66445if test -n "$CONFIG_FILES"; then
66446
66447
66448ac_cr=`echo X | tr X '\015'`
66449# On cygwin, bash can eat \r inside `` if the user requested igncr.
66450# But we know of no other shell where ac_cr would be empty at this
66451# point, so we can use a bashism as a fallback.
66452if test "x$ac_cr" = x; then
66453  eval ac_cr=\$\'\\r\'
66454fi
66455ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66456if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66457  ac_cs_awk_cr='\\r'
66458else
66459  ac_cs_awk_cr=$ac_cr
66460fi
66461
66462echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66463_ACEOF
66464
66465
66466{
66467  echo "cat >conf$$subs.awk <<_ACEOF" &&
66468  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66469  echo "_ACEOF"
66470} >conf$$subs.sh ||
66471  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66472ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66473ac_delim='%!_!# '
66474for ac_last_try in false false false false false :; do
66475  . ./conf$$subs.sh ||
66476    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66477
66478  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66479  if test $ac_delim_n = $ac_delim_num; then
66480    break
66481  elif $ac_last_try; then
66482    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66483  else
66484    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66485  fi
66486done
66487rm -f conf$$subs.sh
66488
66489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66490cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66491_ACEOF
66492sed -n '
66493h
66494s/^/S["/; s/!.*/"]=/
66495p
66496g
66497s/^[^!]*!//
66498:repl
66499t repl
66500s/'"$ac_delim"'$//
66501t delim
66502:nl
66503h
66504s/\(.\{148\}\)..*/\1/
66505t more1
66506s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66507p
66508n
66509b repl
66510:more1
66511s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66512p
66513g
66514s/.\{148\}//
66515t nl
66516:delim
66517h
66518s/\(.\{148\}\)..*/\1/
66519t more2
66520s/["\\]/\\&/g; s/^/"/; s/$/"/
66521p
66522b
66523:more2
66524s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66525p
66526g
66527s/.\{148\}//
66528t delim
66529' <conf$$subs.awk | sed '
66530/^[^""]/{
66531  N
66532  s/\n//
66533}
66534' >>$CONFIG_STATUS || ac_write_fail=1
66535rm -f conf$$subs.awk
66536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66537_ACAWK
66538cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66539  for (key in S) S_is_set[key] = 1
66540  FS = ""
66541
66542}
66543{
66544  line = $ 0
66545  nfields = split(line, field, "@")
66546  substed = 0
66547  len = length(field[1])
66548  for (i = 2; i < nfields; i++) {
66549    key = field[i]
66550    keylen = length(key)
66551    if (S_is_set[key]) {
66552      value = S[key]
66553      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66554      len += length(value) + length(field[++i])
66555      substed = 1
66556    } else
66557      len += 1 + keylen
66558  }
66559
66560  print line
66561}
66562
66563_ACAWK
66564_ACEOF
66565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66566if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66567  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66568else
66569  cat
66570fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66571  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66572_ACEOF
66573
66574# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66575# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66576# trailing colons and then remove the whole line if VPATH becomes empty
66577# (actually we leave an empty line to preserve line numbers).
66578if test "x$srcdir" = x.; then
66579  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66580h
66581s///
66582s/^/:/
66583s/[	 ]*$/:/
66584s/:\$(srcdir):/:/g
66585s/:\${srcdir}:/:/g
66586s/:@srcdir@:/:/g
66587s/^:*//
66588s/:*$//
66589x
66590s/\(=[	 ]*\).*/\1/
66591G
66592s/\n//
66593s/^[^=]*=[	 ]*$//
66594}'
66595fi
66596
66597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66598fi # test -n "$CONFIG_FILES"
66599
66600
66601eval set X "  :F $CONFIG_FILES      "
66602shift
66603for ac_tag
66604do
66605  case $ac_tag in
66606  :[FHLC]) ac_mode=$ac_tag; continue;;
66607  esac
66608  case $ac_mode$ac_tag in
66609  :[FHL]*:*);;
66610  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66611  :[FH]-) ac_tag=-:-;;
66612  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66613  esac
66614  ac_save_IFS=$IFS
66615  IFS=:
66616  set x $ac_tag
66617  IFS=$ac_save_IFS
66618  shift
66619  ac_file=$1
66620  shift
66621
66622  case $ac_mode in
66623  :L) ac_source=$1;;
66624  :[FH])
66625    ac_file_inputs=
66626    for ac_f
66627    do
66628      case $ac_f in
66629      -) ac_f="$ac_tmp/stdin";;
66630      *) # Look for the file first in the build tree, then in the source tree
66631	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66632	 # because $ac_f cannot contain `:'.
66633	 test -f "$ac_f" ||
66634	   case $ac_f in
66635	   [\\/$]*) false;;
66636	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66637	   esac ||
66638	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66639      esac
66640      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66641      as_fn_append ac_file_inputs " '$ac_f'"
66642    done
66643
66644    # Let's still pretend it is `configure' which instantiates (i.e., don't
66645    # use $as_me), people would be surprised to read:
66646    #    /* config.h.  Generated by config.status.  */
66647    configure_input='Generated from '`
66648	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66649	`' by configure.'
66650    if test x"$ac_file" != x-; then
66651      configure_input="$ac_file.  $configure_input"
66652      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66653$as_echo "$as_me: creating $ac_file" >&6;}
66654    fi
66655    # Neutralize special characters interpreted by sed in replacement strings.
66656    case $configure_input in #(
66657    *\&* | *\|* | *\\* )
66658       ac_sed_conf_input=`$as_echo "$configure_input" |
66659       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66660    *) ac_sed_conf_input=$configure_input;;
66661    esac
66662
66663    case $ac_tag in
66664    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66665      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66666    esac
66667    ;;
66668  esac
66669
66670  ac_dir=`$as_dirname -- "$ac_file" ||
66671$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66672	 X"$ac_file" : 'X\(//\)[^/]' \| \
66673	 X"$ac_file" : 'X\(//\)$' \| \
66674	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66675$as_echo X"$ac_file" |
66676    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66677	    s//\1/
66678	    q
66679	  }
66680	  /^X\(\/\/\)[^/].*/{
66681	    s//\1/
66682	    q
66683	  }
66684	  /^X\(\/\/\)$/{
66685	    s//\1/
66686	    q
66687	  }
66688	  /^X\(\/\).*/{
66689	    s//\1/
66690	    q
66691	  }
66692	  s/.*/./; q'`
66693  as_dir="$ac_dir"; as_fn_mkdir_p
66694  ac_builddir=.
66695
66696case "$ac_dir" in
66697.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66698*)
66699  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66700  # A ".." for each directory in $ac_dir_suffix.
66701  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66702  case $ac_top_builddir_sub in
66703  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66704  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66705  esac ;;
66706esac
66707ac_abs_top_builddir=$ac_pwd
66708ac_abs_builddir=$ac_pwd$ac_dir_suffix
66709# for backward compatibility:
66710ac_top_builddir=$ac_top_build_prefix
66711
66712case $srcdir in
66713  .)  # We are building in place.
66714    ac_srcdir=.
66715    ac_top_srcdir=$ac_top_builddir_sub
66716    ac_abs_top_srcdir=$ac_pwd ;;
66717  [\\/]* | ?:[\\/]* )  # Absolute name.
66718    ac_srcdir=$srcdir$ac_dir_suffix;
66719    ac_top_srcdir=$srcdir
66720    ac_abs_top_srcdir=$srcdir ;;
66721  *) # Relative name.
66722    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66723    ac_top_srcdir=$ac_top_build_prefix$srcdir
66724    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66725esac
66726ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66727
66728
66729  case $ac_mode in
66730  :F)
66731  #
66732  # CONFIG_FILE
66733  #
66734
66735_ACEOF
66736
66737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66738# If the template does not know about datarootdir, expand it.
66739# FIXME: This hack should be removed a few years after 2.60.
66740ac_datarootdir_hack=; ac_datarootdir_seen=
66741ac_sed_dataroot='
66742/datarootdir/ {
66743  p
66744  q
66745}
66746/@datadir@/p
66747/@docdir@/p
66748/@infodir@/p
66749/@localedir@/p
66750/@mandir@/p'
66751case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66752*datarootdir*) ac_datarootdir_seen=yes;;
66753*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66754  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66755$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66756_ACEOF
66757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66758  ac_datarootdir_hack='
66759  s&@datadir@&$datadir&g
66760  s&@docdir@&$docdir&g
66761  s&@infodir@&$infodir&g
66762  s&@localedir@&$localedir&g
66763  s&@mandir@&$mandir&g
66764  s&\\\${datarootdir}&$datarootdir&g' ;;
66765esac
66766_ACEOF
66767
66768# Neutralize VPATH when `$srcdir' = `.'.
66769# Shell code in configure.ac might set extrasub.
66770# FIXME: do we really want to maintain this feature?
66771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66772ac_sed_extra="$ac_vpsub
66773$extrasub
66774_ACEOF
66775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66776:t
66777/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66778s|@configure_input@|$ac_sed_conf_input|;t t
66779s&@top_builddir@&$ac_top_builddir_sub&;t t
66780s&@top_build_prefix@&$ac_top_build_prefix&;t t
66781s&@srcdir@&$ac_srcdir&;t t
66782s&@abs_srcdir@&$ac_abs_srcdir&;t t
66783s&@top_srcdir@&$ac_top_srcdir&;t t
66784s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66785s&@builddir@&$ac_builddir&;t t
66786s&@abs_builddir@&$ac_abs_builddir&;t t
66787s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66788$ac_datarootdir_hack
66789"
66790eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66791  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66792
66793test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66794  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66795  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66796      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66797  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66798which seems to be undefined.  Please make sure it is defined" >&5
66799$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66800which seems to be undefined.  Please make sure it is defined" >&2;}
66801
66802  rm -f "$ac_tmp/stdin"
66803  case $ac_file in
66804  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66805  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66806  esac \
66807  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66808 ;;
66809
66810
66811
66812  esac
66813
66814done # for ac_tag
66815
66816
66817as_fn_exit 0
66818_ACEOF
66819ac_clean_files=$ac_clean_files_save
66820
66821test $ac_write_fail = 0 ||
66822  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66823
66824
66825# configure is writing to config.log, and then calls config.status.
66826# config.status does its own redirection, appending to config.log.
66827# Unfortunately, on DOS this fails, as config.log is still kept open
66828# by configure, so config.status won't be able to write to it; its
66829# output is simply discarded.  So we exec the FD to /dev/null,
66830# effectively closing config.log, so it can be properly (re)opened and
66831# appended to by config.status.  When coming back to configure, we
66832# need to make the FD available again.
66833if test "$no_create" != yes; then
66834  ac_cs_success=:
66835  ac_config_status_args=
66836  test "$silent" = yes &&
66837    ac_config_status_args="$ac_config_status_args --quiet"
66838  exec 5>/dev/null
66839  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66840  exec 5>>config.log
66841  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66842  # would make configure fail if this is the last instruction.
66843  $ac_cs_success || as_fn_exit 1
66844fi
66845if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66846  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66847$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66848fi
66849
66850
66851# After AC_OUTPUT, we need to do final work
66852
66853
66854  # Try to move config.log (generated by autoconf) to the configure-support directory.
66855  if test -e ./config.log; then
66856    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66857  fi
66858
66859  # Rotate our log file (configure.log)
66860  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66861    $RM -f "$OUTPUT_ROOT/configure.log.old"
66862  fi
66863  if test -e "$OUTPUT_ROOT/configure.log"; then
66864    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66865  fi
66866
66867  # Move configure.log from current directory to the build output root
66868  if test -e ./configure.log; then
66869    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66870  fi
66871
66872  # Make the compare script executable
66873  $CHMOD +x $OUTPUT_ROOT/compare.sh
66874
66875
66876# Finally output some useful information to the user
66877
66878  # Finally output some useful information to the user
66879
66880  printf "\n"
66881  printf "====================================================\n"
66882  if test "x$no_create" != "xyes"; then
66883    if test "x$IS_RECONFIGURE" != "xyes"; then
66884      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66885    else
66886      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66887    fi
66888  else
66889    if test "x$IS_RECONFIGURE" != "xyes"; then
66890      printf "A configuration has been successfully checked but not created\n"
66891    else
66892      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66893    fi
66894  fi
66895  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66896    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66897  else
66898    printf "using default settings.\n"
66899  fi
66900
66901  printf "\n"
66902  printf "Configuration summary:\n"
66903  printf "* Debug level:    $DEBUG_LEVEL\n"
66904  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66905  printf "* JDK variant:    $JDK_VARIANT\n"
66906  printf "* JVM variants:   $JVM_VARIANTS\n"
66907  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66908  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66909
66910  printf "\n"
66911  printf "Tools summary:\n"
66912  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66913    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66914  fi
66915  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66916  if test "x$TOOLCHAIN_VERSION" != "x"; then
66917    print_version=" $TOOLCHAIN_VERSION"
66918  fi
66919  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66920  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66921  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66922
66923  printf "\n"
66924  printf "Build performance summary:\n"
66925  printf "* Cores to use:   $JOBS\n"
66926  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66927  if test "x$CCACHE_STATUS" != "x"; then
66928    printf "* ccache status:  $CCACHE_STATUS\n"
66929  fi
66930  printf "\n"
66931
66932  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66933    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66934    printf "will result in longer build times.\n"
66935    printf "\n"
66936  fi
66937
66938  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66939    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66940    printf "These are not respected, and will be ignored. It is recommended\n"
66941    printf "that you clean your environment. The following variables are set:\n"
66942    printf "$FOUND_ALT_VARIABLES\n"
66943    printf "\n"
66944  fi
66945
66946  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66947    printf "WARNING: Your build output directory is not on a local disk.\n"
66948    printf "This will severely degrade build performance!\n"
66949    printf "It is recommended that you create an output directory on a local disk,\n"
66950    printf "and run the configure script again from that directory.\n"
66951    printf "\n"
66952  fi
66953
66954  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66955    printf "WARNING: The result of this configuration has overridden an older\n"
66956    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66957    printf "proper build. Failure to do so might result in strange build problems.\n"
66958    printf "\n"
66959  fi
66960
66961  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66962    printf "WARNING: The result of this configuration was not saved.\n"
66963    printf "You should run without '--no-create | -n' to create the configuration.\n"
66964    printf "\n"
66965  fi
66966
66967
66968
66969  # Locate config.log.
66970  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66971    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66972  elif test -e "./config.log"; then
66973    CONFIG_LOG_PATH="."
66974  fi
66975
66976  if test -e "$CONFIG_LOG_PATH/config.log"; then
66977    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66978    if test $? -eq 0; then
66979      printf "The following warnings were produced. Repeated here for convenience:\n"
66980      # We must quote sed expression (using []) to stop m4 from eating the [].
66981      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66982      printf "\n"
66983    fi
66984  fi
66985
66986